Changeset 792

Show
Ignore:
Timestamp:
03/18/08 14:51:10 (9 months ago)
Author:
takkaria
Message:

Make the buttons work in roguelike mode. (suggestion by Pete Mack)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/util.c

    r757 r792  
    12031203                        { 
    12041204                                /* Rewrite the event */ 
    1205                                 ke.type = EVT_KBRD
     1205                                ke.type = EVT_BUTTON
    12061206                                ke.key = key; 
    12071207                                ke.index = 0; 
     
    26812681        int mode; 
    26822682 
     2683        char tmp[2] = { '\0', '\0' }; 
     2684 
    26832685        ui_event_data ke = EVENT_EMPTY; 
    26842686 
     
    28662868 
    28672869 
     2870                /* Buttons are always specified in standard keyset */ 
     2871                if (ke.type == EVT_BUTTON) 
     2872                { 
     2873                        act = tmp; 
     2874                        tmp[0] = ke.key; 
     2875                } 
     2876 
    28682877                /* Look up applicable keymap */ 
    2869                 act = keymap_act[mode][(byte)(ke.key)]; 
     2878                else 
     2879                        act = keymap_act[mode][(byte)(ke.key)]; 
    28702880 
    28712881                /* Apply keymap if not inside a keymap already */