This commit is contained in:
parent
2ea6dd011a
commit
0cf03a8b87
@ -461,7 +461,7 @@ eng=QUIT
|
|||||||
[STR__PAUSE_MENU__CONFIRM_QUIT]
|
[STR__PAUSE_MENU__CONFIRM_QUIT]
|
||||||
eng=Confirm quit?
|
eng=Confirm quit?
|
||||||
[STR__PAUSE_MENU__VIBRATION]
|
[STR__PAUSE_MENU__VIBRATION]
|
||||||
eng=VIBRATION
|
eng=VIBRATION:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,6 +39,10 @@
|
|||||||
#include "gui\gtextbox.h"
|
#include "gui\gtextbox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GUI_GBUTTON_H__
|
||||||
|
#include "gui\gbutton.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __MEMORY_HEADER__
|
#ifndef __MEMORY_HEADER__
|
||||||
#include "mem\memory.h"
|
#include "mem\memory.h"
|
||||||
#endif
|
#endif
|
||||||
@ -59,6 +63,10 @@
|
|||||||
#include "pad/pads.h"
|
#include "pad/pads.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PAD_VIBE_H__
|
||||||
|
#include "pad\vibe.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
@ -99,18 +107,20 @@
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
static const int FRAME_WIDTH =352;
|
static const int FRAME_WIDTH =352;
|
||||||
static const int FRAME_HEIGHT =160-64;
|
static const int FRAME_HEIGHT =160-64;
|
||||||
static const int TEXT_BOX_WIDTH =300;
|
static const int TEXT_BOX_WIDTH =200;
|
||||||
static const int TEXT_BOX_HEIGHT =20;
|
static const int TEXT_BOX_HEIGHT =20;
|
||||||
static const int TEXT_SPACING =13;
|
static const int TEXT_SPACING =16;
|
||||||
extern int newmode;
|
extern int newmode;
|
||||||
|
|
||||||
extern int invincibleSponge;
|
extern int invincibleSponge;
|
||||||
int inv_data[]={0,1,-1};
|
int inv_data[]={0,1,-1};
|
||||||
static CGUITextReadout::TextReadoutData inv_readoutdata[2]={{0,STR__OFF},{1,STR__ON}};
|
static CGUITextReadout::TextReadoutData s_yesNoReadoutData[2]={{0,STR__OFF},{1,STR__ON}};
|
||||||
|
static CGUIGroupFrame *s_vibFrame;
|
||||||
|
|
||||||
|
|
||||||
void CPauseMenu::init()
|
void CPauseMenu::init()
|
||||||
{
|
{
|
||||||
int xpos;
|
int ypos;
|
||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
|
|
||||||
|
|
||||||
@ -120,67 +130,93 @@ void CPauseMenu::init()
|
|||||||
m_pauseGuiFrame->setObjectXYWH((INGAME_SCREENW-FRAME_WIDTH)/2,(INGAME_SCREENH-FRAME_HEIGHT)/2,FRAME_WIDTH,FRAME_HEIGHT);
|
m_pauseGuiFrame->setObjectXYWH((INGAME_SCREENW-FRAME_WIDTH)/2,(INGAME_SCREENH-FRAME_HEIGHT)/2,FRAME_WIDTH,FRAME_HEIGHT);
|
||||||
m_pauseGuiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
|
m_pauseGuiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
|
||||||
|
|
||||||
xpos=TEXT_SPACING/2;
|
ypos=TEXT_SPACING/3;
|
||||||
tb=new ("textbox") CGUITextBox();
|
tb=new ("textbox") CGUITextBox();
|
||||||
tb->init(m_pauseGuiFrame);
|
tb->init(m_pauseGuiFrame);
|
||||||
tb->setObjectXYWH((FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT);
|
tb->setObjectXYWH((FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT);
|
||||||
tb->setText(STR__PAUSE_MENU__GAME_PAUSED);
|
tb->setText(STR__PAUSE_MENU__GAME_PAUSED);
|
||||||
xpos+=TEXT_SPACING*2;
|
ypos+=TEXT_SPACING*2;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__PAUSE_MENU__CONTINUE,
|
STR__PAUSE_MENU__CONTINUE,
|
||||||
&m_responseFlag,RESPONSE__CONTINUE);
|
&m_responseFlag,RESPONSE__CONTINUE);
|
||||||
xpos+=TEXT_SPACING*2;
|
ypos+=TEXT_SPACING;
|
||||||
|
{
|
||||||
|
// Vibration toggle
|
||||||
|
CGUIGroupFrame *fr;
|
||||||
|
CGUITextBox *tb;
|
||||||
|
CGUIValueButton *vb;
|
||||||
|
CGUITextReadout *tr;
|
||||||
|
|
||||||
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
|
fr->init(m_pauseGuiFrame);
|
||||||
|
fr->setObjectXYWH((FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT);
|
||||||
|
tb=new ("textbox") CGUITextBox();
|
||||||
|
tb->init(fr);
|
||||||
|
tb->setObjectXYWH(0,0,(TEXT_BOX_WIDTH/3)*2,TEXT_BOX_HEIGHT);
|
||||||
|
tb->setText(STR__PAUSE_MENU__VIBRATION);
|
||||||
|
vb=new ("valuebutton") CGUIValueButton();
|
||||||
|
vb->init(fr);
|
||||||
|
vb->setButtonTarget(&m_vibrationChangeFlag);
|
||||||
|
vb->setButtonValue(true);
|
||||||
|
tr=new ("textreadout") CGUITextReadout();
|
||||||
|
tr->init(fr);
|
||||||
|
tr->setObjectXYWH((TEXT_BOX_WIDTH/3)*2,0,(TEXT_BOX_WIDTH/3)*1,TEXT_BOX_HEIGHT);
|
||||||
|
tr->setReadoutTarget(&m_vibrationState);
|
||||||
|
tr->setReadoutData(s_yesNoReadoutData);
|
||||||
|
s_vibFrame=fr;
|
||||||
|
}
|
||||||
|
ypos+=TEXT_SPACING;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__PAUSE_MENU__QUIT,
|
STR__PAUSE_MENU__QUIT,
|
||||||
&m_responseFlag,RESPONSE__QUIT);
|
&m_responseFlag,RESPONSE__QUIT);
|
||||||
|
|
||||||
#ifdef __VERSION_DEBUG__
|
#ifdef __VERSION_DEBUG__o
|
||||||
xpos+=8;
|
ypos+=8;
|
||||||
CGUIFactory::createCycleButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createCycleButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__INVINCIBILE_SPONGEBOB,
|
STR__INVINCIBILE_SPONGEBOB,
|
||||||
&invincibleSponge,inv_data,inv_readoutdata);
|
&invincibleSponge,inv_data,s_yesNoReadoutData);
|
||||||
xpos+=TEXT_SPACING;
|
ypos+=TEXT_SPACING;
|
||||||
#if defined (__USER_paul__) || defined (__USER_charles__)
|
#if defined (__USER_paul__) || defined (__USER_charles__)
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__BASICUNARMED_MODE,
|
STR__DEBUG__BASICUNARMED_MODE,
|
||||||
&newmode,PLAYER_MODE_BASICUNARMED);
|
&newmode,PLAYER_MODE_BASICUNARMED);
|
||||||
xpos+=8;
|
ypos+=8;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__FULLUNARMED_MODE,
|
STR__DEBUG__FULLUNARMED_MODE,
|
||||||
&newmode,PLAYER_MODE_FULLUNARMED);
|
&newmode,PLAYER_MODE_FULLUNARMED);
|
||||||
xpos+=8;
|
ypos+=8;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__BALLOON_MODE,
|
STR__DEBUG__BALLOON_MODE,
|
||||||
&newmode,PLAYER_MODE_BALLOON);
|
&newmode,PLAYER_MODE_BALLOON);
|
||||||
xpos+=8;
|
ypos+=8;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__BUBBLEMIXTURE_MODE,
|
STR__DEBUG__BUBBLEMIXTURE_MODE,
|
||||||
&newmode,PLAYER_MODE_BUBBLE_MIXTURE);
|
&newmode,PLAYER_MODE_BUBBLE_MIXTURE);
|
||||||
xpos+=8;
|
ypos+=8;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__NET_MODE,
|
STR__DEBUG__NET_MODE,
|
||||||
&newmode,PLAYER_MODE_NET);
|
&newmode,PLAYER_MODE_NET);
|
||||||
xpos+=8;
|
ypos+=8;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__CORALBLOWER_MODE,
|
STR__DEBUG__CORALBLOWER_MODE,
|
||||||
&newmode,PLAYER_MODE_CORALBLOWER);
|
&newmode,PLAYER_MODE_CORALBLOWER);
|
||||||
xpos+=8;
|
ypos+=8;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__JELLYLAUNCHER_MODE,
|
STR__DEBUG__JELLYLAUNCHER_MODE,
|
||||||
&newmode,PLAYER_MODE_JELLY_LAUNCHER);
|
&newmode,PLAYER_MODE_JELLY_LAUNCHER);
|
||||||
xpos+=8;
|
ypos+=8;
|
||||||
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_pauseGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__DEAD_MODE,
|
STR__DEBUG__DEAD_MODE,
|
||||||
&newmode,PLAYER_MODE_DEAD);
|
&newmode,PLAYER_MODE_DEAD);
|
||||||
#endif
|
#endif
|
||||||
@ -193,19 +229,19 @@ void CPauseMenu::init()
|
|||||||
m_confirmQuitGuiFrame->setObjectXYWH((INGAME_SCREENW-FRAME_WIDTH)/2,(INGAME_SCREENH-FRAME_HEIGHT)/2,FRAME_WIDTH,FRAME_HEIGHT);
|
m_confirmQuitGuiFrame->setObjectXYWH((INGAME_SCREENW-FRAME_WIDTH)/2,(INGAME_SCREENH-FRAME_HEIGHT)/2,FRAME_WIDTH,FRAME_HEIGHT);
|
||||||
m_confirmQuitGuiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
|
m_confirmQuitGuiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
|
||||||
|
|
||||||
xpos=TEXT_SPACING/2;
|
ypos=TEXT_SPACING/3;
|
||||||
tb=new ("textbox") CGUITextBox();
|
tb=new ("textbox") CGUITextBox();
|
||||||
tb->init(m_confirmQuitGuiFrame);
|
tb->init(m_confirmQuitGuiFrame);
|
||||||
tb->setObjectXYWH((FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT);
|
tb->setObjectXYWH((FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT);
|
||||||
tb->setText(STR__PAUSE_MENU__CONFIRM_QUIT);
|
tb->setText(STR__PAUSE_MENU__CONFIRM_QUIT);
|
||||||
xpos+=TEXT_SPACING*2;
|
ypos+=TEXT_SPACING*2;
|
||||||
CGUIFactory::createValueButtonFrame(m_confirmQuitGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_confirmQuitGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__NO,
|
STR__NO,
|
||||||
&m_responseFlag,RESPONSE__CONFIRM_QUIT_NO);
|
&m_responseFlag,RESPONSE__CONFIRM_QUIT_NO);
|
||||||
xpos+=TEXT_SPACING*2;
|
ypos+=TEXT_SPACING;
|
||||||
CGUIFactory::createValueButtonFrame(m_confirmQuitGuiFrame,
|
CGUIFactory::createValueButtonFrame(m_confirmQuitGuiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,ypos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__YES,
|
STR__YES,
|
||||||
&m_responseFlag,RESPONSE__CONFIRM_QUIT_YES);
|
&m_responseFlag,RESPONSE__CONFIRM_QUIT_YES);
|
||||||
|
|
||||||
@ -244,7 +280,11 @@ void CPauseMenu::select()
|
|||||||
m_padDebounce=true;
|
m_padDebounce=true;
|
||||||
m_currentState=STATE__MAIN_MENU;
|
m_currentState=STATE__MAIN_MENU;
|
||||||
m_responseFlag=RESPONSE__WAITING;
|
m_responseFlag=RESPONSE__WAITING;
|
||||||
|
m_vibrationChangeFlag=false;
|
||||||
|
m_vibrationState=PadGetVibrationIsTurnedOn(0);
|
||||||
m_pauseGuiFrame->select();
|
m_pauseGuiFrame->select();
|
||||||
|
s_vibFrame->think(1); // This just makes sure that the readout reads correctly on the first frame
|
||||||
|
|
||||||
|
|
||||||
chapter=GameScene.getChapterNumber()-1;
|
chapter=GameScene.getChapterNumber()-1;
|
||||||
level=GameScene.getLevelNumber()-1;
|
level=GameScene.getLevelNumber()-1;
|
||||||
@ -303,6 +343,20 @@ void CPauseMenu::think(int _frames)
|
|||||||
switch(m_responseFlag)
|
switch(m_responseFlag)
|
||||||
{
|
{
|
||||||
case RESPONSE__WAITING:
|
case RESPONSE__WAITING:
|
||||||
|
if(m_vibrationChangeFlag)
|
||||||
|
{
|
||||||
|
m_vibrationState=PadGetVibrationIsTurnedOn(0)==true?false:true;
|
||||||
|
PadSetVibrationIsTurnedOn(0,m_vibrationState);
|
||||||
|
if(m_vibrationState)
|
||||||
|
{
|
||||||
|
CPadVibrationManager::setVibration(0,CPadVibrationManager::VIBE_MEDIUM);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CPadVibrationManager::stopAllVibration();
|
||||||
|
}
|
||||||
|
m_vibrationChangeFlag=false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RESPONSE__CONTINUE:
|
case RESPONSE__CONTINUE:
|
||||||
|
@ -67,6 +67,8 @@ private:
|
|||||||
int m_SpeechPlaying;
|
int m_SpeechPlaying;
|
||||||
int m_padDebounce;
|
int m_padDebounce;
|
||||||
int m_responseFlag;
|
int m_responseFlag;
|
||||||
|
int m_vibrationChangeFlag;
|
||||||
|
int m_vibrationState;
|
||||||
STATE m_currentState;
|
STATE m_currentState;
|
||||||
|
|
||||||
class CGUIControlFrame *m_pauseGuiFrame;
|
class CGUIControlFrame *m_pauseGuiFrame;
|
||||||
|
@ -79,7 +79,6 @@ void CGUIFactory::createValueButtonFrame(class CGUIObject *_parent,
|
|||||||
CGUIGroupFrame *fr;
|
CGUIGroupFrame *fr;
|
||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
CGUIValueButton *vb;
|
CGUIValueButton *vb;
|
||||||
int x,y,w,h;
|
|
||||||
|
|
||||||
fr=new ("frame") CGUIGroupFrame();
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
fr->init(_parent);
|
fr->init(_parent);
|
||||||
@ -92,11 +91,6 @@ void CGUIFactory::createValueButtonFrame(class CGUIObject *_parent,
|
|||||||
vb->init(fr);
|
vb->init(fr);
|
||||||
vb->setButtonTarget(_target);
|
vb->setButtonTarget(_target);
|
||||||
vb->setButtonValue(_value);
|
vb->setButtonValue(_value);
|
||||||
|
|
||||||
w=tb->getTextWidth();
|
|
||||||
h=tb->getTextHeight();
|
|
||||||
x=(_w-w)/2;
|
|
||||||
y=(_h-h)/2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -114,7 +108,6 @@ void CGUIFactory::createCycleButtonFrame(class CGUIObject *_parent,
|
|||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
CGUICycleButton *cb;
|
CGUICycleButton *cb;
|
||||||
CGUITextReadout *tr;
|
CGUITextReadout *tr;
|
||||||
int x,y,w,h;
|
|
||||||
|
|
||||||
fr=new ("frame") CGUIGroupFrame();
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
fr->init(_parent);
|
fr->init(_parent);
|
||||||
@ -132,11 +125,6 @@ void CGUIFactory::createCycleButtonFrame(class CGUIObject *_parent,
|
|||||||
tr->setObjectXYWH(0,(_h*2)/3,_w,(_h*1)/3);
|
tr->setObjectXYWH(0,(_h*2)/3,_w,(_h*1)/3);
|
||||||
tr->setReadoutTarget(_target);
|
tr->setReadoutTarget(_target);
|
||||||
tr->setReadoutData(_readoutData);
|
tr->setReadoutData(_readoutData);
|
||||||
|
|
||||||
w=tb->getTextWidth();
|
|
||||||
h=tb->getTextHeight();
|
|
||||||
x=(_w-w)/2;
|
|
||||||
y=(_h-h)/2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -154,7 +142,6 @@ void CGUIFactory::createSliderButtonFrame(class CGUIObject *_parent,
|
|||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
CGUISliderButton *sb;
|
CGUISliderButton *sb;
|
||||||
CGUIBarReadout *br;
|
CGUIBarReadout *br;
|
||||||
int x,y,w,h;
|
|
||||||
|
|
||||||
fr=new ("frame") CGUIGroupFrame();
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
fr->init(_parent);
|
fr->init(_parent);
|
||||||
@ -172,11 +159,6 @@ void CGUIFactory::createSliderButtonFrame(class CGUIObject *_parent,
|
|||||||
br->setObjectXYWH(0,(_h*2)/3,_w,(_h*1)/3);
|
br->setObjectXYWH(0,(_h*2)/3,_w,(_h*1)/3);
|
||||||
br->setReadoutTarget(_target);
|
br->setReadoutTarget(_target);
|
||||||
br->setReadoutRange(_min,_max);
|
br->setReadoutRange(_min,_max);
|
||||||
|
|
||||||
w=tb->getTextWidth();
|
|
||||||
h=tb->getTextHeight();
|
|
||||||
x=(_w-w)/2;
|
|
||||||
y=(_h-h)/2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user