mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
message_window: fix missing button guide for optionless messages
This commit is contained in:
parent
d69f0442a7
commit
652e9d52dc
1 changed files with 14 additions and 7 deletions
|
|
@ -236,6 +236,17 @@ void DrawButton(int rowIndex, float yOffset, float width, float height, std::str
|
|||
);
|
||||
}
|
||||
|
||||
void DrawNextButtonGuide(bool isController, bool isKeyboard)
|
||||
{
|
||||
auto icon = isController
|
||||
? EButtonIcon::A
|
||||
: isKeyboard
|
||||
? EButtonIcon::Enter
|
||||
: EButtonIcon::LMB;
|
||||
|
||||
ButtonGuide::Open(Button(Localise("Common_Next"), icon));
|
||||
}
|
||||
|
||||
static void ResetSelection()
|
||||
{
|
||||
g_selectedRowIndex = g_defaultButtonIndex;
|
||||
|
|
@ -391,13 +402,7 @@ void MessageWindow::Draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
auto icon = isController
|
||||
? EButtonIcon::A
|
||||
: isKeyboard
|
||||
? EButtonIcon::Enter
|
||||
: EButtonIcon::LMB;
|
||||
|
||||
ButtonGuide::Open(Button(Localise("Common_Next"), icon));
|
||||
DrawNextButtonGuide(isController, isKeyboard);
|
||||
|
||||
if (!g_isControlsVisible && g_isAccepted)
|
||||
{
|
||||
|
|
@ -411,6 +416,8 @@ void MessageWindow::Draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
DrawNextButtonGuide(isController, isKeyboard);
|
||||
|
||||
if (g_isAccepted)
|
||||
{
|
||||
g_result = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue