|
1 registered members (AndrewAMD),
3,675
guests, and 8
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
change the position of a button
#283993
08/11/09 07:41
08/11/09 07:41
|
Joined: Apr 2009
Posts: 138 Germany
Toryno
OP
Member
|
OP
Member
Joined: Apr 2009
Posts: 138
Germany
|
Hi, how can the position(just x & y) of a button be changed without this big-sized function? My code becomes very confusing when i use it
pan_setbutton(PANEL*, var num, var type, var x, var y, BMAP* bmapOn, BMAP* bmapOff, BMAP* bmapOver, BMAP* bmapOverOff, void* functionClick, void* functionLeave, void* functionOver);
Thanks for reading, thinking, answering
|
|
|
Re: change the position of a button
[Re: Saturnus]
#284038
08/11/09 11:14
08/11/09 11:14
|
Joined: Apr 2009
Posts: 138 Germany
Toryno
OP
Member
|
OP
Member
Joined: Apr 2009
Posts: 138
Germany
|
pan_setpos() woud be possible if only the button is in the panel but i have more there  so i need to change only the button  so pan_setpos() is no way. My idea again: building_menue.button1.pos_x += 20; this is wrong syntax but is there a correct way like this?
Thanks for reading, thinking, answering
|
|
|
Re: change the position of a button
[Re: Toryno]
#284062
08/11/09 14:01
08/11/09 14:01
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
You should take a closer look at the pan_setpos function again. As this is exactly what you need (as Kombucha already pointed out) pan_setpos(PANEL*, var type, var num, VECTOR* xy) Changes the xy position of a panel element.
Parameters: PANEL* Panel pointer. type Element type: 1 = digits 3 = button, toggle 4 = slider 5 = window 6 = needle num Number of the element, starting with 1. xy Vector containing the element's new x and y values
http://www.conitec.net/beta/apan_setpos.htm
|
|
|
Re: change the position of a button
[Re: Toryno]
#284176
08/12/09 03:04
08/12/09 03:04
|
Joined: Jul 2008
Posts: 553 Singapore
delinkx
User
|
User
Joined: Jul 2008
Posts: 553
Singapore
|
This doesn't work. My idea again: building_menue.button1.pos_x += 20; this is wrong syntax but is there a correct way like this?
As suggested above, pan_setpos() is better, as it has less arguments and will make ur confusions less.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|