Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (RealSerious3D, rvl, tomaslolo), 685 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
pan_setbutton -> radio buttons not working #280622
07/23/09 15:40
07/23/09 15:40
Joined: Aug 2003
Posts: 127
Berlin, Germany
C
CHaP Offline OP
Member
CHaP  Offline OP
Member
C

Joined: Aug 2003
Posts: 127
Berlin, Germany
Vielleicht klappt es ja auf deutsch besser. ;-)

Es existiert ein vorher definiertes und leeres PANEL Objekt. In diesem erstelle ich dann nach und nach mit pan_setbuttons mehrere neue Buttons.

Wichtig ist, dass diese Radio-Buttons werden. Erstellt werden sie. Funktionieren tun sie auch, nur verhalten sie sich nicht wie Radio-Buttons.
D.h.: Klicke ich die Buttons durch, geht der vorher aktiverte nicht aus (es werden die falschen Bitmaps angezeigt).

Jetzt meine Frage:
Ist es noch eine Art Bug oder habe ich einfach die BMAPS in pan_setbutton falsch zugeordnet?

Benutze ich den button_state 2, passiert auch nix anderes als bei button_state 3.

Vielleicht hat jemand von euch ein kleines Beispiel, aus einem aktuellen Projekt, damit ich das mit meinem vergleichen kann.

Noch kurz die Struktur:

Code:
void CreateButtons()
{
     pan_setbutton(ThePanel,0,3, (...));
}
void SetButtons()
{
     for(x=0;x<5;x++)
     {
          CreateButtons();
     }
}


--------------------------------------------------------

Hey !!

In consideration of this two things:

Thread: pan_setbutton and button_state and
Bug Report from Version 7.73.0 -> pan_setbutton

I've a question.

Has anybody use the pan_setbutton function with button_state 3?
So, if I use them, and create new radio buttons it works not correctly. I can click on the new buttons but the other buttons are not switching off.

In fact: If I use a normal definition of the buttons in a panel, without pan_setbutton command, it works fine.

Here are my two definitions:

Code:
pan_setbutton(pNETWORK_CardButtons,0,3,sCardPosX,sCardPosY,g_bmapNETWORK_CardBlogOver,NULL,g_bmapNETWORK_CardBlogOver,NULL,fMENU_CardBlogClicked,NULL,NULL);



or

Code:
button_radio(0,0,g_bmapNETWORK_CardBlogOver,NULL,g_bmapNETWORK_CardBlogOver,fMENU_CardBlogClicked,NULL,NULL);



OK. Either I have an wrong syntax in my allocation of bmaps or there is something other false.

Can anybody reconstruct this and tell me, what's wrong?

THX a lot.

EDIT:

I have modified the allocation of the bmaps:

Code:
pan_setbutton(pNETWORK_CardButtons,0,3,sCardPosX,sCardPosY,g_bmapNETWORK_CardBlogOver,g_bmapNETWORK_CardBlogOut,g_bmapNETWORK_CardBlogOver,g_bmapNETWORK_CardBlogOver,fMENU_CardBlogClicked,NULL,NULL);



Last edited by CHaP; 07/25/09 13:34. Reason: deutsch
Re: pan_setbutton -> radio buttons not working [Re: CHaP] #414847
01/09/13 02:12
01/09/13 02:12

T
tolu619
Unregistered
tolu619
Unregistered
T



Seriously? Nobody ever replied this topic? Did you eventually figure it out?

Re: pan_setbutton -> radio buttons not working [Re: ] #414854
01/09/13 09:32
01/09/13 09:32
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
apparently no. it was posted before I joined, but I had no problem with radio buttons. I used it fine in A7 too.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: pan_setbutton -> radio buttons not working [Re: sivan] #414863
01/09/13 14:49
01/09/13 14:49
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Just a thought:

there shouldn't be a difference between the 3 button types but make sure the panel's size_x and -_y is big enough.
The size gets set automatically if you create the panel with a definition, but if you add buttons via code you have to do it manually.
Even if buttons are visible they cannot be clicked if they're outside of the panel-size.

Last edited by Kartoffel; 01/09/13 14:50.

POTATO-MAN saves the day! - Random

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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