mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-10 07:39:39 +01:00
Add both A and 2 triggers to all buttons. That too way too long.
This commit is contained in:
parent
0a8cd661bb
commit
199829e44c
@ -404,7 +404,7 @@ class GuiElement
|
|||||||
//!Called constantly to redraw the element's tooltip
|
//!Called constantly to redraw the element's tooltip
|
||||||
virtual void DrawTooltip();
|
virtual void DrawTooltip();
|
||||||
protected:
|
protected:
|
||||||
GuiTrigger * trigger[2]; //!< GuiTriggers (input actions) that this element responds to
|
GuiTrigger * trigger[3]; //!< GuiTriggers (input actions) that this element responds to
|
||||||
UpdateCallback updateCB; //!< Callback function to call when this element is updated
|
UpdateCallback updateCB; //!< Callback function to call when this element is updated
|
||||||
GuiElement * parentElement; //!< Parent element
|
GuiElement * parentElement; //!< Parent element
|
||||||
int focus; //!< Element focus (-1 = focus disabled, 0 = not focused, 1 = focused)
|
int focus; //!< Element focus (-1 = focus disabled, 0 = not focused, 1 = focused)
|
||||||
@ -839,6 +839,7 @@ class GuiKeyboard : public GuiWindow
|
|||||||
GuiSound * keySoundOver;
|
GuiSound * keySoundOver;
|
||||||
GuiSound * keySoundClick;
|
GuiSound * keySoundClick;
|
||||||
GuiTrigger * trigA;
|
GuiTrigger * trigA;
|
||||||
|
GuiTrigger * trig2;
|
||||||
Key keys[4][11]; // two chars = less space than one pointer
|
Key keys[4][11]; // two chars = less space than one pointer
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -896,6 +897,7 @@ class GuiOptionBrowser : public GuiElement
|
|||||||
GuiSound * btnSoundOver;
|
GuiSound * btnSoundOver;
|
||||||
GuiSound * btnSoundClick;
|
GuiSound * btnSoundClick;
|
||||||
GuiTrigger * trigA;
|
GuiTrigger * trigA;
|
||||||
|
GuiTrigger * trig2;
|
||||||
|
|
||||||
bool listChanged;
|
bool listChanged;
|
||||||
};
|
};
|
||||||
@ -956,6 +958,7 @@ class GuiSaveBrowser : public GuiElement
|
|||||||
GuiSound * btnSoundOver;
|
GuiSound * btnSoundOver;
|
||||||
GuiSound * btnSoundClick;
|
GuiSound * btnSoundClick;
|
||||||
GuiTrigger * trigA;
|
GuiTrigger * trigA;
|
||||||
|
GuiTrigger * trig2;
|
||||||
|
|
||||||
bool saveBtnLastOver[SAVELISTSIZE];
|
bool saveBtnLastOver[SAVELISTSIZE];
|
||||||
};
|
};
|
||||||
@ -1009,6 +1012,7 @@ class GuiFileBrowser : public GuiElement
|
|||||||
GuiSound * btnSoundOver;
|
GuiSound * btnSoundOver;
|
||||||
GuiSound * btnSoundClick;
|
GuiSound * btnSoundClick;
|
||||||
GuiTrigger * trigA;
|
GuiTrigger * trigA;
|
||||||
|
GuiTrigger * trig2;
|
||||||
GuiTrigger * trigHeldA;
|
GuiTrigger * trigHeldA;
|
||||||
|
|
||||||
int selectedItem;
|
int selectedItem;
|
||||||
|
@ -255,7 +255,7 @@ void GuiButton::Update(GuiTrigger * t)
|
|||||||
if(this->IsClickable())
|
if(this->IsClickable())
|
||||||
{
|
{
|
||||||
s32 wm_btns, wm_btns_trig, cc_btns, cc_btns_trig;
|
s32 wm_btns, wm_btns_trig, cc_btns, cc_btns_trig;
|
||||||
for(int i=0; i<2; i++)
|
for(int i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
if(trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
|
if(trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
|
||||||
{
|
{
|
||||||
@ -305,7 +305,7 @@ void GuiButton::Update(GuiTrigger * t)
|
|||||||
bool held = false;
|
bool held = false;
|
||||||
s32 wm_btns, wm_btns_h, wm_btns_trig, cc_btns, cc_btns_h, cc_btns_trig;
|
s32 wm_btns, wm_btns_h, wm_btns_trig, cc_btns, cc_btns_h, cc_btns_trig;
|
||||||
|
|
||||||
for(int i=0; i<2; i++)
|
for(int i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
if(trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
|
if(trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan))
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ GuiElement::GuiElement()
|
|||||||
stateChan = -1;
|
stateChan = -1;
|
||||||
trigger[0] = NULL;
|
trigger[0] = NULL;
|
||||||
trigger[1] = NULL;
|
trigger[1] = NULL;
|
||||||
|
trigger[2] = NULL;
|
||||||
parentElement = NULL;
|
parentElement = NULL;
|
||||||
rumble = true;
|
rumble = true;
|
||||||
selectable = false;
|
selectable = false;
|
||||||
@ -312,7 +313,9 @@ void GuiElement::SetTrigger(GuiTrigger * t)
|
|||||||
trigger[0] = t;
|
trigger[0] = t;
|
||||||
else if(!trigger[1])
|
else if(!trigger[1])
|
||||||
trigger[1] = t;
|
trigger[1] = t;
|
||||||
else // both were assigned, so we'll just overwrite the first one
|
else if(!trigger[2])
|
||||||
|
trigger[2] = t;
|
||||||
|
else // all were assigned, so we'll just overwrite the first one
|
||||||
trigger[0] = t;
|
trigger[0] = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,10 +25,9 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
|
|||||||
focus = 0; // allow focus
|
focus = 0; // allow focus
|
||||||
|
|
||||||
trigA = new GuiTrigger;
|
trigA = new GuiTrigger;
|
||||||
if(GCSettings.WiimoteOrientation)
|
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
trig2 = new GuiTrigger;
|
||||||
else
|
trig2->SetSimpleTrigger(-1, WPAD_BUTTON_2, 0);
|
||||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
trigHeldA = new GuiTrigger;
|
trigHeldA = new GuiTrigger;
|
||||||
trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
@ -120,6 +119,7 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
|
|||||||
fileList[i]->SetImageOver(fileListBg[i]);
|
fileList[i]->SetImageOver(fileListBg[i]);
|
||||||
fileList[i]->SetPosition(2,26*i+3);
|
fileList[i]->SetPosition(2,26*i+3);
|
||||||
fileList[i]->SetTrigger(trigA);
|
fileList[i]->SetTrigger(trigA);
|
||||||
|
fileList[i]->SetTrigger(trig2);
|
||||||
fileList[i]->SetSoundClick(btnSoundClick);
|
fileList[i]->SetSoundClick(btnSoundClick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -161,6 +161,7 @@ GuiFileBrowser::~GuiFileBrowser()
|
|||||||
delete btnSoundClick;
|
delete btnSoundClick;
|
||||||
delete trigHeldA;
|
delete trigHeldA;
|
||||||
delete trigA;
|
delete trigA;
|
||||||
|
delete trig2;
|
||||||
|
|
||||||
for(int i=0; i<FILE_PAGESIZE; i++)
|
for(int i=0; i<FILE_PAGESIZE; i++)
|
||||||
{
|
{
|
||||||
|
@ -124,10 +124,10 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
|||||||
keySoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
keySoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
trigA = new GuiTrigger;
|
trigA = new GuiTrigger;
|
||||||
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
trigA = new GuiTrigger;
|
||||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
else
|
trig2 = new GuiTrigger;
|
||||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
trig2->SetSimpleTrigger(-1, WPAD_BUTTON_2, 0);
|
||||||
|
|
||||||
keyBackImg = new GuiImage(keyMedium);
|
keyBackImg = new GuiImage(keyMedium);
|
||||||
keyBackOverImg = new GuiImage(keyMediumOver);
|
keyBackOverImg = new GuiImage(keyMediumOver);
|
||||||
@ -139,6 +139,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
|||||||
keyBack->SetSoundOver(keySoundOver);
|
keyBack->SetSoundOver(keySoundOver);
|
||||||
keyBack->SetSoundClick(keySoundClick);
|
keyBack->SetSoundClick(keySoundClick);
|
||||||
keyBack->SetTrigger(trigA);
|
keyBack->SetTrigger(trigA);
|
||||||
|
keyBack->SetTrigger(trig2);
|
||||||
keyBack->SetPosition(10*42+40, 0*42+80);
|
keyBack->SetPosition(10*42+40, 0*42+80);
|
||||||
keyBack->SetEffectGrow();
|
keyBack->SetEffectGrow();
|
||||||
this->Append(keyBack);
|
this->Append(keyBack);
|
||||||
@ -153,6 +154,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
|||||||
keyCaps->SetSoundOver(keySoundOver);
|
keyCaps->SetSoundOver(keySoundOver);
|
||||||
keyCaps->SetSoundClick(keySoundClick);
|
keyCaps->SetSoundClick(keySoundClick);
|
||||||
keyCaps->SetTrigger(trigA);
|
keyCaps->SetTrigger(trigA);
|
||||||
|
keyCaps->SetTrigger(trig2);
|
||||||
keyCaps->SetPosition(0, 2*42+80);
|
keyCaps->SetPosition(0, 2*42+80);
|
||||||
keyCaps->SetEffectGrow();
|
keyCaps->SetEffectGrow();
|
||||||
this->Append(keyCaps);
|
this->Append(keyCaps);
|
||||||
@ -167,6 +169,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
|||||||
keyShift->SetSoundOver(keySoundOver);
|
keyShift->SetSoundOver(keySoundOver);
|
||||||
keyShift->SetSoundClick(keySoundClick);
|
keyShift->SetSoundClick(keySoundClick);
|
||||||
keyShift->SetTrigger(trigA);
|
keyShift->SetTrigger(trigA);
|
||||||
|
keyShift->SetTrigger(trig2);
|
||||||
keyShift->SetPosition(21, 3*42+80);
|
keyShift->SetPosition(21, 3*42+80);
|
||||||
keyShift->SetEffectGrow();
|
keyShift->SetEffectGrow();
|
||||||
this->Append(keyShift);
|
this->Append(keyShift);
|
||||||
@ -179,6 +182,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
|||||||
keySpace->SetSoundOver(keySoundOver);
|
keySpace->SetSoundOver(keySoundOver);
|
||||||
keySpace->SetSoundClick(keySoundClick);
|
keySpace->SetSoundClick(keySoundClick);
|
||||||
keySpace->SetTrigger(trigA);
|
keySpace->SetTrigger(trigA);
|
||||||
|
keySpace->SetTrigger(trig2);
|
||||||
keySpace->SetPosition(0, 4*42+80);
|
keySpace->SetPosition(0, 4*42+80);
|
||||||
keySpace->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
keySpace->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
keySpace->SetEffectGrow();
|
keySpace->SetEffectGrow();
|
||||||
@ -204,6 +208,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
|||||||
keyBtn[i][j]->SetSoundOver(keySoundOver);
|
keyBtn[i][j]->SetSoundOver(keySoundOver);
|
||||||
keyBtn[i][j]->SetSoundClick(keySoundClick);
|
keyBtn[i][j]->SetSoundClick(keySoundClick);
|
||||||
keyBtn[i][j]->SetTrigger(trigA);
|
keyBtn[i][j]->SetTrigger(trigA);
|
||||||
|
keyBtn[i][j]->SetTrigger(trig2);
|
||||||
keyBtn[i][j]->SetLabel(keyTxt[i][j]);
|
keyBtn[i][j]->SetLabel(keyTxt[i][j]);
|
||||||
keyBtn[i][j]->SetPosition(j*42+21*i+40, i*42+80);
|
keyBtn[i][j]->SetPosition(j*42+21*i+40, i*42+80);
|
||||||
keyBtn[i][j]->SetEffectGrow();
|
keyBtn[i][j]->SetEffectGrow();
|
||||||
@ -245,6 +250,7 @@ GuiKeyboard::~GuiKeyboard()
|
|||||||
delete keySoundOver;
|
delete keySoundOver;
|
||||||
delete keySoundClick;
|
delete keySoundClick;
|
||||||
delete trigA;
|
delete trigA;
|
||||||
|
delete trig2;
|
||||||
|
|
||||||
for(int i=0; i<4; i++)
|
for(int i=0; i<4; i++)
|
||||||
{
|
{
|
||||||
|
@ -25,10 +25,9 @@ GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l)
|
|||||||
focus = 0; // allow focus
|
focus = 0; // allow focus
|
||||||
|
|
||||||
trigA = new GuiTrigger;
|
trigA = new GuiTrigger;
|
||||||
if(GCSettings.WiimoteOrientation)
|
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
trig2 = new GuiTrigger;
|
||||||
else
|
trig2->SetSimpleTrigger(-1, WPAD_BUTTON_2, 0);
|
||||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
||||||
btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
@ -94,6 +93,7 @@ GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l)
|
|||||||
optionBtn[i]->SetImageOver(optionBg[i]);
|
optionBtn[i]->SetImageOver(optionBg[i]);
|
||||||
optionBtn[i]->SetPosition(0,30*i+3);
|
optionBtn[i]->SetPosition(0,30*i+3);
|
||||||
optionBtn[i]->SetTrigger(trigA);
|
optionBtn[i]->SetTrigger(trigA);
|
||||||
|
optionBtn[i]->SetTrigger(trig2);
|
||||||
optionBtn[i]->SetSoundClick(btnSoundClick);
|
optionBtn[i]->SetSoundClick(btnSoundClick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,6 +122,7 @@ GuiOptionBrowser::~GuiOptionBrowser()
|
|||||||
delete arrowUpOver;
|
delete arrowUpOver;
|
||||||
|
|
||||||
delete trigA;
|
delete trigA;
|
||||||
|
delete trig2;
|
||||||
delete btnSoundOver;
|
delete btnSoundOver;
|
||||||
delete btnSoundClick;
|
delete btnSoundClick;
|
||||||
|
|
||||||
|
@ -31,11 +31,9 @@ GuiSaveBrowser::GuiSaveBrowser(int w, int h, SaveList * s, int a)
|
|||||||
focus = 0; // allow focus
|
focus = 0; // allow focus
|
||||||
|
|
||||||
trigA = new GuiTrigger;
|
trigA = new GuiTrigger;
|
||||||
|
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
if(GCSettings.WiimoteOrientation)
|
trig2 = new GuiTrigger;
|
||||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
trig2->SetSimpleTrigger(-1, WPAD_BUTTON_2, 0);
|
||||||
else
|
|
||||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
||||||
btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
@ -109,6 +107,7 @@ GuiSaveBrowser::GuiSaveBrowser(int w, int h, SaveList * s, int a)
|
|||||||
saveBtn[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
saveBtn[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||||
saveBtn[i]->SetPosition(257*(i % 2),87*(i>>1));
|
saveBtn[i]->SetPosition(257*(i % 2),87*(i>>1));
|
||||||
saveBtn[i]->SetTrigger(trigA);
|
saveBtn[i]->SetTrigger(trigA);
|
||||||
|
saveBtn[i]->SetTrigger(trig2);
|
||||||
saveBtn[i]->SetState(STATE_DISABLED);
|
saveBtn[i]->SetState(STATE_DISABLED);
|
||||||
saveBtn[i]->SetEffectGrow();
|
saveBtn[i]->SetEffectGrow();
|
||||||
saveBtn[i]->SetVisible(false);
|
saveBtn[i]->SetVisible(false);
|
||||||
@ -146,6 +145,7 @@ GuiSaveBrowser::~GuiSaveBrowser()
|
|||||||
delete btnSoundOver;
|
delete btnSoundOver;
|
||||||
delete btnSoundClick;
|
delete btnSoundClick;
|
||||||
delete trigA;
|
delete trigA;
|
||||||
|
delete trig2;
|
||||||
|
|
||||||
for(int i=0; i<SAVELISTSIZE; i++)
|
for(int i=0; i<SAVELISTSIZE; i++)
|
||||||
{
|
{
|
||||||
|
342
source/menu.cpp
342
source/menu.cpp
@ -48,6 +48,9 @@
|
|||||||
static GuiImageData * pointer[4];
|
static GuiImageData * pointer[4];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static GuiTrigger * trigA = NULL;
|
||||||
|
static GuiTrigger * trig2 = NULL;
|
||||||
|
|
||||||
static GuiButton * btnLogo = NULL;
|
static GuiButton * btnLogo = NULL;
|
||||||
static GuiImage * gameScreenImg = NULL;
|
static GuiImage * gameScreenImg = NULL;
|
||||||
static GuiImage * bgImg = NULL;
|
static GuiImage * bgImg = NULL;
|
||||||
@ -142,11 +145,6 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
|
|||||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
GuiImageData btnOutline(button_png);
|
GuiImageData btnOutline(button_png);
|
||||||
GuiImageData btnOutlineOver(button_over_png);
|
GuiImageData btnOutlineOver(button_over_png);
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiImageData dialogBox(dialogue_box_png);
|
GuiImageData dialogBox(dialogue_box_png);
|
||||||
GuiImage dialogBoxImg(&dialogBox);
|
GuiImage dialogBoxImg(&dialogBox);
|
||||||
@ -180,7 +178,8 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
|
|||||||
btn1.SetImageOver(&btn1ImgOver);
|
btn1.SetImageOver(&btn1ImgOver);
|
||||||
btn1.SetSoundOver(&btnSoundOver);
|
btn1.SetSoundOver(&btnSoundOver);
|
||||||
btn1.SetSoundClick(&btnSoundClick);
|
btn1.SetSoundClick(&btnSoundClick);
|
||||||
btn1.SetTrigger(&trigA);
|
btn1.SetTrigger(trigA);
|
||||||
|
btn1.SetTrigger(trig2);
|
||||||
btn1.SetState(STATE_SELECTED);
|
btn1.SetState(STATE_SELECTED);
|
||||||
btn1.SetEffectGrow();
|
btn1.SetEffectGrow();
|
||||||
|
|
||||||
@ -195,7 +194,8 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
|
|||||||
btn2.SetImageOver(&btn2ImgOver);
|
btn2.SetImageOver(&btn2ImgOver);
|
||||||
btn2.SetSoundOver(&btnSoundOver);
|
btn2.SetSoundOver(&btnSoundOver);
|
||||||
btn2.SetSoundClick(&btnSoundClick);
|
btn2.SetSoundClick(&btnSoundClick);
|
||||||
btn2.SetTrigger(&trigA);
|
btn2.SetTrigger(trigA);
|
||||||
|
btn2.SetTrigger(trig2);
|
||||||
btn2.SetEffectGrow();
|
btn2.SetEffectGrow();
|
||||||
|
|
||||||
promptWindow.Append(&dialogBoxImg);
|
promptWindow.Append(&dialogBoxImg);
|
||||||
@ -342,11 +342,6 @@ ProgressWindow(char *title, char *msg)
|
|||||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
GuiImageData btnOutline(button_png);
|
GuiImageData btnOutline(button_png);
|
||||||
GuiImageData btnOutlineOver(button_over_png);
|
GuiImageData btnOutlineOver(button_over_png);
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiImageData dialogBox(dialogue_box_png);
|
GuiImageData dialogBox(dialogue_box_png);
|
||||||
GuiImage dialogBoxImg(&dialogBox);
|
GuiImage dialogBoxImg(&dialogBox);
|
||||||
@ -606,11 +601,6 @@ static void OnScreenKeyboard(char * var, u32 maxlen)
|
|||||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
GuiImageData btnOutline(button_png);
|
GuiImageData btnOutline(button_png);
|
||||||
GuiImageData btnOutlineOver(button_over_png);
|
GuiImageData btnOutlineOver(button_over_png);
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText okBtnTxt("OK", 22, (GXColor){0, 0, 0, 255});
|
GuiText okBtnTxt("OK", 22, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage okBtnImg(&btnOutline);
|
GuiImage okBtnImg(&btnOutline);
|
||||||
@ -625,7 +615,8 @@ static void OnScreenKeyboard(char * var, u32 maxlen)
|
|||||||
okBtn.SetImageOver(&okBtnImgOver);
|
okBtn.SetImageOver(&okBtnImgOver);
|
||||||
okBtn.SetSoundOver(&btnSoundOver);
|
okBtn.SetSoundOver(&btnSoundOver);
|
||||||
okBtn.SetSoundClick(&btnSoundClick);
|
okBtn.SetSoundClick(&btnSoundClick);
|
||||||
okBtn.SetTrigger(&trigA);
|
okBtn.SetTrigger(trigA);
|
||||||
|
okBtn.SetTrigger(trig2);
|
||||||
okBtn.SetEffectGrow();
|
okBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText cancelBtnTxt("Cancel", 22, (GXColor){0, 0, 0, 255});
|
GuiText cancelBtnTxt("Cancel", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -639,7 +630,8 @@ static void OnScreenKeyboard(char * var, u32 maxlen)
|
|||||||
cancelBtn.SetImageOver(&cancelBtnImgOver);
|
cancelBtn.SetImageOver(&cancelBtnImgOver);
|
||||||
cancelBtn.SetSoundOver(&btnSoundOver);
|
cancelBtn.SetSoundOver(&btnSoundOver);
|
||||||
cancelBtn.SetSoundClick(&btnSoundClick);
|
cancelBtn.SetSoundClick(&btnSoundClick);
|
||||||
cancelBtn.SetTrigger(&trigA);
|
cancelBtn.SetTrigger(trigA);
|
||||||
|
cancelBtn.SetTrigger(trig2);
|
||||||
cancelBtn.SetEffectGrow();
|
cancelBtn.SetEffectGrow();
|
||||||
|
|
||||||
keyboard.Append(&okBtn);
|
keyboard.Append(&okBtn);
|
||||||
@ -689,11 +681,6 @@ SettingWindow(const char * title, GuiWindow * w)
|
|||||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
GuiImageData btnOutline(button_png);
|
GuiImageData btnOutline(button_png);
|
||||||
GuiImageData btnOutlineOver(button_over_png);
|
GuiImageData btnOutlineOver(button_over_png);
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiImageData dialogBox(dialogue_box_png);
|
GuiImageData dialogBox(dialogue_box_png);
|
||||||
GuiImage dialogBoxImg(&dialogBox);
|
GuiImage dialogBoxImg(&dialogBox);
|
||||||
@ -715,7 +702,8 @@ SettingWindow(const char * title, GuiWindow * w)
|
|||||||
okBtn.SetImageOver(&okBtnImgOver);
|
okBtn.SetImageOver(&okBtnImgOver);
|
||||||
okBtn.SetSoundOver(&btnSoundOver);
|
okBtn.SetSoundOver(&btnSoundOver);
|
||||||
okBtn.SetSoundClick(&btnSoundClick);
|
okBtn.SetSoundClick(&btnSoundClick);
|
||||||
okBtn.SetTrigger(&trigA);
|
okBtn.SetTrigger(trigA);
|
||||||
|
okBtn.SetTrigger(trig2);
|
||||||
okBtn.SetEffectGrow();
|
okBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText cancelBtnTxt("Cancel", 22, (GXColor){0, 0, 0, 255});
|
GuiText cancelBtnTxt("Cancel", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -729,7 +717,8 @@ SettingWindow(const char * title, GuiWindow * w)
|
|||||||
cancelBtn.SetImageOver(&cancelBtnImgOver);
|
cancelBtn.SetImageOver(&cancelBtnImgOver);
|
||||||
cancelBtn.SetSoundOver(&btnSoundOver);
|
cancelBtn.SetSoundOver(&btnSoundOver);
|
||||||
cancelBtn.SetSoundClick(&btnSoundClick);
|
cancelBtn.SetSoundClick(&btnSoundClick);
|
||||||
cancelBtn.SetTrigger(&trigA);
|
cancelBtn.SetTrigger(trigA);
|
||||||
|
cancelBtn.SetTrigger(trig2);
|
||||||
cancelBtn.SetEffectGrow();
|
cancelBtn.SetEffectGrow();
|
||||||
|
|
||||||
promptWindow.Append(&dialogBoxImg);
|
promptWindow.Append(&dialogBoxImg);
|
||||||
@ -934,11 +923,7 @@ static int MenuGameSelection()
|
|||||||
GuiImageData iconSettings(icon_settings_png);
|
GuiImageData iconSettings(icon_settings_png);
|
||||||
GuiImageData btnOutline(button_long_png);
|
GuiImageData btnOutline(button_long_png);
|
||||||
GuiImageData btnOutlineOver(button_long_over_png);
|
GuiImageData btnOutlineOver(button_long_over_png);
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
GuiTrigger trigHome;
|
GuiTrigger trigHome;
|
||||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||||
|
|
||||||
@ -957,7 +942,8 @@ static int MenuGameSelection()
|
|||||||
settingsBtn.SetImageOver(&settingsBtnImgOver);
|
settingsBtn.SetImageOver(&settingsBtnImgOver);
|
||||||
settingsBtn.SetSoundOver(&btnSoundOver);
|
settingsBtn.SetSoundOver(&btnSoundOver);
|
||||||
settingsBtn.SetSoundClick(&btnSoundClick);
|
settingsBtn.SetSoundClick(&btnSoundClick);
|
||||||
settingsBtn.SetTrigger(&trigA);
|
settingsBtn.SetTrigger(trigA);
|
||||||
|
settingsBtn.SetTrigger(trig2);
|
||||||
settingsBtn.SetEffectGrow();
|
settingsBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText exitBtnTxt("Exit", 22, (GXColor){0, 0, 0, 255});
|
GuiText exitBtnTxt("Exit", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -975,7 +961,8 @@ static int MenuGameSelection()
|
|||||||
exitBtn.SetImageOver(&exitBtnImgOver);
|
exitBtn.SetImageOver(&exitBtnImgOver);
|
||||||
exitBtn.SetSoundOver(&btnSoundOver);
|
exitBtn.SetSoundOver(&btnSoundOver);
|
||||||
exitBtn.SetSoundClick(&btnSoundClick);
|
exitBtn.SetSoundClick(&btnSoundClick);
|
||||||
exitBtn.SetTrigger(&trigA);
|
exitBtn.SetTrigger(trigA);
|
||||||
|
exitBtn.SetTrigger(trig2);
|
||||||
exitBtn.SetTrigger(&trigHome);
|
exitBtn.SetTrigger(&trigHome);
|
||||||
exitBtn.SetEffectGrow();
|
exitBtn.SetEffectGrow();
|
||||||
|
|
||||||
@ -1114,12 +1101,6 @@ static void ControllerWindow()
|
|||||||
GuiWindow * w = new GuiWindow(300,250);
|
GuiWindow * w = new GuiWindow(300,250);
|
||||||
w->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
w->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiTrigger trigLeft;
|
GuiTrigger trigLeft;
|
||||||
trigLeft.SetButtonOnlyInFocusTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT);
|
trigLeft.SetButtonOnlyInFocusTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT);
|
||||||
|
|
||||||
@ -1134,8 +1115,9 @@ static void ControllerWindow()
|
|||||||
arrowLeftBtn.SetImage(&arrowLeftImg);
|
arrowLeftBtn.SetImage(&arrowLeftImg);
|
||||||
arrowLeftBtn.SetImageOver(&arrowLeftOverImg);
|
arrowLeftBtn.SetImageOver(&arrowLeftOverImg);
|
||||||
arrowLeftBtn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
arrowLeftBtn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
arrowLeftBtn.SetTrigger(0, &trigA);
|
arrowLeftBtn.SetTrigger(trigA);
|
||||||
arrowLeftBtn.SetTrigger(1, &trigLeft);
|
arrowLeftBtn.SetTrigger(trig2);
|
||||||
|
arrowLeftBtn.SetTrigger(&trigLeft);
|
||||||
arrowLeftBtn.SetSelectable(false);
|
arrowLeftBtn.SetSelectable(false);
|
||||||
arrowLeftBtn.SetUpdateCallback(ControllerWindowLeftClick);
|
arrowLeftBtn.SetUpdateCallback(ControllerWindowLeftClick);
|
||||||
|
|
||||||
@ -1147,8 +1129,9 @@ static void ControllerWindow()
|
|||||||
arrowRightBtn.SetImage(&arrowRightImg);
|
arrowRightBtn.SetImage(&arrowRightImg);
|
||||||
arrowRightBtn.SetImageOver(&arrowRightOverImg);
|
arrowRightBtn.SetImageOver(&arrowRightOverImg);
|
||||||
arrowRightBtn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
|
arrowRightBtn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
|
||||||
arrowRightBtn.SetTrigger(0, &trigA);
|
arrowRightBtn.SetTrigger(trigA);
|
||||||
arrowRightBtn.SetTrigger(1, &trigRight);
|
arrowRightBtn.SetTrigger(trig2);
|
||||||
|
arrowRightBtn.SetTrigger(&trigRight);
|
||||||
arrowRightBtn.SetSelectable(false);
|
arrowRightBtn.SetSelectable(false);
|
||||||
arrowRightBtn.SetUpdateCallback(ControllerWindowRightClick);
|
arrowRightBtn.SetUpdateCallback(ControllerWindowRightClick);
|
||||||
|
|
||||||
@ -1197,12 +1180,6 @@ static int MenuGame()
|
|||||||
GuiImageData batteryRed(battery_red_png);
|
GuiImageData batteryRed(battery_red_png);
|
||||||
GuiImageData batteryBar(battery_bar_png);
|
GuiImageData batteryBar(battery_bar_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiTrigger trigHome;
|
GuiTrigger trigHome;
|
||||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||||
|
|
||||||
@ -1219,7 +1196,8 @@ static int MenuGame()
|
|||||||
saveBtn.SetIcon(&saveBtnIcon);
|
saveBtn.SetIcon(&saveBtnIcon);
|
||||||
saveBtn.SetSoundOver(&btnSoundOver);
|
saveBtn.SetSoundOver(&btnSoundOver);
|
||||||
saveBtn.SetSoundClick(&btnSoundClick);
|
saveBtn.SetSoundClick(&btnSoundClick);
|
||||||
saveBtn.SetTrigger(&trigA);
|
saveBtn.SetTrigger(trigA);
|
||||||
|
saveBtn.SetTrigger(trig2);
|
||||||
saveBtn.SetEffectGrow();
|
saveBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText loadBtnTxt("Load", 22, (GXColor){0, 0, 0, 255});
|
GuiText loadBtnTxt("Load", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -1235,7 +1213,8 @@ static int MenuGame()
|
|||||||
loadBtn.SetIcon(&loadBtnIcon);
|
loadBtn.SetIcon(&loadBtnIcon);
|
||||||
loadBtn.SetSoundOver(&btnSoundOver);
|
loadBtn.SetSoundOver(&btnSoundOver);
|
||||||
loadBtn.SetSoundClick(&btnSoundClick);
|
loadBtn.SetSoundClick(&btnSoundClick);
|
||||||
loadBtn.SetTrigger(&trigA);
|
loadBtn.SetTrigger(trigA);
|
||||||
|
loadBtn.SetTrigger(trig2);
|
||||||
loadBtn.SetEffectGrow();
|
loadBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText resetBtnTxt("Reset", 22, (GXColor){0, 0, 0, 255});
|
GuiText resetBtnTxt("Reset", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -1251,7 +1230,8 @@ static int MenuGame()
|
|||||||
resetBtn.SetIcon(&resetBtnIcon);
|
resetBtn.SetIcon(&resetBtnIcon);
|
||||||
resetBtn.SetSoundOver(&btnSoundOver);
|
resetBtn.SetSoundOver(&btnSoundOver);
|
||||||
resetBtn.SetSoundClick(&btnSoundClick);
|
resetBtn.SetSoundClick(&btnSoundClick);
|
||||||
resetBtn.SetTrigger(&trigA);
|
resetBtn.SetTrigger(trigA);
|
||||||
|
resetBtn.SetTrigger(trig2);
|
||||||
resetBtn.SetEffectGrow();
|
resetBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText gameSettingsBtnTxt("Game Settings", 22, (GXColor){0, 0, 0, 255});
|
GuiText gameSettingsBtnTxt("Game Settings", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -1268,7 +1248,8 @@ static int MenuGame()
|
|||||||
gameSettingsBtn.SetIcon(&gameSettingsBtnIcon);
|
gameSettingsBtn.SetIcon(&gameSettingsBtnIcon);
|
||||||
gameSettingsBtn.SetSoundOver(&btnSoundOver);
|
gameSettingsBtn.SetSoundOver(&btnSoundOver);
|
||||||
gameSettingsBtn.SetSoundClick(&btnSoundClick);
|
gameSettingsBtn.SetSoundClick(&btnSoundClick);
|
||||||
gameSettingsBtn.SetTrigger(&trigA);
|
gameSettingsBtn.SetTrigger(trigA);
|
||||||
|
gameSettingsBtn.SetTrigger(trig2);
|
||||||
gameSettingsBtn.SetEffectGrow();
|
gameSettingsBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText mainmenuBtnTxt("Main Menu", 22, (GXColor){0, 0, 0, 255});
|
GuiText mainmenuBtnTxt("Main Menu", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -1282,7 +1263,8 @@ static int MenuGame()
|
|||||||
mainmenuBtn.SetImageOver(&mainmenuBtnImgOver);
|
mainmenuBtn.SetImageOver(&mainmenuBtnImgOver);
|
||||||
mainmenuBtn.SetSoundOver(&btnSoundOver);
|
mainmenuBtn.SetSoundOver(&btnSoundOver);
|
||||||
mainmenuBtn.SetSoundClick(&btnSoundClick);
|
mainmenuBtn.SetSoundClick(&btnSoundClick);
|
||||||
mainmenuBtn.SetTrigger(&trigA);
|
mainmenuBtn.SetTrigger(trigA);
|
||||||
|
mainmenuBtn.SetTrigger(trig2);
|
||||||
mainmenuBtn.SetEffectGrow();
|
mainmenuBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText closeBtnTxt("Close", 20, (GXColor){0, 0, 0, 255});
|
GuiText closeBtnTxt("Close", 20, (GXColor){0, 0, 0, 255});
|
||||||
@ -1296,7 +1278,8 @@ static int MenuGame()
|
|||||||
closeBtn.SetImageOver(&closeBtnImgOver);
|
closeBtn.SetImageOver(&closeBtnImgOver);
|
||||||
closeBtn.SetSoundOver(&btnSoundOver);
|
closeBtn.SetSoundOver(&btnSoundOver);
|
||||||
closeBtn.SetSoundClick(&btnSoundClick);
|
closeBtn.SetSoundClick(&btnSoundClick);
|
||||||
closeBtn.SetTrigger(&trigA);
|
closeBtn.SetTrigger(trigA);
|
||||||
|
closeBtn.SetTrigger(trig2);
|
||||||
closeBtn.SetTrigger(&trigHome);
|
closeBtn.SetTrigger(&trigHome);
|
||||||
closeBtn.SetEffectGrow();
|
closeBtn.SetEffectGrow();
|
||||||
|
|
||||||
@ -1588,12 +1571,6 @@ static int MenuGameSaves(int action)
|
|||||||
GuiImageData btnCloseOutline(button_small_png);
|
GuiImageData btnCloseOutline(button_small_png);
|
||||||
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiTrigger trigHome;
|
GuiTrigger trigHome;
|
||||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||||
|
|
||||||
@ -1608,7 +1585,8 @@ static int MenuGameSaves(int action)
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText closeBtnTxt("Close", 20, (GXColor){0, 0, 0, 255});
|
GuiText closeBtnTxt("Close", 20, (GXColor){0, 0, 0, 255});
|
||||||
@ -1622,7 +1600,8 @@ static int MenuGameSaves(int action)
|
|||||||
closeBtn.SetImageOver(&closeBtnImgOver);
|
closeBtn.SetImageOver(&closeBtnImgOver);
|
||||||
closeBtn.SetSoundOver(&btnSoundOver);
|
closeBtn.SetSoundOver(&btnSoundOver);
|
||||||
closeBtn.SetSoundClick(&btnSoundClick);
|
closeBtn.SetSoundClick(&btnSoundClick);
|
||||||
closeBtn.SetTrigger(&trigA);
|
closeBtn.SetTrigger(trigA);
|
||||||
|
closeBtn.SetTrigger(trig2);
|
||||||
closeBtn.SetTrigger(&trigHome);
|
closeBtn.SetTrigger(&trigHome);
|
||||||
closeBtn.SetEffectGrow();
|
closeBtn.SetEffectGrow();
|
||||||
|
|
||||||
@ -1836,12 +1815,6 @@ static int MenuGameSettings()
|
|||||||
GuiImageData btnCloseOutline(button_small_png);
|
GuiImageData btnCloseOutline(button_small_png);
|
||||||
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiTrigger trigHome;
|
GuiTrigger trigHome;
|
||||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||||
|
|
||||||
@ -1859,7 +1832,8 @@ static int MenuGameSettings()
|
|||||||
mappingBtn.SetIcon(&mappingBtnIcon);
|
mappingBtn.SetIcon(&mappingBtnIcon);
|
||||||
mappingBtn.SetSoundOver(&btnSoundOver);
|
mappingBtn.SetSoundOver(&btnSoundOver);
|
||||||
mappingBtn.SetSoundClick(&btnSoundClick);
|
mappingBtn.SetSoundClick(&btnSoundClick);
|
||||||
mappingBtn.SetTrigger(&trigA);
|
mappingBtn.SetTrigger(trigA);
|
||||||
|
mappingBtn.SetTrigger(trig2);
|
||||||
mappingBtn.SetEffectGrow();
|
mappingBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText videoBtnTxt("Video", 22, (GXColor){0, 0, 0, 255});
|
GuiText videoBtnTxt("Video", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -1876,7 +1850,8 @@ static int MenuGameSettings()
|
|||||||
videoBtn.SetIcon(&videoBtnIcon);
|
videoBtn.SetIcon(&videoBtnIcon);
|
||||||
videoBtn.SetSoundOver(&btnSoundOver);
|
videoBtn.SetSoundOver(&btnSoundOver);
|
||||||
videoBtn.SetSoundClick(&btnSoundClick);
|
videoBtn.SetSoundClick(&btnSoundClick);
|
||||||
videoBtn.SetTrigger(&trigA);
|
videoBtn.SetTrigger(trigA);
|
||||||
|
videoBtn.SetTrigger(trig2);
|
||||||
videoBtn.SetEffectGrow();
|
videoBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText controllerBtnTxt("Controller", 22, (GXColor){0, 0, 0, 255});
|
GuiText controllerBtnTxt("Controller", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -1892,7 +1867,8 @@ static int MenuGameSettings()
|
|||||||
controllerBtn.SetIcon(&controllerBtnIcon);
|
controllerBtn.SetIcon(&controllerBtnIcon);
|
||||||
controllerBtn.SetSoundOver(&btnSoundOver);
|
controllerBtn.SetSoundOver(&btnSoundOver);
|
||||||
controllerBtn.SetSoundClick(&btnSoundClick);
|
controllerBtn.SetSoundClick(&btnSoundClick);
|
||||||
controllerBtn.SetTrigger(&trigA);
|
controllerBtn.SetTrigger(trigA);
|
||||||
|
controllerBtn.SetTrigger(trig2);
|
||||||
controllerBtn.SetEffectGrow();
|
controllerBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText cheatsBtnTxt("Cheats", 22, (GXColor){0, 0, 0, 255});
|
GuiText cheatsBtnTxt("Cheats", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -1908,7 +1884,8 @@ static int MenuGameSettings()
|
|||||||
cheatsBtn.SetIcon(&cheatsBtnIcon);
|
cheatsBtn.SetIcon(&cheatsBtnIcon);
|
||||||
cheatsBtn.SetSoundOver(&btnSoundOver);
|
cheatsBtn.SetSoundOver(&btnSoundOver);
|
||||||
cheatsBtn.SetSoundClick(&btnSoundClick);
|
cheatsBtn.SetSoundClick(&btnSoundClick);
|
||||||
cheatsBtn.SetTrigger(&trigA);
|
cheatsBtn.SetTrigger(trigA);
|
||||||
|
cheatsBtn.SetTrigger(trig2);
|
||||||
cheatsBtn.SetEffectGrow();
|
cheatsBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText closeBtnTxt("Close", 20, (GXColor){0, 0, 0, 255});
|
GuiText closeBtnTxt("Close", 20, (GXColor){0, 0, 0, 255});
|
||||||
@ -1922,7 +1899,8 @@ static int MenuGameSettings()
|
|||||||
closeBtn.SetImageOver(&closeBtnImgOver);
|
closeBtn.SetImageOver(&closeBtnImgOver);
|
||||||
closeBtn.SetSoundOver(&btnSoundOver);
|
closeBtn.SetSoundOver(&btnSoundOver);
|
||||||
closeBtn.SetSoundClick(&btnSoundClick);
|
closeBtn.SetSoundClick(&btnSoundClick);
|
||||||
closeBtn.SetTrigger(&trigA);
|
closeBtn.SetTrigger(trigA);
|
||||||
|
closeBtn.SetTrigger(trig2);
|
||||||
closeBtn.SetTrigger(&trigHome);
|
closeBtn.SetTrigger(&trigHome);
|
||||||
closeBtn.SetEffectGrow();
|
closeBtn.SetEffectGrow();
|
||||||
|
|
||||||
@ -1937,7 +1915,8 @@ static int MenuGameSettings()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
@ -2042,12 +2021,6 @@ static int MenuGameCheats()
|
|||||||
GuiImageData btnCloseOutline(button_small_png);
|
GuiImageData btnCloseOutline(button_small_png);
|
||||||
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiTrigger trigHome;
|
GuiTrigger trigHome;
|
||||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||||
|
|
||||||
@ -2062,7 +2035,8 @@ static int MenuGameCheats()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiOptionBrowser optionBrowser(552, 248, &options);
|
GuiOptionBrowser optionBrowser(552, 248, &options);
|
||||||
@ -2123,12 +2097,6 @@ static int MenuSettingsMappings()
|
|||||||
GuiImageData iconNESController(icon_settings_nescontroller_png);
|
GuiImageData iconNESController(icon_settings_nescontroller_png);
|
||||||
GuiImageData iconZapper(icon_settings_zapper_png);
|
GuiImageData iconZapper(icon_settings_zapper_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText nesBtnTxt("NES Controller", 22, (GXColor){0, 0, 0, 255});
|
GuiText nesBtnTxt("NES Controller", 22, (GXColor){0, 0, 0, 255});
|
||||||
nesBtnTxt.SetWrap(true, btnLargeOutline.GetWidth()-30);
|
nesBtnTxt.SetWrap(true, btnLargeOutline.GetWidth()-30);
|
||||||
GuiImage nesBtnImg(&btnLargeOutline);
|
GuiImage nesBtnImg(&btnLargeOutline);
|
||||||
@ -2143,7 +2111,8 @@ static int MenuSettingsMappings()
|
|||||||
nesBtn.SetIcon(&nesBtnIcon);
|
nesBtn.SetIcon(&nesBtnIcon);
|
||||||
nesBtn.SetSoundOver(&btnSoundOver);
|
nesBtn.SetSoundOver(&btnSoundOver);
|
||||||
nesBtn.SetSoundClick(&btnSoundClick);
|
nesBtn.SetSoundClick(&btnSoundClick);
|
||||||
nesBtn.SetTrigger(&trigA);
|
nesBtn.SetTrigger(trigA);
|
||||||
|
nesBtn.SetTrigger(trig2);
|
||||||
nesBtn.SetEffectGrow();
|
nesBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText zapperBtnTxt("Zapper", 22, (GXColor){0, 0, 0, 255});
|
GuiText zapperBtnTxt("Zapper", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -2160,7 +2129,8 @@ static int MenuSettingsMappings()
|
|||||||
zapperBtn.SetIcon(&zapperBtnIcon);
|
zapperBtn.SetIcon(&zapperBtnIcon);
|
||||||
zapperBtn.SetSoundOver(&btnSoundOver);
|
zapperBtn.SetSoundOver(&btnSoundOver);
|
||||||
zapperBtn.SetSoundClick(&btnSoundClick);
|
zapperBtn.SetSoundClick(&btnSoundClick);
|
||||||
zapperBtn.SetTrigger(&trigA);
|
zapperBtn.SetTrigger(trigA);
|
||||||
|
zapperBtn.SetTrigger(trig2);
|
||||||
zapperBtn.SetEffectGrow();
|
zapperBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -2174,7 +2144,8 @@ static int MenuSettingsMappings()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
@ -2240,12 +2211,6 @@ static int MenuSettingsMappingsController()
|
|||||||
GuiImageData iconGamecube(icon_settings_gamecube_png);
|
GuiImageData iconGamecube(icon_settings_gamecube_png);
|
||||||
GuiImageData iconNunchuk(icon_settings_nunchuk_png);
|
GuiImageData iconNunchuk(icon_settings_nunchuk_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText gamecubeBtnTxt("GameCube Controller", 22, (GXColor){0, 0, 0, 255});
|
GuiText gamecubeBtnTxt("GameCube Controller", 22, (GXColor){0, 0, 0, 255});
|
||||||
gamecubeBtnTxt.SetWrap(true, btnLargeOutline.GetWidth()-30);
|
gamecubeBtnTxt.SetWrap(true, btnLargeOutline.GetWidth()-30);
|
||||||
GuiImage gamecubeBtnImg(&btnLargeOutline);
|
GuiImage gamecubeBtnImg(&btnLargeOutline);
|
||||||
@ -2260,7 +2225,8 @@ static int MenuSettingsMappingsController()
|
|||||||
gamecubeBtn.SetIcon(&gamecubeBtnIcon);
|
gamecubeBtn.SetIcon(&gamecubeBtnIcon);
|
||||||
gamecubeBtn.SetSoundOver(&btnSoundOver);
|
gamecubeBtn.SetSoundOver(&btnSoundOver);
|
||||||
gamecubeBtn.SetSoundClick(&btnSoundClick);
|
gamecubeBtn.SetSoundClick(&btnSoundClick);
|
||||||
gamecubeBtn.SetTrigger(&trigA);
|
gamecubeBtn.SetTrigger(trigA);
|
||||||
|
gamecubeBtn.SetTrigger(trig2);
|
||||||
gamecubeBtn.SetEffectGrow();
|
gamecubeBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText wiimoteBtnTxt("Wiimote", 22, (GXColor){0, 0, 0, 255});
|
GuiText wiimoteBtnTxt("Wiimote", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -2276,7 +2242,8 @@ static int MenuSettingsMappingsController()
|
|||||||
wiimoteBtn.SetIcon(&wiimoteBtnIcon);
|
wiimoteBtn.SetIcon(&wiimoteBtnIcon);
|
||||||
wiimoteBtn.SetSoundOver(&btnSoundOver);
|
wiimoteBtn.SetSoundOver(&btnSoundOver);
|
||||||
wiimoteBtn.SetSoundClick(&btnSoundClick);
|
wiimoteBtn.SetSoundClick(&btnSoundClick);
|
||||||
wiimoteBtn.SetTrigger(&trigA);
|
wiimoteBtn.SetTrigger(trigA);
|
||||||
|
wiimoteBtn.SetTrigger(trig2);
|
||||||
wiimoteBtn.SetEffectGrow();
|
wiimoteBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText classicBtnTxt("Classic Controller", 22, (GXColor){0, 0, 0, 255});
|
GuiText classicBtnTxt("Classic Controller", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -2293,7 +2260,8 @@ static int MenuSettingsMappingsController()
|
|||||||
classicBtn.SetIcon(&classicBtnIcon);
|
classicBtn.SetIcon(&classicBtnIcon);
|
||||||
classicBtn.SetSoundOver(&btnSoundOver);
|
classicBtn.SetSoundOver(&btnSoundOver);
|
||||||
classicBtn.SetSoundClick(&btnSoundClick);
|
classicBtn.SetSoundClick(&btnSoundClick);
|
||||||
classicBtn.SetTrigger(&trigA);
|
classicBtn.SetTrigger(trigA);
|
||||||
|
classicBtn.SetTrigger(trig2);
|
||||||
classicBtn.SetEffectGrow();
|
classicBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText nunchukBtnTxt1("Wiimote", 22, (GXColor){0, 0, 0, 255});
|
GuiText nunchukBtnTxt1("Wiimote", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -2315,7 +2283,8 @@ static int MenuSettingsMappingsController()
|
|||||||
nunchukBtn.SetIcon(&nunchukBtnIcon);
|
nunchukBtn.SetIcon(&nunchukBtnIcon);
|
||||||
nunchukBtn.SetSoundOver(&btnSoundOver);
|
nunchukBtn.SetSoundOver(&btnSoundOver);
|
||||||
nunchukBtn.SetSoundClick(&btnSoundClick);
|
nunchukBtn.SetSoundClick(&btnSoundClick);
|
||||||
nunchukBtn.SetTrigger(&trigA);
|
nunchukBtn.SetTrigger(trigA);
|
||||||
|
nunchukBtn.SetTrigger(trig2);
|
||||||
nunchukBtn.SetEffectGrow();
|
nunchukBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -2329,7 +2298,8 @@ static int MenuSettingsMappingsController()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
@ -2400,11 +2370,6 @@ ButtonMappingWindow()
|
|||||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
GuiImageData btnOutline(button_png);
|
GuiImageData btnOutline(button_png);
|
||||||
GuiImageData btnOutlineOver(button_over_png);
|
GuiImageData btnOutlineOver(button_over_png);
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiImageData dialogBox(dialogue_box_png);
|
GuiImageData dialogBox(dialogue_box_png);
|
||||||
GuiImage dialogBoxImg(&dialogBox);
|
GuiImage dialogBoxImg(&dialogBox);
|
||||||
@ -2539,12 +2504,6 @@ static int MenuSettingsMappingsMap()
|
|||||||
GuiImageData btnShortOutline(button_short_png);
|
GuiImageData btnShortOutline(button_short_png);
|
||||||
GuiImageData btnShortOutlineOver(button_short_over_png);
|
GuiImageData btnShortOutlineOver(button_short_over_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage backBtnImg(&btnOutline);
|
GuiImage backBtnImg(&btnOutline);
|
||||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||||
@ -2556,7 +2515,8 @@ static int MenuSettingsMappingsMap()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText resetBtnTxt("Reset", 22, (GXColor){0, 0, 0, 255});
|
GuiText resetBtnTxt("Reset", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -2570,7 +2530,8 @@ static int MenuSettingsMappingsMap()
|
|||||||
resetBtn.SetImageOver(&resetBtnImgOver);
|
resetBtn.SetImageOver(&resetBtnImgOver);
|
||||||
resetBtn.SetSoundOver(&btnSoundOver);
|
resetBtn.SetSoundOver(&btnSoundOver);
|
||||||
resetBtn.SetSoundClick(&btnSoundClick);
|
resetBtn.SetSoundClick(&btnSoundClick);
|
||||||
resetBtn.SetTrigger(&trigA);
|
resetBtn.SetTrigger(trigA);
|
||||||
|
resetBtn.SetTrigger(trig2);
|
||||||
resetBtn.SetEffectGrow();
|
resetBtn.SetEffectGrow();
|
||||||
|
|
||||||
i=0;
|
i=0;
|
||||||
@ -2711,12 +2672,6 @@ static void ScreenZoomWindow()
|
|||||||
GuiWindow * w = new GuiWindow(200,200);
|
GuiWindow * w = new GuiWindow(200,200);
|
||||||
w->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
w->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiTrigger trigLeft;
|
GuiTrigger trigLeft;
|
||||||
trigLeft.SetButtonOnlyInFocusTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT);
|
trigLeft.SetButtonOnlyInFocusTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT);
|
||||||
|
|
||||||
@ -2738,8 +2693,9 @@ static void ScreenZoomWindow()
|
|||||||
arrowLeftBtn.SetImageOver(&arrowLeftOverImg);
|
arrowLeftBtn.SetImageOver(&arrowLeftOverImg);
|
||||||
arrowLeftBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
arrowLeftBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
arrowLeftBtn.SetPosition(50, 0);
|
arrowLeftBtn.SetPosition(50, 0);
|
||||||
arrowLeftBtn.SetTrigger(0, &trigA);
|
arrowLeftBtn.SetTrigger(trigA);
|
||||||
arrowLeftBtn.SetTrigger(1, &trigLeft);
|
arrowLeftBtn.SetTrigger(trig2);
|
||||||
|
arrowLeftBtn.SetTrigger(&trigLeft);
|
||||||
arrowLeftBtn.SetSelectable(false);
|
arrowLeftBtn.SetSelectable(false);
|
||||||
arrowLeftBtn.SetUpdateCallback(ScreenZoomWindowLeftClick);
|
arrowLeftBtn.SetUpdateCallback(ScreenZoomWindowLeftClick);
|
||||||
|
|
||||||
@ -2752,8 +2708,9 @@ static void ScreenZoomWindow()
|
|||||||
arrowRightBtn.SetImageOver(&arrowRightOverImg);
|
arrowRightBtn.SetImageOver(&arrowRightOverImg);
|
||||||
arrowRightBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
arrowRightBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
arrowRightBtn.SetPosition(164, 0);
|
arrowRightBtn.SetPosition(164, 0);
|
||||||
arrowRightBtn.SetTrigger(0, &trigA);
|
arrowRightBtn.SetTrigger(trigA);
|
||||||
arrowRightBtn.SetTrigger(1, &trigRight);
|
arrowRightBtn.SetTrigger(trig2);
|
||||||
|
arrowRightBtn.SetTrigger(&trigRight);
|
||||||
arrowRightBtn.SetSelectable(false);
|
arrowRightBtn.SetSelectable(false);
|
||||||
arrowRightBtn.SetUpdateCallback(ScreenZoomWindowRightClick);
|
arrowRightBtn.SetUpdateCallback(ScreenZoomWindowRightClick);
|
||||||
|
|
||||||
@ -2766,8 +2723,9 @@ static void ScreenZoomWindow()
|
|||||||
arrowUpBtn.SetImageOver(&arrowUpOverImg);
|
arrowUpBtn.SetImageOver(&arrowUpOverImg);
|
||||||
arrowUpBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
arrowUpBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
arrowUpBtn.SetPosition(-76, -27);
|
arrowUpBtn.SetPosition(-76, -27);
|
||||||
arrowUpBtn.SetTrigger(0, &trigA);
|
arrowUpBtn.SetTrigger(trigA);
|
||||||
arrowUpBtn.SetTrigger(1, &trigUp);
|
arrowUpBtn.SetTrigger(trig2);
|
||||||
|
arrowUpBtn.SetTrigger(&trigUp);
|
||||||
arrowUpBtn.SetSelectable(false);
|
arrowUpBtn.SetSelectable(false);
|
||||||
arrowUpBtn.SetUpdateCallback(ScreenZoomWindowUpClick);
|
arrowUpBtn.SetUpdateCallback(ScreenZoomWindowUpClick);
|
||||||
|
|
||||||
@ -2780,8 +2738,9 @@ static void ScreenZoomWindow()
|
|||||||
arrowDownBtn.SetImageOver(&arrowDownOverImg);
|
arrowDownBtn.SetImageOver(&arrowDownOverImg);
|
||||||
arrowDownBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
arrowDownBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
arrowDownBtn.SetPosition(-76, 27);
|
arrowDownBtn.SetPosition(-76, 27);
|
||||||
arrowDownBtn.SetTrigger(0, &trigA);
|
arrowDownBtn.SetTrigger(trigA);
|
||||||
arrowDownBtn.SetTrigger(1, &trigDown);
|
arrowDownBtn.SetTrigger(trig2);
|
||||||
|
arrowDownBtn.SetTrigger(&trigDown);
|
||||||
arrowDownBtn.SetSelectable(false);
|
arrowDownBtn.SetSelectable(false);
|
||||||
arrowDownBtn.SetUpdateCallback(ScreenZoomWindowDownClick);
|
arrowDownBtn.SetUpdateCallback(ScreenZoomWindowDownClick);
|
||||||
|
|
||||||
@ -2849,12 +2808,6 @@ static void ScreenPositionWindow()
|
|||||||
w->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
w->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
w->SetPosition(0, -10);
|
w->SetPosition(0, -10);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiTrigger trigLeft;
|
GuiTrigger trigLeft;
|
||||||
trigLeft.SetButtonOnlyInFocusTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT);
|
trigLeft.SetButtonOnlyInFocusTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT);
|
||||||
|
|
||||||
@ -2875,8 +2828,9 @@ static void ScreenPositionWindow()
|
|||||||
arrowLeftBtn.SetImage(&arrowLeftImg);
|
arrowLeftBtn.SetImage(&arrowLeftImg);
|
||||||
arrowLeftBtn.SetImageOver(&arrowLeftOverImg);
|
arrowLeftBtn.SetImageOver(&arrowLeftOverImg);
|
||||||
arrowLeftBtn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
arrowLeftBtn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
arrowLeftBtn.SetTrigger(0, &trigA);
|
arrowLeftBtn.SetTrigger(trigA);
|
||||||
arrowLeftBtn.SetTrigger(1, &trigLeft);
|
arrowLeftBtn.SetTrigger(trig2);
|
||||||
|
arrowLeftBtn.SetTrigger(&trigLeft);
|
||||||
arrowLeftBtn.SetSelectable(false);
|
arrowLeftBtn.SetSelectable(false);
|
||||||
arrowLeftBtn.SetUpdateCallback(ScreenPositionWindowLeftClick);
|
arrowLeftBtn.SetUpdateCallback(ScreenPositionWindowLeftClick);
|
||||||
|
|
||||||
@ -2888,8 +2842,9 @@ static void ScreenPositionWindow()
|
|||||||
arrowRightBtn.SetImage(&arrowRightImg);
|
arrowRightBtn.SetImage(&arrowRightImg);
|
||||||
arrowRightBtn.SetImageOver(&arrowRightOverImg);
|
arrowRightBtn.SetImageOver(&arrowRightOverImg);
|
||||||
arrowRightBtn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
|
arrowRightBtn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
|
||||||
arrowRightBtn.SetTrigger(0, &trigA);
|
arrowRightBtn.SetTrigger(trigA);
|
||||||
arrowRightBtn.SetTrigger(1, &trigRight);
|
arrowRightBtn.SetTrigger(trig2);
|
||||||
|
arrowRightBtn.SetTrigger(&trigRight);
|
||||||
arrowRightBtn.SetSelectable(false);
|
arrowRightBtn.SetSelectable(false);
|
||||||
arrowRightBtn.SetUpdateCallback(ScreenPositionWindowRightClick);
|
arrowRightBtn.SetUpdateCallback(ScreenPositionWindowRightClick);
|
||||||
|
|
||||||
@ -2901,8 +2856,9 @@ static void ScreenPositionWindow()
|
|||||||
arrowUpBtn.SetImage(&arrowUpImg);
|
arrowUpBtn.SetImage(&arrowUpImg);
|
||||||
arrowUpBtn.SetImageOver(&arrowUpOverImg);
|
arrowUpBtn.SetImageOver(&arrowUpOverImg);
|
||||||
arrowUpBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
arrowUpBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
arrowUpBtn.SetTrigger(0, &trigA);
|
arrowUpBtn.SetTrigger(trigA);
|
||||||
arrowUpBtn.SetTrigger(1, &trigUp);
|
arrowUpBtn.SetTrigger(trig2);
|
||||||
|
arrowUpBtn.SetTrigger(&trigUp);
|
||||||
arrowUpBtn.SetSelectable(false);
|
arrowUpBtn.SetSelectable(false);
|
||||||
arrowUpBtn.SetUpdateCallback(ScreenPositionWindowUpClick);
|
arrowUpBtn.SetUpdateCallback(ScreenPositionWindowUpClick);
|
||||||
|
|
||||||
@ -2914,8 +2870,9 @@ static void ScreenPositionWindow()
|
|||||||
arrowDownBtn.SetImage(&arrowDownImg);
|
arrowDownBtn.SetImage(&arrowDownImg);
|
||||||
arrowDownBtn.SetImageOver(&arrowDownOverImg);
|
arrowDownBtn.SetImageOver(&arrowDownOverImg);
|
||||||
arrowDownBtn.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
|
arrowDownBtn.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
|
||||||
arrowDownBtn.SetTrigger(0, &trigA);
|
arrowDownBtn.SetTrigger(trigA);
|
||||||
arrowDownBtn.SetTrigger(1, &trigDown);
|
arrowDownBtn.SetTrigger(trig2);
|
||||||
|
arrowDownBtn.SetTrigger(&trigDown);
|
||||||
arrowDownBtn.SetSelectable(false);
|
arrowDownBtn.SetSelectable(false);
|
||||||
arrowDownBtn.SetUpdateCallback(ScreenPositionWindowDownClick);
|
arrowDownBtn.SetUpdateCallback(ScreenPositionWindowDownClick);
|
||||||
|
|
||||||
@ -2984,12 +2941,6 @@ static int MenuSettingsVideo()
|
|||||||
GuiImageData btnOutline(button_png);
|
GuiImageData btnOutline(button_png);
|
||||||
GuiImageData btnOutlineOver(button_over_png);
|
GuiImageData btnOutlineOver(button_over_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage backBtnImg(&btnOutline);
|
GuiImage backBtnImg(&btnOutline);
|
||||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||||
@ -3001,7 +2952,8 @@ static int MenuSettingsVideo()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiOptionBrowser optionBrowser(552, 248, &options);
|
GuiOptionBrowser optionBrowser(552, 248, &options);
|
||||||
@ -3178,12 +3130,6 @@ static int MenuSettings()
|
|||||||
GuiImageData iconNetwork(icon_settings_network_png);
|
GuiImageData iconNetwork(icon_settings_network_png);
|
||||||
GuiImageData iconCheats(icon_game_cheats_png);
|
GuiImageData iconCheats(icon_game_cheats_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage backBtnImg(&btnOutline);
|
GuiImage backBtnImg(&btnOutline);
|
||||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||||
@ -3195,7 +3141,8 @@ static int MenuSettings()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText resetBtnTxt("Reset Settings", 22, (GXColor){0, 0, 0, 255});
|
GuiText resetBtnTxt("Reset Settings", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -3209,7 +3156,8 @@ static int MenuSettings()
|
|||||||
resetBtn.SetImageOver(&resetBtnImgOver);
|
resetBtn.SetImageOver(&resetBtnImgOver);
|
||||||
resetBtn.SetSoundOver(&btnSoundOver);
|
resetBtn.SetSoundOver(&btnSoundOver);
|
||||||
resetBtn.SetSoundClick(&btnSoundClick);
|
resetBtn.SetSoundClick(&btnSoundClick);
|
||||||
resetBtn.SetTrigger(&trigA);
|
resetBtn.SetTrigger(trigA);
|
||||||
|
resetBtn.SetTrigger(trig2);
|
||||||
resetBtn.SetEffectGrow();
|
resetBtn.SetEffectGrow();
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
@ -3239,7 +3187,8 @@ static int MenuSettings()
|
|||||||
savingBtn.SetIcon(&fileBtnIcon);
|
savingBtn.SetIcon(&fileBtnIcon);
|
||||||
savingBtn.SetSoundOver(&btnSoundOver);
|
savingBtn.SetSoundOver(&btnSoundOver);
|
||||||
savingBtn.SetSoundClick(&btnSoundClick);
|
savingBtn.SetSoundClick(&btnSoundClick);
|
||||||
savingBtn.SetTrigger(&trigA);
|
savingBtn.SetTrigger(trigA);
|
||||||
|
savingBtn.SetTrigger(trig2);
|
||||||
savingBtn.SetEffectGrow();
|
savingBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText menuBtnTxt("Menu", 22, (GXColor){0, 0, 0, 255});
|
GuiText menuBtnTxt("Menu", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -3256,7 +3205,8 @@ static int MenuSettings()
|
|||||||
menuBtn.SetIcon(&menuBtnIcon);
|
menuBtn.SetIcon(&menuBtnIcon);
|
||||||
menuBtn.SetSoundOver(&btnSoundOver);
|
menuBtn.SetSoundOver(&btnSoundOver);
|
||||||
menuBtn.SetSoundClick(&btnSoundClick);
|
menuBtn.SetSoundClick(&btnSoundClick);
|
||||||
menuBtn.SetTrigger(&trigA);
|
menuBtn.SetTrigger(trigA);
|
||||||
|
menuBtn.SetTrigger(trig2);
|
||||||
menuBtn.SetEffectGrow();
|
menuBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText networkBtnTxt("Network", 22, (GXColor){0, 0, 0, 255});
|
GuiText networkBtnTxt("Network", 22, (GXColor){0, 0, 0, 255});
|
||||||
@ -3273,7 +3223,8 @@ static int MenuSettings()
|
|||||||
networkBtn.SetIcon(&networkBtnIcon);
|
networkBtn.SetIcon(&networkBtnIcon);
|
||||||
networkBtn.SetSoundOver(&btnSoundOver);
|
networkBtn.SetSoundOver(&btnSoundOver);
|
||||||
networkBtn.SetSoundClick(&btnSoundClick);
|
networkBtn.SetSoundClick(&btnSoundClick);
|
||||||
networkBtn.SetTrigger(&trigA);
|
networkBtn.SetTrigger(trigA);
|
||||||
|
networkBtn.SetTrigger(trig2);
|
||||||
networkBtn.SetEffectGrow();
|
networkBtn.SetEffectGrow();
|
||||||
|
|
||||||
if(!FindGameGenie()) sprintf(s, "DISABLED");
|
if(!FindGameGenie()) sprintf(s, "DISABLED");
|
||||||
@ -3296,7 +3247,8 @@ static int MenuSettings()
|
|||||||
cheatsBtn.SetIcon(&cheatsBtnIcon);
|
cheatsBtn.SetIcon(&cheatsBtnIcon);
|
||||||
cheatsBtn.SetSoundOver(&btnSoundOver);
|
cheatsBtn.SetSoundOver(&btnSoundOver);
|
||||||
cheatsBtn.SetSoundClick(&btnSoundClick);
|
cheatsBtn.SetSoundClick(&btnSoundClick);
|
||||||
cheatsBtn.SetTrigger(&trigA);
|
cheatsBtn.SetTrigger(trigA);
|
||||||
|
cheatsBtn.SetTrigger(trig2);
|
||||||
cheatsBtn.SetEffectGrow();
|
cheatsBtn.SetEffectGrow();
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
@ -3398,12 +3350,6 @@ static int MenuSettingsFile()
|
|||||||
GuiImageData btnOutline(button_long_png);
|
GuiImageData btnOutline(button_long_png);
|
||||||
GuiImageData btnOutlineOver(button_long_over_png);
|
GuiImageData btnOutlineOver(button_long_over_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage backBtnImg(&btnOutline);
|
GuiImage backBtnImg(&btnOutline);
|
||||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||||
@ -3415,7 +3361,8 @@ static int MenuSettingsFile()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiOptionBrowser optionBrowser(552, 248, &options);
|
GuiOptionBrowser optionBrowser(552, 248, &options);
|
||||||
@ -3576,12 +3523,6 @@ static int MenuSettingsMenu()
|
|||||||
GuiImageData btnOutline(button_long_png);
|
GuiImageData btnOutline(button_long_png);
|
||||||
GuiImageData btnOutlineOver(button_long_over_png);
|
GuiImageData btnOutlineOver(button_long_over_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage backBtnImg(&btnOutline);
|
GuiImage backBtnImg(&btnOutline);
|
||||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||||
@ -3593,7 +3534,8 @@ static int MenuSettingsMenu()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiOptionBrowser optionBrowser(552, 248, &options);
|
GuiOptionBrowser optionBrowser(552, 248, &options);
|
||||||
@ -3756,12 +3698,6 @@ static int MenuSettingsNetwork()
|
|||||||
GuiImageData btnOutline(button_long_png);
|
GuiImageData btnOutline(button_long_png);
|
||||||
GuiImageData btnOutlineOver(button_long_over_png);
|
GuiImageData btnOutlineOver(button_long_over_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage backBtnImg(&btnOutline);
|
GuiImage backBtnImg(&btnOutline);
|
||||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||||
@ -3773,7 +3709,8 @@ static int MenuSettingsNetwork()
|
|||||||
backBtn.SetImageOver(&backBtnImgOver);
|
backBtn.SetImageOver(&backBtnImgOver);
|
||||||
backBtn.SetSoundOver(&btnSoundOver);
|
backBtn.SetSoundOver(&btnSoundOver);
|
||||||
backBtn.SetSoundClick(&btnSoundClick);
|
backBtn.SetSoundClick(&btnSoundClick);
|
||||||
backBtn.SetTrigger(&trigA);
|
backBtn.SetTrigger(trigA);
|
||||||
|
backBtn.SetTrigger(trig2);
|
||||||
backBtn.SetEffectGrow();
|
backBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiOptionBrowser optionBrowser(552, 248, &options);
|
GuiOptionBrowser optionBrowser(552, 248, &options);
|
||||||
@ -3848,15 +3785,25 @@ static int MenuSettingsNetwork()
|
|||||||
void
|
void
|
||||||
MainMenu (int menu)
|
MainMenu (int menu)
|
||||||
{
|
{
|
||||||
|
static bool init = false;
|
||||||
int currentMenu = menu;
|
int currentMenu = menu;
|
||||||
lastMenu = MENU_NONE;
|
lastMenu = MENU_NONE;
|
||||||
|
|
||||||
#ifdef HW_RVL
|
if(!init)
|
||||||
pointer[0] = new GuiImageData(player1_point_png);
|
{
|
||||||
pointer[1] = new GuiImageData(player2_point_png);
|
init = true;
|
||||||
pointer[2] = new GuiImageData(player3_point_png);
|
#ifdef HW_RVL
|
||||||
pointer[3] = new GuiImageData(player4_point_png);
|
pointer[0] = new GuiImageData(player1_point_png);
|
||||||
#endif
|
pointer[1] = new GuiImageData(player2_point_png);
|
||||||
|
pointer[2] = new GuiImageData(player3_point_png);
|
||||||
|
pointer[3] = new GuiImageData(player4_point_png);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
trigA = new GuiTrigger;
|
||||||
|
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
|
trig2 = new GuiTrigger;
|
||||||
|
trig2->SetSimpleTrigger(-1, WPAD_BUTTON_2, 0);
|
||||||
|
}
|
||||||
|
|
||||||
mainWindow = new GuiWindow(screenwidth, screenheight);
|
mainWindow = new GuiWindow(screenwidth, screenheight);
|
||||||
|
|
||||||
@ -3868,18 +3815,11 @@ MainMenu (int menu)
|
|||||||
{
|
{
|
||||||
gameScreenImg = new GuiImage(gameScreenTex, screenwidth, screenheight);
|
gameScreenImg = new GuiImage(gameScreenTex, screenwidth, screenheight);
|
||||||
gameScreenImg->SetAlpha(192);
|
gameScreenImg->SetAlpha(192);
|
||||||
//gameScreenImg->SetStripe(100);
|
|
||||||
gameScreenImg->ColorStripe(30);
|
gameScreenImg->ColorStripe(30);
|
||||||
mainWindow->Append(gameScreenImg);
|
mainWindow->Append(gameScreenImg);
|
||||||
bgImg->SetVisible(false);
|
bgImg->SetVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
if(GCSettings.WiimoteOrientation)
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
else
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
|
|
||||||
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
||||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
GuiImageData bgTop(bg_top_png);
|
GuiImageData bgTop(bg_top_png);
|
||||||
@ -3901,7 +3841,8 @@ MainMenu (int menu)
|
|||||||
btnLogo->SetLabel(&logoTxt);
|
btnLogo->SetLabel(&logoTxt);
|
||||||
btnLogo->SetSoundOver(&btnSoundOver);
|
btnLogo->SetSoundOver(&btnSoundOver);
|
||||||
btnLogo->SetSoundClick(&btnSoundClick);
|
btnLogo->SetSoundClick(&btnSoundClick);
|
||||||
btnLogo->SetTrigger(&trigA);
|
btnLogo->SetTrigger(trigA);
|
||||||
|
btnLogo->SetTrigger(trig2);
|
||||||
btnLogo->SetUpdateCallback(WindowCredits);
|
btnLogo->SetUpdateCallback(WindowCredits);
|
||||||
|
|
||||||
mainWindow->Append(bgTopImg);
|
mainWindow->Append(bgTopImg);
|
||||||
@ -4004,13 +3945,6 @@ MainMenu (int menu)
|
|||||||
delete bgBottomImg;
|
delete bgBottomImg;
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
|
||||||
#ifdef HW_RVL
|
|
||||||
delete pointer[0];
|
|
||||||
delete pointer[1];
|
|
||||||
delete pointer[2];
|
|
||||||
delete pointer[3];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mainWindow = NULL;
|
mainWindow = NULL;
|
||||||
|
|
||||||
if(gameScreenImg)
|
if(gameScreenImg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user