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
Hov to knov vho struct called event #404484
07/09/12 20:43
07/09/12 20:43
Joined: Apr 2006
Posts: 159
Latvija
Arrovs Offline OP
Member
Arrovs  Offline OP
Member

Joined: Apr 2006
Posts: 159
Latvija
Hello.
So my problem is kinda easy:
Code:
typedef struct
{
PANEL* my_panel;
int target_var;
}Mystruct;



this panel have button, and after clicking it i vant to change var in struct.
Problem starts if im generating more structs and shoving on screen.
I dont knov hov to find struct vho have pressed button and to change its target_var (for example).
If im using just one i can use global var.


Arrovs once will publish game
Re: Hov to knov vho struct called event [Re: Arrovs] #404487
07/09/12 21:15
07/09/12 21:15
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
1. try to use a 'w' instead of a 'v' all the time.. it´s horrible to read this post ._.

2. you could save a kind of struct id into a second variable of the struct to locate it?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Hov to knov vho struct called event [Re: Espér] #404488
07/09/12 21:43
07/09/12 21:43
Joined: Apr 2006
Posts: 159
Latvija
Arrovs Offline OP
Member
Arrovs  Offline OP
Member

Joined: Apr 2006
Posts: 159
Latvija
Possible is some kind of button parameters vhere i could give pointer from struct to click function?

About vv - just cant. And its useless anyvay(luckely).


Arrovs once will publish game
Re: Hov to knov vho struct called event [Re: Arrovs] #404509
07/10/12 07:53
07/10/12 07:53
Joined: Apr 2008
Posts: 245
GameScore Offline
Member
GameScore  Offline
Member

Joined: Apr 2008
Posts: 245
thats interesting, no " W " in your language?

Re: Hov to knov vho struct called event [Re: GameScore] #404524
07/10/12 14:37
07/10/12 14:37
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
Use a struct Array. When creating the panel assign the skill_x of the panel to the number in the array.

Mystruct Mystruct_array[200]

Mystruct_array[my_pan.skill_x].target_var++;


I use this method in my games and it works well.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: Hov to knov vho struct called event [Re: FoxHound] #404525
07/10/12 14:45
07/10/12 14:45
Joined: Apr 2006
Posts: 159
Latvija
Arrovs Offline OP
Member
Arrovs  Offline OP
Member

Joined: Apr 2006
Posts: 159
Latvija
Sounds promising.


Arrovs once will publish game

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