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.

DarkBASIC Professional Discussion / Help required with button pressed refresh

Author
Message
DemonHill
18
Years of Service
User Offline
Joined: 20th Mar 2008
Location:
Posted: 9th Sep 2010 03:07
Hi,

See below for my code. My Game loop is slowed due to the fact I have to constantly display the button to refresh it and show it in an unclicked state. Any ideas how I can do this without constant pasting ?

if Player2Orders=4:button23=103:endif
If mousex()>=742 and mousex()<=762 and mousey()>=623 and mousey()<=643
if Mouseclick()=1
button23=103
paste image button23,742,623
endif
Endif


Paste image button23,742,623






Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 9th Sep 2010 11:03 Edited at: 9th Sep 2010 11:05
Generally when I do menus I make one image that shows all buttons in an unclicked state. That way you don't have to constantly show each unclicked button individually. One image does them all even if you have 100+ buttons on the screen at once.

Login to post a reply

Server time is: 2026-07-22 12:41:12
Your offset time is: 2026-07-22 12:41:12