mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-17 16:59:17 +01:00
Align keyboard with background better
This commit is contained in:
parent
20cb3c9e93
commit
8edbd2e1b1
@ -87,12 +87,12 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
||||
keyTextbox = new GuiImageData(keyboard_textbox_png);
|
||||
keyTextboxImg = new GuiImage(keyTextbox);
|
||||
keyTextboxImg->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
keyTextboxImg->SetPosition(0, 0);
|
||||
keyTextboxImg->SetPosition(0, 40);//(0,0);
|
||||
this->Append(keyTextboxImg);
|
||||
|
||||
kbText = new GuiText(kbtextstr, 20, (GXColor){0, 0, 0, 0xff});
|
||||
kbText->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
kbText->SetPosition(0, 13);
|
||||
kbText->SetPosition(0, 53);//(0, 13);
|
||||
this->Append(kbText);
|
||||
|
||||
key = new GuiImageData(keyboard_key_png);
|
||||
@ -120,7 +120,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
||||
keyBack->SetSoundClick(keySoundClick);
|
||||
keyBack->SetTrigger(trigA);
|
||||
keyBack->SetTrigger(trigB);
|
||||
keyBack->SetPosition(10*42+40, 0*42+80);
|
||||
keyBack->SetPosition(10*42+40, 0*42+120);//(10*42+40, 0*42+80);
|
||||
keyBack->SetEffectGrow();
|
||||
this->Append(keyBack);
|
||||
|
||||
@ -134,7 +134,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
||||
keyCaps->SetSoundOver(keySoundOver);
|
||||
keyCaps->SetSoundClick(keySoundClick);
|
||||
keyCaps->SetTrigger(trigA);
|
||||
keyCaps->SetPosition(0, 2*42+80);
|
||||
keyCaps->SetPosition(0, 2*42+120);//(0, 2*42+80);
|
||||
keyCaps->SetEffectGrow();
|
||||
this->Append(keyCaps);
|
||||
|
||||
@ -148,7 +148,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
||||
keyShift->SetSoundOver(keySoundOver);
|
||||
keyShift->SetSoundClick(keySoundClick);
|
||||
keyShift->SetTrigger(trigA);
|
||||
keyShift->SetPosition(21, 3*42+80);
|
||||
keyShift->SetPosition(21, 3*42+120);//(21, 3*42+80);
|
||||
keyShift->SetEffectGrow();
|
||||
this->Append(keyShift);
|
||||
|
||||
@ -160,7 +160,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
||||
keySpace->SetSoundOver(keySoundOver);
|
||||
keySpace->SetSoundClick(keySoundClick);
|
||||
keySpace->SetTrigger(trigA);
|
||||
keySpace->SetPosition(0, 4*42+80);
|
||||
keySpace->SetPosition(0, 4*42+120);//(0, 4*42+80);
|
||||
keySpace->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
keySpace->SetEffectGrow();
|
||||
this->Append(keySpace);
|
||||
@ -183,7 +183,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
||||
keyBtn[i][j]->SetSoundClick(keySoundClick);
|
||||
keyBtn[i][j]->SetTrigger(trigA);
|
||||
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+120);//SetPosition(j*42+21*i+40, i*42+80);
|
||||
keyBtn[i][j]->SetEffectGrow();
|
||||
this->Append(keyBtn[i][j]);
|
||||
}
|
||||
|
@ -895,7 +895,7 @@ int GameWindowPrompt()
|
||||
btnLeft.SetPosition(20, 0);
|
||||
btnLeft.SetImage(&btnLeftImg);
|
||||
btnLeft.SetSoundOver(&btnSoundOver);
|
||||
btnLeft.SetSoundClick(&btnClick);
|
||||
//btnLeft.SetSoundClick(&btnClick);
|
||||
btnLeft.SetTrigger(&trigA);
|
||||
btnLeft.SetTrigger(&trigL);
|
||||
btnLeft.SetTrigger(&trigMinus);
|
||||
@ -907,7 +907,7 @@ int GameWindowPrompt()
|
||||
btnRight.SetPosition(-20, 0);
|
||||
btnRight.SetImage(&btnRightImg);
|
||||
btnRight.SetSoundOver(&btnSoundOver);
|
||||
btnRight.SetSoundClick(&btnClick);
|
||||
//btnRight.SetSoundClick(&btnClick);
|
||||
btnRight.SetTrigger(&trigA);
|
||||
btnRight.SetTrigger(&trigR);
|
||||
btnRight.SetTrigger(&trigPlus);
|
||||
@ -1047,6 +1047,7 @@ int GameWindowPrompt()
|
||||
else if((btnRight.GetState() == STATE_CLICKED) && (Settings.xflip == no)){//next game
|
||||
promptWindow.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50);
|
||||
changed = 1;
|
||||
btnClick.Play();
|
||||
gameSelected = (gameSelected + 1) % gameCnt;
|
||||
btnRight.ResetState();
|
||||
break;
|
||||
@ -1055,27 +1056,29 @@ int GameWindowPrompt()
|
||||
else if((btnLeft.GetState() == STATE_CLICKED) && (Settings.xflip == no)){//previous game
|
||||
promptWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50);
|
||||
changed = 2;
|
||||
btnClick.Play();
|
||||
gameSelected = (gameSelected - 1 + gameCnt) % gameCnt;
|
||||
btnLeft.ResetState();
|
||||
break;
|
||||
}
|
||||
|
||||
else if((btnRight.GetState() == STATE_CLICKED) && (Settings.xflip == yes)){//next game
|
||||
promptWindow.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50);
|
||||
changed = 1;
|
||||
else if((btnRight.GetState() == STATE_CLICKED) && (Settings.xflip == yes)){//previous game
|
||||
promptWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50);
|
||||
changed = 2;
|
||||
btnClick.Play();
|
||||
gameSelected = (gameSelected - 1 + gameCnt) % gameCnt;
|
||||
btnRight.ResetState();
|
||||
break;
|
||||
}
|
||||
|
||||
else if((btnLeft.GetState() == STATE_CLICKED) && (Settings.xflip == yes)){//previous game
|
||||
promptWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50);
|
||||
changed = 2;
|
||||
else if((btnLeft.GetState() == STATE_CLICKED) && (Settings.xflip == yes)){//netx game
|
||||
promptWindow.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50);
|
||||
changed = 1;
|
||||
btnClick.Play();
|
||||
gameSelected = (gameSelected + 1) % gameCnt;
|
||||
btnLeft.ResetState();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1858,7 +1861,7 @@ static int OnScreenKeyboard(char * var, u16 maxlen)
|
||||
GuiButton okBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
|
||||
|
||||
okBtn.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
||||
okBtn.SetPosition(25, -25);
|
||||
okBtn.SetPosition(5, 15);//(25, -25);
|
||||
|
||||
okBtn.SetLabel(&okBtnTxt);
|
||||
okBtn.SetImage(&okBtnImg);
|
||||
@ -1871,7 +1874,7 @@ static int OnScreenKeyboard(char * var, u16 maxlen)
|
||||
GuiImage cancelBtnImg(&btnOutline);
|
||||
GuiButton cancelBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
|
||||
cancelBtn.SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
|
||||
cancelBtn.SetPosition(-25, -25);
|
||||
cancelBtn.SetPosition(-5, 15);//(-25, -25);
|
||||
cancelBtn.SetLabel(&cancelBtnTxt);
|
||||
cancelBtn.SetImage(&cancelBtnImg);
|
||||
cancelBtn.SetSoundOver(&btnSoundOver);
|
||||
|
Loading…
Reference in New Issue
Block a user