add return to Wii U menu in vWii versions

This commit is contained in:
Christopher Roy Bratusek 2013-01-30 22:22:36 +01:00
parent 32c292791c
commit 34aaa034b8
4 changed files with 27 additions and 1 deletions

View File

@ -9,6 +9,7 @@
extern bool runaway;
extern bool restarthbf;
extern bool gowiiu;
/*** Extern variables ***/
extern GuiWindow * mainWindow;
@ -45,12 +46,14 @@ endPrompt()
GuiImageData btn(Theme.button);
GuiImage systemmenuImg(&btn);
GuiImage bootmiiImg(&btn);
GuiImage wiiuImg(&btn);
GuiImage hbfImg(&btn);
GuiImage shutdownImg(&btn);
// Buttons over data
GuiImageData btn_over(Theme.button_focus);
GuiImage bootmiiImgOver(&btn_over);
GuiImage wiiuImgOver(&btn_over);
GuiImage hbfImgOver(&btn_over);
GuiImage systemmenuImgOver(&btn_over);
GuiImage shutdownImgOver(&btn_over);
@ -67,6 +70,14 @@ endPrompt()
bootmii.SetImage(&bootmiiImg);
bootmii.SetImageOver(&bootmiiImgOver);
bootmii.SetTrigger(&trigA);
#else
GuiText wiiuTxt(tr("Exit to Wii U menu"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255});
GuiButton wiiu(btn.GetWidth(), btn.GetHeight());
wiiu.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
wiiu.SetPosition(0, 75);
wiiu.SetImage(&wiiuImg);
wiiu.SetImageOver(&wiiuImgOver);
wiiu.SetTrigger(&trigA);
#endif
GuiText hbfTxt(tr("Restart HBF"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255});
GuiButton hbf(btn.GetWidth(), btn.GetHeight());
@ -132,6 +143,13 @@ endPrompt()
menu = MENU_EXIT;
stop = true;
}
#else
if(wiiu.GetState() == STATE_CLICKED)
{
gowiiu = true;
menu = MENU_EXIT;
stop = true;
}
#endif
if(hbf.GetState() == STATE_CLICKED)
{

View File

@ -65,6 +65,7 @@ bool wiiload = false;
bool goneek2o = false;
bool gorealnand = false;
bool restarthbf = false;
bool gowiiu = false;
bool updatehbf = false;
bool gosegui = false;
const char* segui_loc;
@ -310,7 +311,13 @@ main(int argc, char *argv[])
BootHomebrew ();
}
}
#ifndef VWII
#ifdef VWII
else if(gowiiu)
{
xprintf("Going into Wii U menu\n");
WII_LaunchTitle(0x0001000248435641);
}
#else
else if(get_priiloader() == 2)
{
xprintf("Entering magic key\n");

View File

@ -1,6 +1,7 @@
//rev43:
- added chinese translation and font file (thanks to kavid)
- fixed downloading japanese font file from server
- add "Return to Wii U menu" in vWii versions
//rev42:
- changed default options: