added event actions (by simulating keyboard input) for global animations
[rocksndiamonds.git] / src / libgame / misc.c
index d57b503061e83e0aac175d7e350cd6fb32b5423f..6432523e41ce5c5755a6e385c28abd30995b5aee 100644 (file)
@@ -2819,6 +2819,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 +2917,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 +2936,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"))
   {