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.

Dark GDK / How to asign something an ID(a button)

Author
Message
FIGHTEX
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 8th Apr 2009 15:40
hi, i am making some stuf for menus and i was wondering how can i asign an id to some code like in gdk you can asign objects, sounds...
IDs which youn can then use(dbMoveObject(ID!!, blabla)
anyway heres my code:

then it would be great if i had a command like
MouseOverButton(ID);
or something like that.

thnx in advance

Game.Love
DaddyJ
15
Years of Service
User Offline
Joined: 17th Mar 2009
Location:
Posted: 8th Apr 2009 17:00
There would be additional overhead, but the code is pretty much the same, you'd just make your function return a handler or ID.

You'd need to have a way to store the ID info, such as a class or other type, depending on how much info you wanted to keep about the ID.
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 10th Apr 2009 06:07
Dont know if this Function would be of use to you i wrote this some time ago. Of course you will have to do a little work on adding the global variables etc into your code. But hell its free LOL
regards :- Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA

Attachments

Login to view attachments
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 10th Apr 2009 06:10
oh dear that uses a Function i made getmouse( )
so i include this here for ya

Regards :- Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA

Attachments

Login to view attachments
FIGHTEX
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 10th Apr 2009 14:04
i gues that would work yeah, thnx stebebrit.
but i would steel want to now how to asign an ID.
for othere stuf.

Game.Love
FIGHTEX
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 10th Apr 2009 14:23
ok, got my version up an runing.
here it is:


Game.Love
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 10th Apr 2009 22:37
Hello there so glad you could make use of my code there. Well thats what programming is about sharing stuff
I have some more code for you i just knocked up showing how i assign id numbers to media i load in and also a function i use to delete my media wheh i exit my programs. Hope this is useful to you and perhaps others also.

Regards Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA

Attachments

Login to view attachments
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 10th Apr 2009 22:41
oops made an error in variables

first 2 should be as follows :-

int imagestartscreen = 1;
int imagehelpscreen = 2;


sorry !!!! regards Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA
FIGHTEX
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 11th Apr 2009 09:16
i gues thats useful when you go like from game to menu.
i always use to delete evreything sepretly(not any more)


now i am thinking of making my text plug-in so i am still looking for an ID asign-mant.

Game.Love

Login to post a reply

Server time is: 2024-11-25 14:27:22
Your offset time is: 2024-11-25 14:27:22