About Store Forum Documentation Contact



Post Reply 
Get value of ComboBox[Solved]
Author Message
Seba Offline
Member

Post: #1
Get value of ComboBox[Solved]
I make struct:
Quote:struct OptionsMenu
{
GuiObjs OmGui_Objs;
Window *OmWindow;
Button *OmBack;
ComboBox *CbResolution,*CbShadows,*CbShadowsQ,*CbTextureQ,*CbWorldQ,*CbAntialiasing;
CheckBox *CbFullScreen;
Slider *SGamma;
void create();
void toGui ();
void toggle();
void update();
static void Back(Ptr);
static void Shadows(Ptr);
}extern Om;

Then I want to use Back(Ptr) to get value of CbShadows combox but I can't I have only errors.
Quote:void OptionsMenu::Shadows(Ptr)
{
Int num=Om.CbShadows->operator();
options.setShd(num);
}
void OptionsMenu::Shadows(Ptr)
{
Int num=Om.CbShadows();
options.setShd(num);
}
CbShadows is a pointer, so I don't know how tu use operator() to get it work.
(This post was last modified: 04-16-2011 10:27 AM by Seba.)
04-16-2011 09:07 AM
Find all posts by this user Quote this message in a reply
NxShape Offline
Member

Post: #2
RE: Get value of ComboBox
Int num=Om.CbShadows->operator()();
04-16-2011 09:36 AM
Find all posts by this user Quote this message in a reply
Seba Offline
Member

Post: #3
RE: Get value of ComboBox
Thanks it works now.
04-16-2011 10:27 AM
Find all posts by this user Quote this message in a reply
Post Reply