Fixed improper binding and text location

This commit is contained in:
smallmodel 2023-12-28 01:29:33 +01:00
parent 043f8cba22
commit 2ef95ddba9
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -118,14 +118,14 @@ qboolean UIBindButton::KeyEvent(int key, unsigned int time)
return qfalse;
}
if (key == K_ESCAPE) {
m_getkey = false;
uWinMan.SetBindActive(NULL);
uii.Snd_PlaySound(m_entersound);
} else {
if (key != K_ESCAPE) {
uWinMan.BindKeyToCommand(m_bindcommand, key, m_bindindex, m_alternate);
}
m_getkey = false;
uWinMan.SetBindActive(NULL);
uii.Snd_PlaySound(m_entersound);
return qtrue;
}
@ -194,7 +194,7 @@ void UIBindButton::DrawUnpressed(void)
}
m_font->PrintJustified(
UIRect2D(clientFrame.size.width, clientFrame.size.height, clientFrame.pos.x + 1, clientFrame.pos.y + 1),
UIRect2D(clientFrame.pos.x + 1, clientFrame.pos.y + 1, clientFrame.size.width, clientFrame.size.height),
m_iFontAlignmentHorizontal,
m_iFontAlignmentVertical,
Sys_LV_CL_ConvertString(s),