mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- switched the input grid to the new font. Also use the same scale as the rest of the menus.
This commit is contained in:
parent
659de5d2d8
commit
a08cc2b477
4 changed files with 18 additions and 18 deletions
|
@ -512,7 +512,7 @@ class SaveMenu : LoadSaveMenu
|
|||
if (mkey == MKEY_Enter)
|
||||
{
|
||||
String SavegameString = (Selected != 0)? manager.GetSavegame(Selected).SaveTitle : "";
|
||||
mInput = TextEnterMenu.OpenTextEnter(self, ConFont, SavegameString, -1, fromcontroller);
|
||||
mInput = TextEnterMenu.OpenTextEnter(self, Menu.OptionFont(), SavegameString, -1, fromcontroller);
|
||||
mInput.ActivateMenu();
|
||||
mEntering = true;
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ class ListMenuItemPlayerNameBox : ListMenuItemSelectable
|
|||
if (mkey == Menu.MKEY_Enter)
|
||||
{
|
||||
Menu.MenuSound ("menu/choose");
|
||||
mEnter = TextEnterMenu.OpenTextEnter(Menu.GetCurrentMenu(), SmallFont, mPlayerName, 128, fromcontroller);
|
||||
mEnter = TextEnterMenu.OpenTextEnter(Menu.GetCurrentMenu(), Menu.OptionFont(), mPlayerName, 128, fromcontroller);
|
||||
mEnter.ActivateMenu();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class os_SearchField : OptionMenuItemTextField
|
|||
if (mkey == Menu.MKEY_Enter)
|
||||
{
|
||||
Menu.MenuSound("menu/choose");
|
||||
mEnter = TextEnterMenu.OpenTextEnter(Menu.GetCurrentMenu(), SmallFont, mText, -1, fromcontroller);
|
||||
mEnter = TextEnterMenu.OpenTextEnter(Menu.GetCurrentMenu(), Menu.OptionFont(), mText, -1, fromcontroller);
|
||||
mEnter.ActivateMenu();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -175,8 +175,8 @@ class TextEnterMenu : Menu
|
|||
|
||||
override bool MouseEvent(int type, int x, int y)
|
||||
{
|
||||
int cell_width = 18 * CleanXfac;
|
||||
int cell_height = 12 * CleanYfac;
|
||||
int cell_width = 18 * CleanXfac_1;
|
||||
int cell_height = 16 * CleanYfac_1;
|
||||
int screen_y = screen.GetHeight() - INPUTGRID_HEIGHT * cell_height;
|
||||
int screen_x = (screen.GetWidth() - INPUTGRID_WIDTH * cell_width) / 2;
|
||||
|
||||
|
@ -316,9 +316,9 @@ class TextEnterMenu : Menu
|
|||
if (mInputGridOkay)
|
||||
{
|
||||
String InputGridChars = Chars;
|
||||
int cell_width = 18 * CleanXfac;
|
||||
int cell_height = 12 * CleanYfac;
|
||||
int top_padding = cell_height / 2 - displayFont.GetHeight() * CleanYfac / 2;
|
||||
int cell_width = 18 * CleanXfac_1;
|
||||
int cell_height = 16 * CleanYfac_1;
|
||||
int top_padding = cell_height / 2 - displayFont.GetHeight() * CleanYfac_1 / 2;
|
||||
|
||||
// Darken the background behind the character grid.
|
||||
screen.Dim(0, 0.8, 0, screen.GetHeight() - INPUTGRID_HEIGHT * cell_height, screen.GetWidth(), INPUTGRID_HEIGHT * cell_height);
|
||||
|
@ -348,27 +348,27 @@ class TextEnterMenu : Menu
|
|||
if (ch > 32)
|
||||
{
|
||||
// Draw a normal character.
|
||||
screen.DrawChar(displayFont, colr, xx + cell_width/2 - width*CleanXfac/2, yy + top_padding, ch, DTA_CleanNoMove, true);
|
||||
screen.DrawChar(displayFont, colr, xx + cell_width/2 - width*CleanXfac_1/2, yy + top_padding, ch, DTA_CleanNoMove_1, true);
|
||||
}
|
||||
else if (ch == 32)
|
||||
{
|
||||
// Draw the space as a box outline. We also draw it 50% wider than it really is.
|
||||
int x1 = xx + cell_width/2 - width * CleanXfac * 3 / 4;
|
||||
int x2 = x1 + width * 3 * CleanXfac / 2;
|
||||
int x1 = xx + cell_width/2 - width * CleanXfac_1 * 3 / 4;
|
||||
int x2 = x1 + width * 3 * CleanXfac_1 / 2;
|
||||
int y1 = yy + top_padding;
|
||||
int y2 = y1 + displayFont.GetHeight() * CleanYfac;
|
||||
screen.Clear(x1, y1, x2, y1+CleanYfac, palcolor); // top
|
||||
screen.Clear(x1, y2, x2, y2+CleanYfac, palcolor); // bottom
|
||||
screen.Clear(x1, y1+CleanYfac, x1+CleanXfac, y2, palcolor); // left
|
||||
screen.Clear(x2-CleanXfac, y1+CleanYfac, x2, y2, palcolor); // right
|
||||
int y2 = y1 + displayFont.GetHeight() * CleanYfac_1;
|
||||
screen.Clear(x1, y1, x2, y1+CleanYfac_1, palcolor); // top
|
||||
screen.Clear(x1, y2, x2, y2+CleanYfac_1, palcolor); // bottom
|
||||
screen.Clear(x1, y1+CleanYfac_1, x1+CleanXfac_1, y2, palcolor); // left
|
||||
screen.Clear(x2-CleanXfac_1, y1+CleanYfac_1, x2, y2, palcolor); // right
|
||||
}
|
||||
else if (ch == 8 || ch == 0)
|
||||
{
|
||||
// Draw the backspace and end "characters".
|
||||
String str = ch == 8 ? "BS" : "ED";
|
||||
screen.DrawText(displayFont, colr,
|
||||
xx + cell_width/2 - displayFont.StringWidth(str)*CleanXfac/2,
|
||||
yy + top_padding, str, DTA_CleanNoMove, true);
|
||||
xx + cell_width/2 - displayFont.StringWidth(str)*CleanXfac_1/2,
|
||||
yy + top_padding, str, DTA_CleanNoMove_1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue