Re: [hlcoders] vgui event question?

2005-05-04 Thread Heritage
Ok, got it working, but it was not easy because I did not know I had to add
the DECLARE_CLASS_SIMPLE macro  in my class declaration to use the
MESSAGE_FUNC_PARAMS macro. If that is accurate, you may want to change
your documentation to reflect it because it shows a class using the
message macro without the declare macro and I don't believe that will
compile.

http://www.valve-erc.com/srcsdk/VGUI2/vgui2.html

Thanks Alfred.


On 5/3/05, Alfred Reynolds [EMAIL PROTECTED] wrote:
 You are doing it wrong. Have a look at
 cl_dll/game_controls/spectatorgui.cpp for an example on how to act upon
 combo box selection changes (in particular
 CSpectatorMenu::OnTextChanged() ).

 - Alfred

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Heritage
 Sent: Tuesday, May 03, 2005 10:04 PM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] vgui event question?

 Did you work with the hl1 sdk? There was a way to create your own custom
 action signal and input signal classes which you then used to catch
 events like mouse over and click or whatever.

 Basically, what i am saying is, creating a new class to intercept
 fundamental event messages is stupid. For example, right now I am doing
 a combobox in my menu, I have no way of intercepting the event that
 occurs when a selected item changes. So what I have to do is create a
 new type of combo box which does nothing other than overriding that
 function OnSelectionChanges( ... or whatever its called, im not really
 sure) ?

 That makes no sense because there is no need to make 10 or 20 more
 combobox classes like ComboBox1, ComboBox2, ComboBoxMe, ComboBoxYou etc
 etc.. just to create my custom events.

 On 5/3/05, NuclearFriend [EMAIL PROTECTED] wrote:
  --
  [ Picked text/plain from multipart/alternative ] As long as you
  understand because I think you've lost me. :p
 
  On 5/4/05, Heritage [EMAIL PROTECTED] wrote:
  
   The only thing I can see of doing is making a few panels that are
   specifically for events for each vgui menu I make, and then adding
   this
  
   my_button_or_checkbox_orwhatever-AddActionSignalTarget(EventPanel);
   then i write an OnCommand for EvenPanel to catch em.
  
   Just seems weird that panels are also used to receive events.
 anyway..
   I'll stop my spamming now. sorry.
  
  
   On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
If i have a button, on a panel or frame, and i click it, then that

panel has to be a pseudo panel that I made up like my_ panel
which is derived from panel and then I override the OnCommand to
intercept the event? Seems like a total waste. If I have to do
that for every panel/frame/whatever then forget it
   
that makes no sense.
How do i add an action listener thing like in hl1?
   
   
On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
 But you still have to overwrite a vgui panel or frame or
 something. in order to get at OnCommand..

 in C#, i can just add listeners, and in hl1, i was able to do
 similar things. I don't want nor need to make another vgui
 class. I just want a custom listener.


 On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
  Oh I get it, thanks
 
  On 4/29/05, NuclearFriend [EMAIL PROTECTED] wrote:
   --
   [ Picked text/plain from multipart/alternative ] In
   CTextWindow, look at how the button m_pOk is declared and
   then
   how
   OnCommand recieves the button command..
  
   On 4/29/05, Heritage [EMAIL PROTECTED] wrote:
   
I'd like to subscribe to an event such as a button click,
im
   having
kinda of a hard to understanding how to do this. I read
thu the documentation but its still unclear to me. I dont
want to derive
   a new
button class just to overwrite OnClick or OnCommand or
   OnWhatever, I
just need to subscribe to that event. I'm having a hard
time
   finding
examples, or maybe im looking in the wrong places, or
maybe this
   is
not the way it works?
   
___
To unsubscribe, edit your list preferences, or view the
list
   archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
   
   
  
   --
   Programmer for RnL
   www.resistanceandliberation.comhttp://www.resistanceandlibe
   ration.com
   http://www.resistanceandliberation.com
   --
  
   ___
   To unsubscribe, edit your list preferences, or view the list
   archives, please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders
  
  
 

   
  
   ___
   To unsubscribe, edit your list preferences, or view the list
   archives, please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders

Re: [hlcoders] vgui event question?

2005-05-03 Thread Heritage
But you still have to overwrite a vgui panel or frame or
something. in order to get at OnCommand..

in C#, i can just add listeners, and in hl1, i was able to do similar
things. I don't want nor need to make another vgui class. I just want
a custom listener.


On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
 Oh I get it, thanks

 On 4/29/05, NuclearFriend [EMAIL PROTECTED] wrote:
  --
  [ Picked text/plain from multipart/alternative ]
  In CTextWindow, look at how the button m_pOk is declared and then how
  OnCommand recieves the button command..
 
  On 4/29/05, Heritage [EMAIL PROTECTED] wrote:
  
   I'd like to subscribe to an event such as a button click, im having
   kinda of a hard to understanding how to do this. I read thu the
   documentation but its still unclear to me. I dont want to derive a new
   button class just to overwrite OnClick or OnCommand or OnWhatever, I
   just need to subscribe to that event. I'm having a hard time finding
   examples, or maybe im looking in the wrong places, or maybe this is
   not the way it works?
  
   ___
   To unsubscribe, edit your list preferences, or view the list archives,
   please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders
  
  
 
  --
  Programmer for RnL
  www.resistanceandliberation.com http://www.resistanceandliberation.com
  --
 
  ___
  To unsubscribe, edit your list preferences, or view the list archives, 
  please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 


___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] vgui event question?

2005-05-03 Thread Heritage
If i have a button, on a panel or frame, and i click it, then that
panel has to be a pseudo panel that I made up like my_ panel which
is derived from panel and then I override the OnCommand to intercept
the event? Seems like a total waste. If I have to do that for every
panel/frame/whatever then forget it

that makes no sense.
How do i add an action listener thing like in hl1?


On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
 But you still have to overwrite a vgui panel or frame or
 something. in order to get at OnCommand..

 in C#, i can just add listeners, and in hl1, i was able to do similar
 things. I don't want nor need to make another vgui class. I just want
 a custom listener.


 On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
  Oh I get it, thanks
 
  On 4/29/05, NuclearFriend [EMAIL PROTECTED] wrote:
   --
   [ Picked text/plain from multipart/alternative ]
   In CTextWindow, look at how the button m_pOk is declared and then how
   OnCommand recieves the button command..
  
   On 4/29/05, Heritage [EMAIL PROTECTED] wrote:
   
I'd like to subscribe to an event such as a button click, im having
kinda of a hard to understanding how to do this. I read thu the
documentation but its still unclear to me. I dont want to derive a new
button class just to overwrite OnClick or OnCommand or OnWhatever, I
just need to subscribe to that event. I'm having a hard time finding
examples, or maybe im looking in the wrong places, or maybe this is
not the way it works?
   
___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
   
   
  
   --
   Programmer for RnL
   www.resistanceandliberation.com http://www.resistanceandliberation.com
   --
  
   ___
   To unsubscribe, edit your list preferences, or view the list archives, 
   please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders
  
  
 


___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] vgui event question?

2005-05-03 Thread Heritage
The only thing I can see of doing is making a few panels that are
specifically for events for each vgui menu I make, and then adding
this

my_button_or_checkbox_orwhatever-AddActionSignalTarget(EventPanel);
then i write an OnCommand for EvenPanel to catch em.

Just seems weird that panels are also used to receive events. anyway..
I'll stop my spamming now. sorry.


On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
 If i have a button, on a panel or frame, and i click it, then that
 panel has to be a pseudo panel that I made up like my_ panel which
 is derived from panel and then I override the OnCommand to intercept
 the event? Seems like a total waste. If I have to do that for every
 panel/frame/whatever then forget it

 that makes no sense.
 How do i add an action listener thing like in hl1?


 On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
  But you still have to overwrite a vgui panel or frame or
  something. in order to get at OnCommand..
 
  in C#, i can just add listeners, and in hl1, i was able to do similar
  things. I don't want nor need to make another vgui class. I just want
  a custom listener.
 
 
  On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
   Oh I get it, thanks
  
   On 4/29/05, NuclearFriend [EMAIL PROTECTED] wrote:
--
[ Picked text/plain from multipart/alternative ]
In CTextWindow, look at how the button m_pOk is declared and then how
OnCommand recieves the button command..
   
On 4/29/05, Heritage [EMAIL PROTECTED] wrote:

 I'd like to subscribe to an event such as a button click, im having
 kinda of a hard to understanding how to do this. I read thu the
 documentation but its still unclear to me. I dont want to derive a new
 button class just to overwrite OnClick or OnCommand or OnWhatever, I
 just need to subscribe to that event. I'm having a hard time finding
 examples, or maybe im looking in the wrong places, or maybe this is
 not the way it works?

 ___
 To unsubscribe, edit your list preferences, or view the list archives,
 please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders


   
--
Programmer for RnL
www.resistanceandliberation.com http://www.resistanceandliberation.com
--
   
___
To unsubscribe, edit your list preferences, or view the list archives, 
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
   
   
  
 


___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] vgui event question?

2005-05-03 Thread NuclearFriend
--
[ Picked text/plain from multipart/alternative ]
As long as you understand because I think you've lost me. :p

On 5/4/05, Heritage [EMAIL PROTECTED] wrote:

 The only thing I can see of doing is making a few panels that are
 specifically for events for each vgui menu I make, and then adding
 this

 my_button_or_checkbox_orwhatever-AddActionSignalTarget(EventPanel);
 then i write an OnCommand for EvenPanel to catch em.

 Just seems weird that panels are also used to receive events. anyway..
 I'll stop my spamming now. sorry.


 On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
  If i have a button, on a panel or frame, and i click it, then that
  panel has to be a pseudo panel that I made up like my_ panel which
  is derived from panel and then I override the OnCommand to intercept
  the event? Seems like a total waste. If I have to do that for every
  panel/frame/whatever then forget it
 
  that makes no sense.
  How do i add an action listener thing like in hl1?
 
 
  On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
   But you still have to overwrite a vgui panel or frame or
   something. in order to get at OnCommand..
  
   in C#, i can just add listeners, and in hl1, i was able to do similar
   things. I don't want nor need to make another vgui class. I just want
   a custom listener.
  
  
   On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
Oh I get it, thanks
   
On 4/29/05, NuclearFriend [EMAIL PROTECTED] wrote:
 --
 [ Picked text/plain from multipart/alternative ]
 In CTextWindow, look at how the button m_pOk is declared and then
 how
 OnCommand recieves the button command..

 On 4/29/05, Heritage [EMAIL PROTECTED] wrote:
 
  I'd like to subscribe to an event such as a button click, im
 having
  kinda of a hard to understanding how to do this. I read thu the
  documentation but its still unclear to me. I dont want to derive
 a new
  button class just to overwrite OnClick or OnCommand or
 OnWhatever, I
  just need to subscribe to that event. I'm having a hard time
 finding
  examples, or maybe im looking in the wrong places, or maybe this
 is
  not the way it works?
 
  ___
  To unsubscribe, edit your list preferences, or view the list
 archives,
  please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 

 --
 Programmer for RnL
 www.resistanceandliberation.comhttp://www.resistanceandliberation.com
 http://www.resistanceandliberation.com
 --

 ___
 To unsubscribe, edit your list preferences, or view the list
 archives, please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders


   
  
 

 ___
 To unsubscribe, edit your list preferences, or view the list archives,
 please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders




--
Programmer for RnL
www.resistanceandliberation.com http://www.resistanceandliberation.com
--

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] vgui event question?

2005-05-03 Thread Heritage
Did you work with the hl1 sdk? There was a way to create your own
custom action signal and input signal classes which you then used to
catch events like mouse over and click or whatever.

Basically, what i am saying is, creating a new class to intercept
fundamental event messages is stupid. For example, right now I am
doing a combobox in my menu, I have no way of intercepting the event
that occurs when a selected item changes. So what I have to do is
create a new type of combo box which does nothing other than
overriding that function OnSelectionChanges( ... or whatever its
called, im not really sure) ?

That makes no sense because there is no need to make 10 or 20 more
combobox classes like ComboBox1, ComboBox2, ComboBoxMe, ComboBoxYou
etc etc.. just to create my custom events.


On 5/3/05, NuclearFriend [EMAIL PROTECTED] wrote:
 --
 [ Picked text/plain from multipart/alternative ]
 As long as you understand because I think you've lost me. :p

 On 5/4/05, Heritage [EMAIL PROTECTED] wrote:
 
  The only thing I can see of doing is making a few panels that are
  specifically for events for each vgui menu I make, and then adding
  this
 
  my_button_or_checkbox_orwhatever-AddActionSignalTarget(EventPanel);
  then i write an OnCommand for EvenPanel to catch em.
 
  Just seems weird that panels are also used to receive events. anyway..
  I'll stop my spamming now. sorry.
 
 
  On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
   If i have a button, on a panel or frame, and i click it, then that
   panel has to be a pseudo panel that I made up like my_ panel which
   is derived from panel and then I override the OnCommand to intercept
   the event? Seems like a total waste. If I have to do that for every
   panel/frame/whatever then forget it
  
   that makes no sense.
   How do i add an action listener thing like in hl1?
  
  
   On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
But you still have to overwrite a vgui panel or frame or
something. in order to get at OnCommand..
   
in C#, i can just add listeners, and in hl1, i was able to do similar
things. I don't want nor need to make another vgui class. I just want
a custom listener.
   
   
On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
 Oh I get it, thanks

 On 4/29/05, NuclearFriend [EMAIL PROTECTED] wrote:
  --
  [ Picked text/plain from multipart/alternative ]
  In CTextWindow, look at how the button m_pOk is declared and then
  how
  OnCommand recieves the button command..
 
  On 4/29/05, Heritage [EMAIL PROTECTED] wrote:
  
   I'd like to subscribe to an event such as a button click, im
  having
   kinda of a hard to understanding how to do this. I read thu the
   documentation but its still unclear to me. I dont want to derive
  a new
   button class just to overwrite OnClick or OnCommand or
  OnWhatever, I
   just need to subscribe to that event. I'm having a hard time
  finding
   examples, or maybe im looking in the wrong places, or maybe this
  is
   not the way it works?
  
   ___
   To unsubscribe, edit your list preferences, or view the list
  archives,
   please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders
  
  
 
  --
  Programmer for RnL
  www.resistanceandliberation.comhttp://www.resistanceandliberation.com
  http://www.resistanceandliberation.com
  --
 
  ___
  To unsubscribe, edit your list preferences, or view the list
  archives, please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 

   
  
 
  ___
  To unsubscribe, edit your list preferences, or view the list archives,
  please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 

 --
 Programmer for RnL
 www.resistanceandliberation.com http://www.resistanceandliberation.com
 --

 ___
 To unsubscribe, edit your list preferences, or view the list archives, please 
 visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



RE: [hlcoders] vgui event question?

2005-05-03 Thread Alfred Reynolds
You are doing it wrong. Have a look at
cl_dll/game_controls/spectatorgui.cpp for an example on how to act upon
combo box selection changes (in particular
CSpectatorMenu::OnTextChanged() ).

- Alfred

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Heritage
Sent: Tuesday, May 03, 2005 10:04 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] vgui event question?

Did you work with the hl1 sdk? There was a way to create your own custom
action signal and input signal classes which you then used to catch
events like mouse over and click or whatever.

Basically, what i am saying is, creating a new class to intercept
fundamental event messages is stupid. For example, right now I am doing
a combobox in my menu, I have no way of intercepting the event that
occurs when a selected item changes. So what I have to do is create a
new type of combo box which does nothing other than overriding that
function OnSelectionChanges( ... or whatever its called, im not really
sure) ?

That makes no sense because there is no need to make 10 or 20 more
combobox classes like ComboBox1, ComboBox2, ComboBoxMe, ComboBoxYou etc
etc.. just to create my custom events.


On 5/3/05, NuclearFriend [EMAIL PROTECTED] wrote:
 --
 [ Picked text/plain from multipart/alternative ] As long as you
 understand because I think you've lost me. :p

 On 5/4/05, Heritage [EMAIL PROTECTED] wrote:
 
  The only thing I can see of doing is making a few panels that are
  specifically for events for each vgui menu I make, and then adding
  this
 
  my_button_or_checkbox_orwhatever-AddActionSignalTarget(EventPanel);
  then i write an OnCommand for EvenPanel to catch em.
 
  Just seems weird that panels are also used to receive events.
anyway..
  I'll stop my spamming now. sorry.
 
 
  On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
   If i have a button, on a panel or frame, and i click it, then that

   panel has to be a pseudo panel that I made up like my_ panel
   which is derived from panel and then I override the OnCommand to
   intercept the event? Seems like a total waste. If I have to do
   that for every panel/frame/whatever then forget it
  
   that makes no sense.
   How do i add an action listener thing like in hl1?
  
  
   On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
But you still have to overwrite a vgui panel or frame or
something. in order to get at OnCommand..
   
in C#, i can just add listeners, and in hl1, i was able to do
similar things. I don't want nor need to make another vgui
class. I just want a custom listener.
   
   
On 5/3/05, Heritage [EMAIL PROTECTED] wrote:
 Oh I get it, thanks

 On 4/29/05, NuclearFriend [EMAIL PROTECTED] wrote:
  --
  [ Picked text/plain from multipart/alternative ] In
  CTextWindow, look at how the button m_pOk is declared and
  then
  how
  OnCommand recieves the button command..
 
  On 4/29/05, Heritage [EMAIL PROTECTED] wrote:
  
   I'd like to subscribe to an event such as a button click,
   im
  having
   kinda of a hard to understanding how to do this. I read
   thu the documentation but its still unclear to me. I dont
   want to derive
  a new
   button class just to overwrite OnClick or OnCommand or
  OnWhatever, I
   just need to subscribe to that event. I'm having a hard
   time
  finding
   examples, or maybe im looking in the wrong places, or
   maybe this
  is
   not the way it works?
  
   ___
   To unsubscribe, edit your list preferences, or view the
   list
  archives,
   please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders
  
  
 
  --
  Programmer for RnL
  www.resistanceandliberation.comhttp://www.resistanceandlibe
  ration.com
  http://www.resistanceandliberation.com
  --
 
  ___
  To unsubscribe, edit your list preferences, or view the list
  archives, please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 

   
  
 
  ___
  To unsubscribe, edit your list preferences, or view the list
  archives, please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 

 --
 Programmer for RnL
 www.resistanceandliberation.com
 http://www.resistanceandliberation.com
 --

 ___
 To unsubscribe, edit your list preferences, or view the list archives,
please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


___
To unsubscribe, edit your list preferences, or view the list archives, please

Re: [hlcoders] vgui event question?

2005-04-29 Thread NuclearFriend
--
[ Picked text/plain from multipart/alternative ]
In CTextWindow, look at how the button m_pOk is declared and then how
OnCommand recieves the button command..

On 4/29/05, Heritage [EMAIL PROTECTED] wrote:

 I'd like to subscribe to an event such as a button click, im having
 kinda of a hard to understanding how to do this. I read thu the
 documentation but its still unclear to me. I dont want to derive a new
 button class just to overwrite OnClick or OnCommand or OnWhatever, I
 just need to subscribe to that event. I'm having a hard time finding
 examples, or maybe im looking in the wrong places, or maybe this is
 not the way it works?

 ___
 To unsubscribe, edit your list preferences, or view the list archives,
 please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders




--
Programmer for RnL
www.resistanceandliberation.com http://www.resistanceandliberation.com
--

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders