Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Creation buttons in runtime #254624
03/04/09 12:42
03/04/09 12:42
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Okay, we can create panels, text and so on in tuntime... what about buttons - i can only change its state with button_state()

so, i need to create buttons, defending of number of models(i'm making some kind of editor)... now i place button on the background and create different panels over them...
but i'd like to find more simple way smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Creation buttons in runtime [Re: VeT] #254628
03/04/09 12:58
03/04/09 12:58
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
on the other hand... maybe pan_setbmap would help me... i'd check


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Creation buttons in runtime [Re: VeT] #254631
03/04/09 13:03
03/04/09 13:03
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Keep re-creating every change to the panel using ent_create.
Just build a creation string dynamically and use it in the pan_create.

EG
Code:
   STRING* BuildStr = str_create("pos_x=4; pos_y=4;");
   str_cat(BuildStr, " button(10,10, bmapOn, bmapOff, bmapOver, functionOn, functionOff, functionOver);");
   str_cat(BuildStr, " button(20,10, bmapOn, bmapOff, bmapOver, functionOn, functionOff, functionOver);");
   str_cat(BuildStr, " button(30,10, bmapOn, bmapOff, bmapOver, functionOn, functionOff, functionOver);");
   //
   if(MyPanel!=NULL) pan_remove(MyPanel);
   MyPanel = pan_create(BuildStr, 1);



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Creation buttons in runtime [Re: EvilSOB] #254635
03/04/09 13:15
03/04/09 13:15
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
thanks, good idea smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Creation buttons in runtime [Re: VeT] #254640
03/04/09 13:31
03/04/09 13:31
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
btw, it will be easier to do in next version, see beta page for new panel features wink


3333333333
Re: Creation buttons in runtime [Re: Quad] #254643
03/04/09 13:43
03/04/09 13:43
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Quote:

The Pro Edition uses instancing (a method supported by new graphics cards to render many copies of the same object) for creating thousands of particles with one single drawing function. This way up to ten times more particles can be rendered than with the lower editions.

sounds good smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Creation buttons in runtime [Re: VeT] #254646
03/04/09 13:47
03/04/09 13:47
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Code:
   BMAP* temp_bmap = "land_dark.jpg";
   pan_create("pos_x=400; pos_y=400; bmap = temp_bmap;",999);


hm, this dont work for me...

even simple
Code:
pan_create("bmap = land_dark.jpg;",99);



1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Creation buttons in runtime [Re: VeT] #254647
03/04/09 14:04
03/04/09 14:04
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I dont know why "... bmap=temp_bmap; ..." doesnt work, I never tried it.

But to use the simple version use "... bmap =\"land_dark.jpg\"; ..."


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Creation buttons in runtime [Re: EvilSOB] #254783
03/05/09 13:54
03/05/09 13:54
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Code:
pan_create("bmap =\"land_dark.jpg\"; ",99);

even in main() doesn't work....


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Creation buttons in runtime [Re: VeT] #254785
03/05/09 14:04
03/05/09 14:04
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Same as any panel you need to have a "flags=SHOW;" in there also or is is still invisible.

Also, Ive just tested
Code:
pan_create("bmap =\"land_dark.jpg\"; flags=SHOW; ",99);
pan_create("bmap=temp_bmap; flags=SHOW; ",99);
and they both work, the second only if 'temp_bmap' is a global, local bmaps dont ever work in panels.
PS The second one is my preferred option for non_permanent panels, it uses less nexus.



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 1 of 2 1 2

Moderated by  HeelX, rvL_eXile 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1