This commit is contained in:
parent
45686c5885
commit
dbd7d3cf31
8 changed files with 171 additions and 67 deletions
|
@ -53,6 +53,8 @@ eng=OPTIONS
|
||||||
|
|
||||||
[STR__FRONTEND__CROSS_TO_SELECT]
|
[STR__FRONTEND__CROSS_TO_SELECT]
|
||||||
eng=Select
|
eng=Select
|
||||||
|
[STR__FRONTEND__ARROWS_TO_ADJUST]
|
||||||
|
eng=Adjust
|
||||||
[STR__FRONTEND__TRIANGLE_TO_GO_BACK]
|
[STR__FRONTEND__TRIANGLE_TO_GO_BACK]
|
||||||
eng=Back
|
eng=Back
|
||||||
|
|
||||||
|
|
|
@ -197,6 +197,17 @@ int CFrontEndOptions::s_loadModeTextIds[LOADMODE__COUNT]=
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ID_SCREEN_X_SLIDER=10,
|
||||||
|
ID_SCREEN_Y_SLIDER,
|
||||||
|
ID_SOUND_BGM_SLIDER,
|
||||||
|
ID_SOUND_SFX_SLIDER,
|
||||||
|
ID_SOUND_SPEECH_SLIDER,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
|
@ -387,25 +398,30 @@ void CFrontEndOptions::init()
|
||||||
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SCREEN],
|
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SCREEN],
|
||||||
X_BORDER,Y_BORDER,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
X_BORDER,Y_BORDER,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
||||||
STR__FRONTEND__HORIZONTAL_POSITION,
|
STR__FRONTEND__HORIZONTAL_POSITION,
|
||||||
&m_screenXOff,0,64);
|
&m_screenXOff,0,64,
|
||||||
|
ID_SCREEN_X_SLIDER);
|
||||||
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SCREEN],
|
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SCREEN],
|
||||||
X_BORDER,Y_BORDER+40,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
X_BORDER,Y_BORDER+40,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
||||||
STR__FRONTEND__VERTICAL_POSITION,
|
STR__FRONTEND__VERTICAL_POSITION,
|
||||||
&m_screenYOff,0,32);
|
&m_screenYOff,0,32,
|
||||||
|
ID_SCREEN_Y_SLIDER);
|
||||||
|
|
||||||
// Populate SOUND menu
|
// Populate SOUND menu
|
||||||
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SOUND],
|
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SOUND],
|
||||||
X_BORDER,Y_BORDER,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
X_BORDER,Y_BORDER,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
||||||
STR__FRONTEND__BGM,
|
STR__FRONTEND__BGM,
|
||||||
&m_bgmVolume,CSoundMediator::MIN_VOLUME,CSoundMediator::MAX_VOLUME);
|
&m_bgmVolume,CSoundMediator::MIN_VOLUME,CSoundMediator::MAX_VOLUME,
|
||||||
|
ID_SOUND_BGM_SLIDER);
|
||||||
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SOUND],
|
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SOUND],
|
||||||
X_BORDER,Y_BORDER+35,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
X_BORDER,Y_BORDER+35,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
||||||
STR__FRONTEND__SFX,
|
STR__FRONTEND__SFX,
|
||||||
&m_sfxVolume,CSoundMediator::MIN_VOLUME,CSoundMediator::MAX_VOLUME);
|
&m_sfxVolume,CSoundMediator::MIN_VOLUME,CSoundMediator::MAX_VOLUME,
|
||||||
|
ID_SOUND_SFX_SLIDER);
|
||||||
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SOUND],
|
CGUIFactory::createSliderButtonFrame(m_modeMenus[MODE__SOUND],
|
||||||
X_BORDER,Y_BORDER+70,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
X_BORDER,Y_BORDER+70,OPTIONS_FRAME_W-(X_BORDER*2),35,
|
||||||
STR__FRONTEND__SPEECH,
|
STR__FRONTEND__SPEECH,
|
||||||
&m_speechVolume,CSoundMediator::MIN_VOLUME,CSoundMediator::MAX_VOLUME);
|
&m_speechVolume,CSoundMediator::MIN_VOLUME,CSoundMediator::MAX_VOLUME,
|
||||||
|
ID_SOUND_SPEECH_SLIDER);
|
||||||
|
|
||||||
// Memcard menu
|
// Memcard menu
|
||||||
m_loadTextBox=new ("textbox") CGUITextBox();
|
m_loadTextBox=new ("textbox") CGUITextBox();
|
||||||
|
@ -532,7 +548,6 @@ void CFrontEndOptions::render()
|
||||||
{
|
{
|
||||||
POLY_G4 *g4;
|
POLY_G4 *g4;
|
||||||
int rgb[3];
|
int rgb[3];
|
||||||
int renderButtons=true;
|
|
||||||
|
|
||||||
rh+=rspeed;
|
rh+=rspeed;
|
||||||
rh&=4095;
|
rh&=4095;
|
||||||
|
@ -553,35 +568,7 @@ rh&=4095;
|
||||||
m_background->render();
|
m_background->render();
|
||||||
|
|
||||||
// Button prompts
|
// Button prompts
|
||||||
switch(m_mode)
|
|
||||||
{
|
|
||||||
case MODE__OPTIONS:
|
|
||||||
case MODE__CONTROL:
|
|
||||||
case MODE__SCREEN:
|
|
||||||
case MODE__SOUND:
|
|
||||||
break;
|
|
||||||
case MODE__LOAD:
|
|
||||||
switch(m_loadMode)
|
|
||||||
{
|
|
||||||
case LOADMODE__INIT:
|
|
||||||
case LOADMODE__CHECKING:
|
|
||||||
case LOADMODE__LOADING:
|
|
||||||
renderButtons=false;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOADMODE__UNFORMATTED:
|
|
||||||
case LOADMODE__NODATA:
|
|
||||||
case LOADMODE__NOCARD:
|
|
||||||
case LOADMODE__CONFIRMLOAD:
|
|
||||||
case LOADMODE__LOADOK:
|
|
||||||
case LOADMODE__LOADERROR:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(renderButtons)
|
|
||||||
{
|
|
||||||
renderButtonPrompts();
|
renderButtonPrompts();
|
||||||
}
|
|
||||||
|
|
||||||
// UI
|
// UI
|
||||||
if(m_mode==MODE__LOAD)
|
if(m_mode==MODE__LOAD)
|
||||||
|
@ -974,22 +961,103 @@ void CFrontEndOptions::setLoadMode(int _newMode)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CFrontEndOptions::renderButtonPrompts()
|
void CFrontEndOptions::renderButtonPrompts()
|
||||||
{
|
{
|
||||||
|
CGUIObject::GUIId id;
|
||||||
|
int renderCross=false;
|
||||||
|
int renderArrows=false;
|
||||||
|
int renderTriangle=false;
|
||||||
sFrameHdr *fh1,*fh2;
|
sFrameHdr *fh1,*fh2;
|
||||||
int x,y,width;
|
int x,y,width;
|
||||||
|
|
||||||
|
|
||||||
|
// What shall we draw today?
|
||||||
|
switch(m_mode)
|
||||||
|
{
|
||||||
|
case MODE__OPTIONS:
|
||||||
|
case MODE__CONTROL:
|
||||||
|
renderCross=true;
|
||||||
|
renderTriangle=true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MODE__SCREEN:
|
||||||
|
id=m_modeMenus[MODE__SCREEN]->getIdOfSelectedItem();
|
||||||
|
if(id==ID_SCREEN_X_SLIDER||id==ID_SCREEN_Y_SLIDER)
|
||||||
|
{
|
||||||
|
renderArrows=true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
renderCross=true;
|
||||||
|
}
|
||||||
|
renderTriangle=true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MODE__SOUND:
|
||||||
|
id=m_modeMenus[MODE__SOUND]->getIdOfSelectedItem();
|
||||||
|
if(id==ID_SOUND_BGM_SLIDER||id==ID_SOUND_SFX_SLIDER||id==ID_SOUND_SPEECH_SLIDER)
|
||||||
|
{
|
||||||
|
renderArrows=true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
renderCross=true;
|
||||||
|
}
|
||||||
|
renderTriangle=true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MODE__LOAD:
|
||||||
|
switch(m_loadMode)
|
||||||
|
{
|
||||||
|
case LOADMODE__INIT:
|
||||||
|
case LOADMODE__CHECKING:
|
||||||
|
case LOADMODE__LOADING:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LOADMODE__UNFORMATTED:
|
||||||
|
case LOADMODE__NODATA:
|
||||||
|
case LOADMODE__NOCARD:
|
||||||
|
case LOADMODE__CONFIRMLOAD:
|
||||||
|
case LOADMODE__LOADOK:
|
||||||
|
case LOADMODE__LOADERROR:
|
||||||
|
renderCross=true;
|
||||||
|
renderTriangle=true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(renderCross)
|
||||||
|
{
|
||||||
fh1=m_spriteBank->getFrameHeader(FRM__BUTX);
|
fh1=m_spriteBank->getFrameHeader(FRM__BUTX);
|
||||||
width=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(STR__FRONTEND__CROSS_TO_SELECT);
|
width=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(STR__FRONTEND__CROSS_TO_SELECT);
|
||||||
x=128-(width/2);
|
x=128-(width/2);
|
||||||
m_spriteBank->printFT4(fh1,x,OPTIONS_INSTRUCTIONS_Y_POS+OPTIONS_INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
m_spriteBank->printFT4(fh1,x,OPTIONS_INSTRUCTIONS_Y_POS+OPTIONS_INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
||||||
x+=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
x+=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
||||||
m_fontBank->print(x,OPTIONS_INSTRUCTIONS_Y_POS,STR__FRONTEND__CROSS_TO_SELECT);
|
m_fontBank->print(x,OPTIONS_INSTRUCTIONS_Y_POS,STR__FRONTEND__CROSS_TO_SELECT);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(renderArrows)
|
||||||
|
{
|
||||||
|
fh1=m_spriteBank->getFrameHeader(FRM__BUTL);
|
||||||
|
fh2=m_spriteBank->getFrameHeader(FRM__BUTR);
|
||||||
|
width=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS+fh2->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(STR__FRONTEND__ARROWS_TO_ADJUST);
|
||||||
|
x=128-(width/2);
|
||||||
|
m_spriteBank->printFT4(fh1,x,OPTIONS_INSTRUCTIONS_Y_POS+OPTIONS_INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
||||||
|
x+=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS;
|
||||||
|
m_spriteBank->printFT4(fh2,x,OPTIONS_INSTRUCTIONS_Y_POS+OPTIONS_INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
||||||
|
x+=fh2->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
||||||
|
m_fontBank->print(x,OPTIONS_INSTRUCTIONS_Y_POS,STR__FRONTEND__ARROWS_TO_ADJUST);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(renderTriangle)
|
||||||
|
{
|
||||||
fh1=m_spriteBank->getFrameHeader(FRM__BUTT);
|
fh1=m_spriteBank->getFrameHeader(FRM__BUTT);
|
||||||
width=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(STR__FRONTEND__TRIANGLE_TO_GO_BACK);
|
width=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(STR__FRONTEND__TRIANGLE_TO_GO_BACK);
|
||||||
x=256+128-(width/2);
|
x=256+128-(width/2);
|
||||||
m_spriteBank->printFT4(fh1,x,OPTIONS_INSTRUCTIONS_Y_POS+OPTIONS_INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
m_spriteBank->printFT4(fh1,x,OPTIONS_INSTRUCTIONS_Y_POS+OPTIONS_INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
||||||
x+=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
x+=fh1->W+OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
||||||
m_fontBank->print(x,OPTIONS_INSTRUCTIONS_Y_POS,STR__FRONTEND__TRIANGLE_TO_GO_BACK);
|
m_fontBank->print(x,OPTIONS_INSTRUCTIONS_Y_POS,STR__FRONTEND__TRIANGLE_TO_GO_BACK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -124,6 +124,7 @@ private:
|
||||||
X_BORDER=30,
|
X_BORDER=30,
|
||||||
Y_BORDER=10,
|
Y_BORDER=10,
|
||||||
OPTIONS_INSTRUCTIONS_Y_POS=185,
|
OPTIONS_INSTRUCTIONS_Y_POS=185,
|
||||||
|
OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS=5,
|
||||||
OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT=10,
|
OPTIONS_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT=10,
|
||||||
OPTIONS_INSTRUCTIONS_BUTTON_Y_OFFSET=4,
|
OPTIONS_INSTRUCTIONS_BUTTON_Y_OFFSET=4,
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,10 +18,6 @@
|
||||||
|
|
||||||
#include "gui\gfactory.h"
|
#include "gui\gfactory.h"
|
||||||
|
|
||||||
#ifndef __GUI_GUI_H__
|
|
||||||
#include "gui\gui.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __GUI_GTEXTBOX_H__
|
#ifndef __GUI_GTEXTBOX_H__
|
||||||
#include "gui\gtextbox.h"
|
#include "gui\gtextbox.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -74,14 +70,15 @@
|
||||||
CGUIObject *CGUIFactory::createValueButtonFrame(class CGUIObject *_parent,
|
CGUIObject *CGUIFactory::createValueButtonFrame(class CGUIObject *_parent,
|
||||||
int _x,int _y,int _w,int _h,
|
int _x,int _y,int _w,int _h,
|
||||||
int _textId,
|
int _textId,
|
||||||
int *_target,int _value)
|
int *_target,int _value,
|
||||||
|
CGUIObject::GUIId _id)
|
||||||
{
|
{
|
||||||
CGUIGroupFrame *fr;
|
CGUIGroupFrame *fr;
|
||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
CGUIValueButton *vb;
|
CGUIValueButton *vb;
|
||||||
|
|
||||||
fr=new ("frame") CGUIGroupFrame();
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
fr->init(_parent);
|
fr->init(_parent,_id);
|
||||||
fr->setObjectXYWH(_x,_y,_w,_h);
|
fr->setObjectXYWH(_x,_y,_w,_h);
|
||||||
tb=new ("textbox") CGUITextBox();
|
tb=new ("textbox") CGUITextBox();
|
||||||
tb->init(fr);
|
tb->init(fr);
|
||||||
|
@ -104,7 +101,8 @@ CGUIObject *CGUIFactory::createValueButtonFrame(class CGUIObject *_parent,
|
||||||
CGUIObject *CGUIFactory::createCycleButtonFrame(class CGUIObject *_parent,
|
CGUIObject *CGUIFactory::createCycleButtonFrame(class CGUIObject *_parent,
|
||||||
int _x,int _y,int _w,int _h,
|
int _x,int _y,int _w,int _h,
|
||||||
int _textId,
|
int _textId,
|
||||||
int *_target,int *_data,CGUITextReadout::TextReadoutData *_readoutData)
|
int *_target,int *_data,CGUITextReadout::TextReadoutData *_readoutData,
|
||||||
|
CGUIObject::GUIId _id)
|
||||||
{
|
{
|
||||||
CGUIGroupFrame *fr;
|
CGUIGroupFrame *fr;
|
||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
|
@ -112,7 +110,7 @@ CGUIObject *CGUIFactory::createCycleButtonFrame(class CGUIObject *_parent,
|
||||||
CGUITextReadout *tr;
|
CGUITextReadout *tr;
|
||||||
|
|
||||||
fr=new ("frame") CGUIGroupFrame();
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
fr->init(_parent);
|
fr->init(_parent,_id);
|
||||||
fr->setObjectXYWH(_x,_y,_w,_h);
|
fr->setObjectXYWH(_x,_y,_w,_h);
|
||||||
tb=new ("textbox") CGUITextBox();
|
tb=new ("textbox") CGUITextBox();
|
||||||
tb->init(fr);
|
tb->init(fr);
|
||||||
|
@ -140,7 +138,8 @@ CGUIObject *CGUIFactory::createCycleButtonFrame(class CGUIObject *_parent,
|
||||||
CGUIObject *CGUIFactory::createSliderButtonFrame(class CGUIObject *_parent,
|
CGUIObject *CGUIFactory::createSliderButtonFrame(class CGUIObject *_parent,
|
||||||
int _x,int _y,int _w,int _h,
|
int _x,int _y,int _w,int _h,
|
||||||
int _textId,
|
int _textId,
|
||||||
int *_target,int _min,int _max)
|
int *_target,int _min,int _max,
|
||||||
|
CGUIObject::GUIId _id)
|
||||||
{
|
{
|
||||||
CGUIGroupFrame *fr;
|
CGUIGroupFrame *fr;
|
||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
|
@ -148,7 +147,7 @@ CGUIObject *CGUIFactory::createSliderButtonFrame(class CGUIObject *_parent,
|
||||||
CGUIBarReadout *br;
|
CGUIBarReadout *br;
|
||||||
|
|
||||||
fr=new ("frame") CGUIGroupFrame();
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
fr->init(_parent);
|
fr->init(_parent,_id);
|
||||||
fr->setObjectXYWH(_x,_y,_w,_h);
|
fr->setObjectXYWH(_x,_y,_w,_h);
|
||||||
tb=new ("textbox") CGUITextBox();
|
tb=new ("textbox") CGUITextBox();
|
||||||
tb->init(fr);
|
tb->init(fr);
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
Includes
|
Includes
|
||||||
-------- */
|
-------- */
|
||||||
|
|
||||||
|
#ifndef __GUI_GUI_H__
|
||||||
|
#include "gui\gui.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __GUI_GREADOUT_H__
|
#ifndef __GUI_GREADOUT_H__
|
||||||
#include "gui\greadout.h"
|
#include "gui\greadout.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,22 +44,25 @@ class CGUIFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Creates a frame containing a value button with text label
|
// Creates a frame containing a value button with text label
|
||||||
static CGUIObject *createValueButtonFrame(class CGUIObject *_parent,
|
static CGUIObject *createValueButtonFrame(CGUIObject *_parent,
|
||||||
int _x,int _y,int _w,int _h,
|
int _x,int _y,int _w,int _h,
|
||||||
int _textId,
|
int _textId,
|
||||||
int *_target,int _value);
|
int *_target,int _value,
|
||||||
|
CGUIObject::GUIId _id=CGUIObject::noId);
|
||||||
|
|
||||||
// Creates a frame containing a cycle button, text readout and text label
|
// Creates a frame containing a cycle button, text readout and text label
|
||||||
static CGUIObject *createCycleButtonFrame(class CGUIObject *_parent,
|
static CGUIObject *createCycleButtonFrame(CGUIObject *_parent,
|
||||||
int _x,int _y,int _w,int _h,
|
int _x,int _y,int _w,int _h,
|
||||||
int _textId,
|
int _textId,
|
||||||
int *_target,int *_data,CGUITextReadout::TextReadoutData *_readoutData);
|
int *_target,int *_data,CGUITextReadout::TextReadoutData *_readoutData,
|
||||||
|
CGUIObject::GUIId _id=CGUIObject::noId);
|
||||||
|
|
||||||
// Creates a frame containing a slider button, readout and text label
|
// Creates a frame containing a slider button, readout and text label
|
||||||
static CGUIObject *createSliderButtonFrame(class CGUIObject *_parent,
|
static CGUIObject *createSliderButtonFrame(CGUIObject *_parent,
|
||||||
int _x,int _y,int _w,int _h,
|
int _x,int _y,int _w,int _h,
|
||||||
int _textId,
|
int _textId,
|
||||||
int *_target,int _min,int _max);
|
int *_target,int _min,int _max,
|
||||||
|
CGUIObject::GUIId _id=CGUIObject::noId);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -282,6 +282,31 @@ void CGUIControlFrame::selectNextItem()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
CGUIObject::GUIId CGUIControlFrame::getIdOfSelectedItem()
|
||||||
|
{
|
||||||
|
CGUIObject *pGUI;
|
||||||
|
|
||||||
|
pGUI=getChild();
|
||||||
|
if(pGUI)
|
||||||
|
{
|
||||||
|
while(!pGUI->isSelected())
|
||||||
|
{
|
||||||
|
ASSERT(pGUI);
|
||||||
|
pGUI=pGUI->getNext();
|
||||||
|
}
|
||||||
|
return pGUI->getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGUIObject::noId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
|
|
|
@ -61,6 +61,7 @@ public:
|
||||||
void selectPreviousItem();
|
void selectPreviousItem();
|
||||||
void selectNextItem();
|
void selectNextItem();
|
||||||
|
|
||||||
|
GUIId getIdOfSelectedItem();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GUI_FLAGS getInitialFlags() {return FLAG_DRAWBORDER;}
|
GUI_FLAGS getInitialFlags() {return FLAG_DRAWBORDER;}
|
||||||
|
|
|
@ -95,8 +95,9 @@ public:
|
||||||
|
|
||||||
int getOt() {return 0;}
|
int getOt() {return 0;}
|
||||||
|
|
||||||
// PKG - Do we really need ids!?
|
// PKG - Do we really need ids!?
|
||||||
int getId() {return m_id;}
|
// Yes! =)
|
||||||
|
int getId() {return m_id;}
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue