Created common signature for panel event handling functions.
[xuni.git] / gui / data / game.xml
blob3644b6ab7910b69c05d46218ac85e50ab90b8bbf
1 <?xml version="1.0"?>
2 <!-- gui/data/game.xml -->
3 <xuni-resource xuni-version="0.3.0" type="gui-data">
4     <widget type="panel" name="game">
5         <width>100</width>
6         <height>100</height>
7         <visible>0</visible>
8         
9         <handler file="src/test/test.so">
10             <init>game_init</init>
11             <start>game_start</start>
12             <event>game_event</event>
13             <click>game_click</click>
14             <paint>game_paint</paint>
15             <free>game_free</free>
16         </handler>
17         
18         <widget type="image">
19             <name>background 1</name>
20             <xpos>0</xpos>
21             <ypos>0</ypos>
22             <width>100</width>
23             <height>100</height>
24             <path>../background/m31.jpg</path>
25             <selable>0</selable>
26         </widget>
27         
28         <widget type="button">
29             <name>menu</name>
30             <xpos>100.0 - 100.0 / 8</xpos>
31             <ypos>0</ypos>
32             <width>100.0 / 8</width>
33             <height>100.0 / 15</height>
34             <text>Menu</text>
35             <accelerator>lshift f10</accelerator>
36         </widget>
37         
38         <widget type="button">
39             <name>layer 1</name>
40             <xpos>30</xpos>
41             <ypos>30</ypos>
42             <width>20</width>
43             <height>10</height>
44             <text>1</text>
45         </widget>
46         
47         <widget type="button">
48             <name>layer 2</name>
49             <xpos>40</xpos>
50             <ypos>35</ypos>
51             <width>20</width>
52             <height>10</height>
53             <text>2</text>
54         </widget>
55         
56         <widget type="button">
57             <name>layer 3</name>
58             <xpos>50</xpos>
59             <ypos>40</ypos>
60             <width>20</width>
61             <height>10</height>
62             <text>3</text>
63         </widget>
64         
65         <widget type="button">
66             <name>layer 4</name>
67             <xpos>50</xpos>
68             <ypos>40</ypos>
69             <width>20</width>
70             <height>10</height>
71             <text>4</text>
72         </widget>
73         
74         <!--<widget type="button">
75             <name>big button</name>
76             <xpos>0</xpos>
77             <ypos>0</ypos>
78             <width>100</width>
79             <height>100</height>
80             <text>One big button</text>
81         </widget>
82         
83         <widget type="button">
84             <name>pretty big button</name>
85             <xpos>10</xpos>
86             <ypos>10</ypos>
87             <width>80</width>
88             <height>80</height>
89             <text>One pretty big button</text>
90         </widget>-->
91     </widget>
92     
93     <widget type="panel" name="game menu">
94         <width>100</width>
95         <height>100</height>
96         <visible>0</visible>
97         
98         <handler file="src/test/test.so">
99             <start>game_start</start>
100             <event>game_event</event>
101             <click>game_click</click>
102             <paint>game_paint</paint>
103         </handler>
104         
105         <widget type="button">
106             <name>back</name>
107             <xpos>(100.0 - 100.0 / 3) / 2</xpos>
108             <ypos>100.0 / 8</ypos>
109             <width>100.0 / 3</width>
110             <height>100.0 / 15</height>
111             <text>Return to game</text>
112         </widget>
113         
114         <widget type="button">
115             <name>quit</name>
116             <xpos>(100.0 - 100.0 / 3) / 2</xpos>
117             <ypos>100.0 / 8 + 100.0 / 15 * 1.3</ypos>
118             <width>100.0 / 3</width>
119             <height>100.0 / 15</height>
120             <text>Exit to main menu</text>
121         </widget>
122     </widget>
123 </xuni-resource>