Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / AGK2 Newcomer Help

Author
Message
Janku Ayanami
8
Years of Service
User Offline
Joined: 31st Aug 2015
Location: Namibia
Posted: 31st Aug 2015 14:15
Hi, I am new to APK and I have been building an application to record my miles usage for work, I have been having some trouble understanding where some of my code breaks.

I am using apk as an application tool and not a gaming tool at this moment.

I have a few things I noted that I have some difficulty understanding (see code and screenshot about details):
When I click on a botton, another button's code is triggered.
GPS values takes a while to change from 0 to an actual value(this happens when google maps has not been opened yet).
Images get flipped to the left(tested on Samsung S3).

Like I said, I am new to this and I am definitely breaking a few things here, this app will help me to learn APK Basic, any pointers is appreciated.

Code:
main.agc:


functions.agc:

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 4th Sep 2015 06:52 Edited at: 4th Sep 2015 07:08
Quote: "When I click on a botton, another button's code is triggered."

Let me guess...
The Clear and Exit mess up with each other
The Upload and Save mess up with each other

That problem is easy... the size of the button is larger than the distance they are from each other.
The y coordinates are only 110 pixels apart, but some of the buttons have a size of 350.
So the radius of 175 is overlapping on the other button.

Reduce the size or move the buttons farther apart.

I'm not sure about the other problems, but I hope this helps.


Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Janku Ayanami
8
Years of Service
User Offline
Joined: 31st Aug 2015
Location: Namibia
Posted: 4th Sep 2015 14:46
I figured that out after a while when I started to play around with the button images, I had a custom rectangular image for the buttons, that's why it seemed to be ok.

To fix that I am using a piece of code if found http://forum.thegamecreators.com/?m=forum_view&t=205779&b=41

So now its just that I need to figure out what to do with the GPS and the flipped images.

Thank you for the assist though, the buttons could have taken me quite a while longer lol

Login to post a reply

Server time is: 2024-04-20 14:36:43
Your offset time is: 2024-04-20 14:36:43