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.

AppGameKit Classic Chat / Simple button positioning routine for you

Author
Message
Creative Magic Man
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Frinton On Sea, Essex, UK
Posted: 25th Jun 2020 13:50 Edited at: 25th Jun 2020 15:15
Here is a simple piece of code to enable you to drag your buttons to the position on the screen when designing your project.

Just replace the variable 'ButtonID' with your button ID ( or change the code to go through a loop etc. ) and put the code inside your main loop.

You will have to change the effect of clicking on the buttons within your code so it doesn't keep on activating a command etc.

It is best to use this code at the beginning, before you have linked your buttons to any events etc.

I know the Studio version has this built in, but I have had a few problems with the button arrangement and this is short, simply and cleaner in my view

INSTRUCTIONS
Just click on a button with the left mouse button and drag to where you want your button on your screen and make a note of the positions of the button on the screen to put into your code.




I would like to add that this could be easily adapted to position other elements such as sprites, edit boxes, text positions etc.

You could also save the positions to a csv file to be read in to your project and align all your elements and make it easier when designing.
Amazing creations start with a Fuzzy Vision
Dave - Creator, Developer and Visionary
Fuzzy Visions

Login to post a reply

Server time is: 2024-03-28 13:27:00
Your offset time is: 2024-03-28 13:27:00