File indexing completed on 2025-02-02 03:54:47
0001 <!DOCTYPE html> 0002 <html><head> 0003 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 0004 <title>test.pbl</title> 0005 <meta name="generator" content="KF5::SyntaxHighlighting - Definition (Wesnoth Markup Language) - Theme (Breeze Light)"/> 0006 </head><body style="background-color:#ffffff;color:#1f1c1b"><pre> 0007 <span style="color:#898887"># Wesnoth Markup Language</span> 0008 0009 <span style="color:#006e28">#textdomain wesnoth-libs</span> 0010 0011 <span style="color:#006e28">#define __GUI_WINDOW_HEIGHT</span> 0012 ( 0013 if(<span style="color:#0057ae">window_height </span>= 0, 9999, window_height) 0014 )<span style="color:#006e28">#enddef</span> 0015 0016 <span style="color:#006e28">#define __GUI_WINDOW_FUNCTIONS</span> 0017 def reevaluate_best_size(w, s) 0018 ( 0019 [ 0020 0, 0021 <span style="color:#898887">#</span> 0022 debug_print('window ', w), 0023 debug_print('screen ', s) 0024 <span style="color:#898887">#</span> 0025 ][0] 0026 ); 0027 <span style="color:#006e28">#enddef</span> 0028 0029 <span style="color:#898887"># Don't highlight array indices as tags</span> 0030 stored_unit[1].moves 0031 other[0][1][2] 0032 other[foo][bar] 0033 0034 foo[<span style="color:#644a9b">{MACRO}</span>] 0035 foo[<span style="color:#b08000">$index</span>] 0036 foo[ 12 ] 0037 0038 <span style="color:#898887"># Nested tags</span> 0039 <span style="font-weight:bold">[allow_undo][/allow_undo][not][true]</span>text<span style="font-weight:bold">[/true][/not]</span> 0040 <span style="font-weight:bold">[foo][bar]</span>text<span style="font-weight:bold">[/bar][/foo]</span> 0041 0042 <span style="font-weight:bold">[about]</span> 0043 <span style="color:#0057ae">title</span>= <span style="color:#bf0303">_ "Campaign Designer"</span> 0044 <span style="color:#0057ae">text</span>=<span style="color:#bf0303">"Your Name"</span> 0045 <span style="font-weight:bold">[/about]</span> 0046 0047 <span style="font-weight:bold">[window]</span> 0048 <span style="color:#0057ae">id </span>= <span style="color:#bf0303">"tooltip"</span> 0049 0050 <span style="font-weight:bold">[resolution]</span> 0051 <span style="color:#0057ae">definition </span>= <span style="color:#bf0303">"tooltip"</span> 0052 <span style="color:#0057ae">automatic_placement </span>= false 0053 <span style="color:#0057ae">functions </span>= <span style="color:#bf0303">"</span><span style="color:#644a9b">{__GUI_WINDOW_FUNCTIONS}</span><span style="color:#bf0303">"</span> 0054 0055 <span style="font-weight:bold">[grid]</span> 0056 0057 <span style="font-weight:bold">[row]</span> 0058 0059 <span style="font-weight:bold">[column]</span> 0060 0061 <span style="font-weight:bold">[label]</span> 0062 <span style="color:#0057ae">id </span>= <span style="color:#bf0303">"label"</span> 0063 <span style="color:#0057ae">definition </span>= <span style="color:#bf0303">"default_small"</span> 0064 0065 <span style="color:#0057ae">use_markup </span>= true 0066 <span style="color:#0057ae">wrap </span>= true 0067 <span style="font-weight:bold">[/label]</span> 0068 0069 <span style="font-weight:bold">[/column]</span> 0070 0071 <span style="font-weight:bold">[/row]</span> 0072 0073 <span style="font-weight:bold">[/grid]</span> 0074 0075 <span style="font-weight:bold">[/resolution]</span> 0076 0077 <span style="font-weight:bold">[/window]</span> 0078 0079 <span style="font-weight:bold">[event]</span> 0080 <span style="color:#0057ae">name </span>= preload 0081 <span style="color:#0057ae">first_time_only </span>= no 0082 <span style="font-weight:bold">[lua]</span> 0083 <span style="color:#0057ae">code </span>=<span style="color:#bf0303"> <<</span> 0084 <span style="font-weight:bold">function</span> narrator<span style="color:#ca60ca">(</span><span style="color:#0057ae">t</span><span style="color:#ca60ca">)</span> 0085 <span style="color:#898887">-- Behave like the [message] tag.</span> 0086 <span style="color:#0057ae">wesnoth</span><span style="color:#ca60ca">.</span>fire<span style="color:#ca60ca">(</span><span style="color:#bf0303">"message"</span><span style="color:#ca60ca">,</span> 0087 <span style="color:#ca60ca">{</span> <span style="color:#0057ae">speaker</span> <span style="color:#ca60ca">=</span> <span style="color:#bf0303">"narrator"</span><span style="color:#ca60ca">,</span> <span style="color:#0057ae">message</span> <span style="color:#ca60ca">=</span> <span style="color:#0057ae">t</span><span style="color:#ca60ca">.</span><span style="color:#0057ae">sentence</span> <span style="color:#ca60ca">})</span> 0088 <span style="font-weight:bold">end</span> 0089 <span style="color:#bf0303">>></span> 0090 <span style="font-weight:bold">[/lua]</span> 0091 <span style="font-weight:bold">[/event]</span> 0092 0093 <span style="font-weight:bold">[event]</span> 0094 <span style="color:#0057ae">name </span>= turn 1 0095 <span style="font-weight:bold">[lua]</span> 0096 <span style="color:#0057ae">code </span>=<span style="color:#bf0303"> <<</span> narrator<span style="color:#ca60ca">(...)</span> <span style="color:#bf0303">>></span> 0097 <span style="font-weight:bold">[args]</span> 0098 <span style="color:#0057ae">sentence </span>= <span style="color:#bf0303">_ "Hello world!"</span> 0099 <span style="font-weight:bold">[/args]</span> 0100 <span style="font-weight:bold">[/lua]</span> 0101 <span style="font-weight:bold">[lua]</span> 0102 <span style="color:#0057ae">code </span>=<span style="color:#bf0303"> <<</span> narrator<span style="color:#ca60ca">(...)</span> <span style="color:#bf0303">>></span> 0103 <span style="font-weight:bold">[args]</span> 0104 <span style="color:#0057ae">sentence </span>= <span style="color:#bf0303">_ "How are you today?"</span> 0105 <span style="font-weight:bold">[/args]</span> 0106 <span style="font-weight:bold">[/lua]</span> 0107 <span style="font-weight:bold">[/event]</span> 0108 </pre></body></html>