diff --git a/gui.pnproj b/gui.pnproj
index 9d732305..db4c5bf5 100644
--- a/gui.pnproj
+++ b/gui.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/source/language.c b/source/language.c
index 15edf11a..3e3a0f42 100644
--- a/source/language.c
+++ b/source/language.c
@@ -50,6 +50,7 @@ snprintf(LANGUAGE.Cantbeformated, sizeof(LANGUAGE.Cantbeformated), "Can't be for
snprintf(LANGUAGE.Cantdelete, sizeof(LANGUAGE.Cantdelete), "Can't delete:");
snprintf(LANGUAGE.ClicktoDownloadCovers, sizeof(LANGUAGE.ClicktoDownloadCovers), "Click to Download Covers");
snprintf(LANGUAGE.Clock, sizeof(LANGUAGE.Clock), "Clock");
+snprintf(LANGUAGE.Close, sizeof(LANGUAGE.Close), "Close");
snprintf(LANGUAGE.Continueinstallgame, sizeof(LANGUAGE.Continueinstallgame), "Continue to install game?");
snprintf(LANGUAGE.ConsoleDefault, sizeof(LANGUAGE.ConsoleDefault), "Console Default");
snprintf(LANGUAGE.Consoleshouldbeunlockedtomodifyit, sizeof(LANGUAGE.Consoleshouldbeunlockedtomodifyit), "Console should be unlocked to modify it.");
@@ -78,6 +79,7 @@ snprintf(LANGUAGE.DownloadBoxartimage, sizeof(LANGUAGE.DownloadBoxartimage), "Do
snprintf(LANGUAGE.Downloadfinished, sizeof(LANGUAGE.Downloadfinished), "Download finished");
snprintf(LANGUAGE.Error, sizeof(LANGUAGE.Error), "Error !");
snprintf(LANGUAGE.hour, sizeof(LANGUAGE.hour), "Hour");
+snprintf(LANGUAGE.Homemenu, sizeof(LANGUAGE.Homemenu), "HOME Menu");
snprintf(LANGUAGE.BOOTERROR, sizeof(LANGUAGE.BOOTERROR), "BOOT ERROR");
snprintf(LANGUAGE.ErrorreadingDisc, sizeof(LANGUAGE.ErrorreadingDisc), "Error reading Disc");
snprintf(LANGUAGE.ExitUSBISOLoader, sizeof(LANGUAGE.ExitUSBISOLoader), "Exit USB Loader GX?");
@@ -317,6 +319,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Clock, val, sizeof(LANGUAGE.Clock));
return;
}
+ if (strcmp(name, "Close") == 0) {
+ strcopy(LANGUAGE.Close, val, sizeof(LANGUAGE.Close));
+ return;
+ }
if (strcmp(name, "Continueinstallgame") == 0) {
strcopy(LANGUAGE.Continueinstallgame, val, sizeof(LANGUAGE.Continueinstallgame));
return;
@@ -581,6 +587,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.GotoPage, val, sizeof(LANGUAGE.GotoPage));
return;
}
+ if (strcmp(name, "Homemenu") == 0) {
+ strcopy(LANGUAGE.Homemenu, val, sizeof(LANGUAGE.Homemenu));
+ return;
+ }
if (strcmp(name, "HowtoShutdown") == 0) {
strcopy(LANGUAGE.HowtoShutdown, val, sizeof(LANGUAGE.HowtoShutdown));
return;
diff --git a/source/language.h b/source/language.h
index aaa4759c..9c46674a 100644
--- a/source/language.h
+++ b/source/language.h
@@ -13,11 +13,11 @@ struct LANGUAGE
{
char t3Covers[50];
- char addToFavorite[20];
- char all[10];
+ char addToFavorite[50];
+ char all[30];
char AppLanguage[50];
char Areyousure[50];
- char AutoPatch[20];
+ char AutoPatch[30];
char Back[20];
char Backgroundmusic[80];
char Backgroundmusicpath[100];
@@ -25,13 +25,14 @@ struct LANGUAGE
char BacktoLoader[50];
char BacktoWiiMenu[50];
char BootStandard[50];
- char Both[15];
+ char Both[35];
char Cantcreatedirectory[50];
char Cancel[20];
char Cantbeformated[50];
char Cantdelete[50];
char ClicktoDownloadCovers[50];
char Clock[20];
+ char Close[20];
char Continueinstallgame[50];
char ConsoleDefault[50];
char Consoleshouldbeunlockedtomodifyit[100];
@@ -97,13 +98,14 @@ struct LANGUAGE
char GoBack[50];
char GotoPage[50];///////
char HowtoShutdown[50];
- char hour[10];
+ char Homemenu[30];
+ char hour[30];
char keyboard[50];
char Language[50];
char Langchange[50];
char Left[50];
char LikeSysMenu[50];
- char ListSort[20];
+ char ListSort[30];
char LoadingincIOS[50];
char Loadingstandardlanguage[80];
char Loadingstandardmusic[80];
diff --git a/source/libwiigui/gui.h b/source/libwiigui/gui.h
index dae34f19..4deae061 100644
--- a/source/libwiigui/gui.h
+++ b/source/libwiigui/gui.h
@@ -392,6 +392,7 @@ class GuiElement
//int position2; //! B Scrollbariable
bool visible; //!< Visibility of the element. If false, Draw() is skipped
int focus; //!< Element focus (-1 = focus disabled, 0 = not focused, 1 = focused)
+ int dontsetfocus; //!gameCnt = gameCnt;
- gameList = l;
+
pagesize = (gameCnt > THEME.pagesize) ? THEME.pagesize : gameCnt;
scrollbaron = (gameCnt > THEME.pagesize) ? 1 : 0;
selectable = true;
listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
selectedItem = selected - offset;
- focus = 1; // allow focus
+ // allow focus
char imgPath[100];
trigA = new GuiTrigger;
@@ -204,6 +211,7 @@ GuiGameBrowser::~GuiGameBrowser()
void GuiGameBrowser::SetFocus(int f)
{
LOCK(this);
+ if(!dontsetfocus)
focus = f;
for(int i=0; iSetState(STATE_DISABLED);
}
- if(focus)
+ if(focus || !dontsetfocus)
{
if(i != selectedItem && game[i]->GetState() == STATE_SELECTED)
game[i]->ResetState();
@@ -390,7 +398,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
}
// pad/joystick navigation
- if(!focus)
+ if(!focus || dontsetfocus)
return; // skip navigation
if (scrollbaron == 1) {
@@ -642,10 +650,17 @@ void GuiGameBrowser::Reload(struct discHdr * l, int count)
LOCK(this);
gameList = l;
gameCnt = count;
- if (gameCnt == 0) gameCnt = 1;
+ if (gameCnt == 0) {
+ focus = 0;
+ dontsetfocus = 1;
+ } else {
+ dontsetfocus = 0;
+ focus = 1;
+ selectedItem = 0;
+ }
+ gameList = l;
scrollbaron = (gameCnt > THEME.pagesize) ? 1 : 0;
pagesize = (gameCnt > THEME.pagesize) ? THEME.pagesize : gameCnt;
- selectedItem = 0;
listOffset = 0;
for(int i=0; iSetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
- batteryImg[i] = new GuiImage(&battery);
- batteryImg[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
- batteryImg[i]->SetPosition(36, 0);
- batteryImg[i]->SetTile(0);
- batteryBarImg[i] = new GuiImage(&batteryBar);
- batteryBarImg[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
- batteryBarImg[i]->SetPosition(33, 0);
-
- batteryBtn[i] = new GuiButton(40, 20);
- batteryBtn[i]->SetLabel(batteryTxt[i]);
- batteryBtn[i]->SetImage(batteryBarImg[i]);
- batteryBtn[i]->SetIcon(batteryImg[i]);
- batteryBtn[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
- batteryBtn[i]->SetRumble(false);
- batteryBtn[i]->SetAlpha(70);
- }
-
-
- batteryBtn[0]->SetPosition(THEME.battery1_x, THEME.battery1_y);
- batteryBtn[1]->SetPosition(THEME.battery2_x, THEME.battery2_y);
- batteryBtn[2]->SetPosition(THEME.battery3_x, THEME.battery3_y);
- batteryBtn[3]->SetPosition(THEME.battery4_x, THEME.battery4_y);
- #endif
-
HaltGui();
GuiWindow w(screenwidth, screenheight);
- if (THEME.showBattery)
- {
- #ifdef HW_RVL
- w.Append(batteryBtn[0]);
- w.Append(batteryBtn[1]);
- w.Append(batteryBtn[2]);
- w.Append(batteryBtn[3]);
- #endif
- }
-
mainWindow->Append(&w);
ResumeGui();
@@ -2648,31 +2596,6 @@ static int MenuInstall()
{
VIDEO_WaitVSync ();
- #ifdef HW_RVL
- for(i=0; i < 4; i++)
- {
- if(WPAD_Probe(i, NULL) == WPAD_ERR_NONE) // controller connected
- {
- level = (userInput[i].wpad.battery_level / 100.0) * 4;
- if(level > 4) level = 4;
- batteryImg[i]->SetTile(level);
-
- if(level == 0)
- batteryBarImg[i]->SetImage(&batteryRed);
- else
- batteryBarImg[i]->SetImage(&batteryBar);
-
- batteryBtn[i]->SetAlpha(255);
- }
- else // controller not connected
- {
- batteryImg[i]->SetTile(0);
- batteryImg[i]->SetImage(&battery);
- batteryBtn[i]->SetAlpha(70);
- }
- }
- #endif
-
ret = DiscWait(LANGUAGE.InsertDisk,LANGUAGE.Waiting,LANGUAGE.Cancel,0,0);
if (ret < 0) {
WindowPrompt (LANGUAGE.ErrorreadingDisc,0,LANGUAGE.Back,0,0,0);
@@ -2792,16 +2715,6 @@ static int MenuInstall()
HaltGui();
- #ifdef HW_RVL
- for(i=0; i < 4; i++)
- {
- delete batteryTxt[i];
- delete batteryImg[i];
- delete batteryBarImg[i];
- delete batteryBtn[i];
- }
- #endif
-
mainWindow->Remove(&w);
ResumeGui();
return menu;