Fixing issue when assigning mouse button if a citem is still pointed out; Fixing still processing key commands even if we want to assign a key
This commit is contained in:
parent
d87c4ab289
commit
8a7e7de051
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
D1X-Rebirth Changelog
|
||||||
|
|
||||||
|
20100705
|
||||||
|
--------
|
||||||
|
main/kconfig.c: Fixing issue when assigning mouse button if a citem is still pointed out; Fixing still processing key commands even if we want to assign a key
|
||||||
|
|
||||||
20100704
|
20100704
|
||||||
--------
|
--------
|
||||||
main/net_udp.c: Fixed Compiler-warning on Windows
|
main/net_udp.c: Fixed Compiler-warning on Windows
|
||||||
|
|
|
@ -625,6 +625,10 @@ int kconfig_key_command(window *wind, d_event *event, kc_menu *menu)
|
||||||
|
|
||||||
k = ((d_event_keycommand *)event)->keycode;
|
k = ((d_event_keycommand *)event)->keycode;
|
||||||
|
|
||||||
|
// when changing, process no keys instead of ESC
|
||||||
|
if (menu->changing && (k != -2 && k != KEY_ESC))
|
||||||
|
return 0;
|
||||||
|
|
||||||
switch (k)
|
switch (k)
|
||||||
{
|
{
|
||||||
case KEY_CTRLED+KEY_D:
|
case KEY_CTRLED+KEY_D:
|
||||||
|
@ -795,14 +799,13 @@ int kconfig_handler(window *wind, d_event *event, kc_menu *menu)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_MOUSE_BUTTON_DOWN:
|
case EVENT_MOUSE_BUTTON_DOWN:
|
||||||
if (menu->changing && (menu->items[menu->citem].type == BT_MOUSE_BUTTON))
|
case EVENT_MOUSE_BUTTON_UP:
|
||||||
|
if (menu->changing && (menu->items[menu->citem].type == BT_MOUSE_BUTTON) && (event->type == EVENT_MOUSE_BUTTON_UP))
|
||||||
{
|
{
|
||||||
kc_change_mousebutton( menu, event, &menu->items[menu->citem] );
|
kc_change_mousebutton( menu, event, &menu->items[menu->citem] );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// else fall through
|
|
||||||
|
|
||||||
case EVENT_MOUSE_BUTTON_UP:
|
|
||||||
if (mouse_get_button(event) != 0)
|
if (mouse_get_button(event) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue