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