Fixed bug #536733: Text entries don't handle upper-case (from Daniel).
This commit is contained in:
parent
3e8f1e1309
commit
29985cea83
4 changed files with 8 additions and 5 deletions
src
|
@ -198,6 +198,8 @@ enum _scroll_state_ {
|
|||
extern char GameRunning;
|
||||
/// Flag telling if the game is paused
|
||||
extern char GamePaused;
|
||||
/// Flag telling not to advance to the next game cycle
|
||||
extern char SkipGameCycle;
|
||||
|
||||
/// pressed mouse buttons (normal,double,dragged,long)
|
||||
extern enum _mouse_buttons_ MouseButtons;
|
||||
|
|
|
@ -248,7 +248,7 @@ extern void DrawMenuButton(MenuButtonId button,unsigned flags,unsigned w,unsigne
|
|||
/// Draw and process a menu
|
||||
extern void ProcessMenu(int MenuId, int Loop);
|
||||
/// Keyboard handler for menus
|
||||
extern int MenuHandleKeyboard(int key);
|
||||
extern int MenuHandleKeyboard(int key, int keychar);
|
||||
/// Called if the mouse is moved in Menu interface state
|
||||
extern void MenuHandleMouseMove(int x,int y);
|
||||
/// Called if any mouse button is pressed down
|
||||
|
|
|
@ -71,6 +71,7 @@ local int InputIndex; /// current index into input
|
|||
local char InputStatusLine[80]; /// Last input status line
|
||||
global char GameRunning; /// Current running state
|
||||
global char GamePaused; /// Current pause state
|
||||
global char SkipGameCycle; /// Skip the next game cycle
|
||||
global enum _iface_state_ InterfaceState; /// Current interface state
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
|
@ -776,7 +777,7 @@ global void HandleKeyDown(unsigned key,unsigned keychar)
|
|||
return;
|
||||
|
||||
case IfaceStateMenu: // Menu active
|
||||
MenuHandleKeyboard(key);
|
||||
MenuHandleKeyboard(key, keychar);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -624,7 +624,7 @@ local Menuitem NetMultiClientMenuItems[] = {
|
|||
{ MI_TYPE_PULLDOWN, 220, 10+300, 0, GameFont, NULL, NULL,
|
||||
{ pulldown:{ tssoptions, 152, 20, MBUTTON_PULLDOWN, GameTSSAction, 5, 0, 0, 0, MI_PSTATE_PASSIVE} } },
|
||||
|
||||
{ MI_TYPE_GEM, 10, 32+22, 0, LargeFont, NULL, NULL,
|
||||
{ MI_TYPE_GEM, 10, 32+22*1, 0, LargeFont, NULL, NULL,
|
||||
{ gem:{ 0, 18, 18, MBUTTON_GEM_SQUARE, MultiClientGemAction} } },
|
||||
{ MI_TYPE_GEM, 10, 32+22*2, 0, LargeFont, NULL, NULL,
|
||||
{ gem:{ 0, 18, 18, MBUTTON_GEM_SQUARE, MultiClientGemAction} } },
|
||||
|
@ -2521,7 +2521,7 @@ global void NetClientUpdateState(void)
|
|||
** @param key Key scancode.
|
||||
** @return True, if key is handled; otherwise false.
|
||||
*/
|
||||
global int MenuHandleKeyboard(int key) // FIXME: Should be MenuKeyDown(), and act on _new_ MenuKeyUp() !!!
|
||||
global int MenuHandleKeyboard(int key, int keychar) // FIXME: Should be MenuKeyDown(), and act on _new_ MenuKeyUp() !!!
|
||||
{ // to implement button animation (depress before action)
|
||||
int i, n;
|
||||
Menuitem *mi;
|
||||
|
@ -2560,7 +2560,7 @@ inkey:
|
|||
default:
|
||||
if (key >= 32 && key < 0x100) {
|
||||
if (mi->d.input.nch < mi->d.input.maxch) {
|
||||
mi->d.input.buffer[mi->d.input.nch++] = key;
|
||||
mi->d.input.buffer[mi->d.input.nch++] = keychar;
|
||||
strcpy(mi->d.input.buffer + mi->d.input.nch, "~!_");
|
||||
MustRedraw |= RedrawMenu;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue