mail[Wesnoth-commits] r44802 - /trunk/data/scenario-test.cfg


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on July 28, 2010 - 15:09:
Author: silene
Date: Wed Jul 28 15:09:09 2010
New Revision: 44802

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44802&view=rev
Log:
Updated dialog tests.

Modified:
    trunk/data/scenario-test.cfg

Modified: trunk/data/scenario-test.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/scenario-test.cfg?rev=44802&r1=44801&r2=44802&view=diff
==============================================================================
--- trunk/data/scenario-test.cfg (original)
+++ trunk/data/scenario-test.cfg Wed Jul 28 15:09:09 2010
@@ -301,7 +301,10 @@
       T.row { T.column { T.grid { T.row {
         T.column { T.button { id = "ok", label = _"OK" } },
         T.column { T.button { id = "cancel", label = _"Cancel" } }
-      } } } }
+      } } } },
+      T.row { T.column {
+        T.toggle_button { id = "flip", label = "Flip" }
+      } }
     } },
     T.column { T.image { id = "the_image" } }
   } }
@@ -314,9 +317,12 @@
   local function select()
     local i = wesnoth.get_dialog_value "the_list"
     local ut = wesnoth.unit_types[t[i]].__cfg
-    wesnoth.set_dialog_value(string.gsub(ut.profile, "([^/]+)$", 
"transparent/%1"), "the_image")
+    local profile = string.gsub(ut.profile, "([^/]+)$", "transparent/%1")
+    if wesnoth.get_dialog_value "flip" then profile = profile .. "~FL()" end
+    wesnoth.set_dialog_value(profile, "the_image")
   end
   wesnoth.set_dialog_callback(select, "the_list")
+  wesnoth.set_dialog_callback(select, "flip")
   for i,v in ipairs(t) do
     local ut = wesnoth.unit_types[v].__cfg
     wesnoth.set_dialog_value(ut.name, "the_list", i, "the_label")




Related Messages


Powered by MHonArc, Updated Wed Jul 28 16:20:16 2010