X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=6577f95127e93d2b049435c5016188a94a3d6195;hb=014f8db5b98964dddaf817ce5cd8cf7930bc7ae4;hp=d57b503061e83e0aac175d7e350cd6fb32b5423f;hpb=bd5cd06243740a2fac2a5ee5b026a23c5fd7eeb6;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index d57b5030..6577f951 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1516,6 +1516,10 @@ void translate_keyname(Key *keysym, char **x11name, char **name, int mode) char *name; } translate_key[] = { + /* return and escape keys */ + { KSYM_Return, "XK_Return", "return" }, + { KSYM_Escape, "XK_Escape", "escape" }, + /* normal cursor keys */ { KSYM_Left, "XK_Left", "cursor left" }, { KSYM_Right, "XK_Right", "cursor right" }, @@ -2819,6 +2823,14 @@ int get_anim_action_parameter_value(char *token) checked_free(gfx_token); } + if (result == -1) + { + Key key = getKeyFromX11KeyName(token); + + if (key != KSYM_UNDEFINED) + result = -(int)key; + } + if (result == -1) result = ANIM_EVENT_ACTION_NONE; @@ -2909,7 +2921,7 @@ int get_parameter_value(char *value_raw, char *suffix, int type) else if (strEqual(suffix, ".init_event_action") || strEqual(suffix, ".anim_event_action")) { - result = get_anim_action_parameter_value(value); + result = get_anim_action_parameter_value(value_raw); } else if (strEqual(suffix, ".class")) { @@ -2928,6 +2940,12 @@ int get_parameter_value(char *value_raw, char *suffix, int type) if (string_has_parameter(value, "reverse")) result |= STYLE_REVERSE; + + if (string_has_parameter(value, "passthrough_clicks")) + result |= STYLE_PASSTHROUGH; + + if (string_has_parameter(value, "multiple_actions")) + result |= STYLE_MULTIPLE_ACTIONS; } else if (strEqual(suffix, ".fade_mode")) {