Skip to content

Commit 6214bcf

Browse files
committed
Fixed stuff related to lists in the RPG theme
1 parent 7da6449 commit 6214bcf

File tree

12 files changed

+2317
-474
lines changed

12 files changed

+2317
-474
lines changed

example/kenneyblue.gui

Lines changed: 457 additions & 457 deletions
Large diffs are not rendered by default.

example/rpg.gui

Lines changed: 1284 additions & 10 deletions
Large diffs are not rendered by default.

example/rpg.gui_script

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@ local rpg = require "gooey.themes.rpg.rpg"
22

33
function init(self)
44
rpg.acquire_input()
5+
self.list_ids = {
6+
"listitem1/bg", "listitem2/bg", "listitem3/bg", "listitem4/bg", "listitem5/bg",
7+
"listitem6/bg", "listitem7/bg"
8+
}
59
end
610

711
function on_input(self, action_id, action)
812
rpg.button("back", action_id, action, function()
913
msg.post("controller:/go", "show_menu")
1014
end)
15+
1116
rpg.button("button", action_id, action, function()
1217
print("pressed button")
1318
end)
19+
1420
rpg.checkbox("checkbox", action_id, action, function(check)
1521
print("checkbox", check)
1622
end)
@@ -23,9 +29,14 @@ function on_input(self, action_id, action)
2329
print("radiobutton 2", radio.selected)
2430
end)
2531
end)
26-
32+
2733
rpg.checkbox("checkbox", action_id, action, function(state)
2834
print("checkbox")
2935
end)
36+
37+
rpg.list("listroot", "liststencil", self.list_ids, action_id, action, function(list)
38+
print("selected list item", list.selected_item)
39+
end)
40+
3041
rpg.input("input", gui.KEYBOARD_TYPE_DEFAULT, action_id, action)
3142
end
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
script: ""
2+
textures {
3+
name: "dirtylarry"
4+
texture: "/gooey/themes/dirtylarry/images/dirtylarry.atlas"
5+
}
6+
background_color {
7+
x: 0.0
8+
y: 0.0
9+
z: 0.0
10+
w: 0.0
11+
}
12+
nodes {
13+
position {
14+
x: 0.0
15+
y: 0.0
16+
z: 0.0
17+
w: 1.0
18+
}
19+
rotation {
20+
x: 0.0
21+
y: 0.0
22+
z: 0.0
23+
w: 1.0
24+
}
25+
scale {
26+
x: 1.0
27+
y: 1.0
28+
z: 1.0
29+
w: 1.0
30+
}
31+
size {
32+
x: 420.0
33+
y: 320.0
34+
z: 0.0
35+
w: 1.0
36+
}
37+
color {
38+
x: 1.0
39+
y: 1.0
40+
z: 1.0
41+
w: 1.0
42+
}
43+
type: TYPE_BOX
44+
blend_mode: BLEND_MODE_ALPHA
45+
texture: "dirtylarry/button_pressed"
46+
id: "list"
47+
xanchor: XANCHOR_NONE
48+
yanchor: YANCHOR_NONE
49+
pivot: PIVOT_N
50+
adjust_mode: ADJUST_MODE_FIT
51+
layer: ""
52+
inherit_alpha: true
53+
slice9 {
54+
x: 20.0
55+
y: 16.0
56+
z: 20.0
57+
w: 16.0
58+
}
59+
clipping_mode: CLIPPING_MODE_NONE
60+
clipping_visible: true
61+
clipping_inverted: false
62+
alpha: 1.0
63+
template_node_child: false
64+
size_mode: SIZE_MODE_MANUAL
65+
}
66+
nodes {
67+
position {
68+
x: 0.0
69+
y: -9.618
70+
z: 0.0
71+
w: 1.0
72+
}
73+
rotation {
74+
x: 0.0
75+
y: 0.0
76+
z: 0.0
77+
w: 1.0
78+
}
79+
scale {
80+
x: 1.0
81+
y: 1.0
82+
z: 1.0
83+
w: 1.0
84+
}
85+
size {
86+
x: 420.0
87+
y: 300.0
88+
z: 0.0
89+
w: 1.0
90+
}
91+
color {
92+
x: 1.0
93+
y: 1.0
94+
z: 1.0
95+
w: 1.0
96+
}
97+
type: TYPE_BOX
98+
blend_mode: BLEND_MODE_ALPHA
99+
texture: "dirtylarry/transparent1px"
100+
id: "liststencil"
101+
xanchor: XANCHOR_NONE
102+
yanchor: YANCHOR_NONE
103+
pivot: PIVOT_N
104+
adjust_mode: ADJUST_MODE_FIT
105+
parent: "list"
106+
layer: "below"
107+
inherit_alpha: true
108+
slice9 {
109+
x: 0.0
110+
y: 0.0
111+
z: 0.0
112+
w: 0.0
113+
}
114+
clipping_mode: CLIPPING_MODE_STENCIL
115+
clipping_visible: true
116+
clipping_inverted: false
117+
alpha: 1.0
118+
template_node_child: false
119+
size_mode: SIZE_MODE_MANUAL
120+
}
121+
nodes {
122+
position {
123+
x: 0.0
124+
y: 0.0
125+
z: 0.0
126+
w: 1.0
127+
}
128+
rotation {
129+
x: 0.0
130+
y: 0.0
131+
z: 0.0
132+
w: 1.0
133+
}
134+
scale {
135+
x: 1.0
136+
y: 1.0
137+
z: 1.0
138+
w: 1.0
139+
}
140+
size {
141+
x: 0.0
142+
y: 300.0
143+
z: 0.0
144+
w: 1.0
145+
}
146+
color {
147+
x: 1.0
148+
y: 1.0
149+
z: 1.0
150+
w: 1.0
151+
}
152+
type: TYPE_BOX
153+
blend_mode: BLEND_MODE_ALPHA
154+
texture: "dirtylarry/transparent1px"
155+
id: "listroot"
156+
xanchor: XANCHOR_NONE
157+
yanchor: YANCHOR_NONE
158+
pivot: PIVOT_N
159+
adjust_mode: ADJUST_MODE_FIT
160+
parent: "liststencil"
161+
layer: "below"
162+
inherit_alpha: true
163+
slice9 {
164+
x: 0.0
165+
y: 0.0
166+
z: 0.0
167+
w: 0.0
168+
}
169+
clipping_mode: CLIPPING_MODE_NONE
170+
clipping_visible: true
171+
clipping_inverted: false
172+
alpha: 1.0
173+
template_node_child: false
174+
size_mode: SIZE_MODE_MANUAL
175+
}
176+
layers {
177+
name: "below"
178+
}
179+
layers {
180+
name: "text"
181+
}
182+
material: "/builtins/materials/gui.material"
183+
adjust_reference: ADJUST_REFERENCE_PARENT
184+
max_nodes: 512

gooey/themes/dirtylarry/images/dirtylarry.atlas

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ images {
3131
images {
3232
image: "/gooey/themes/dirtylarry/images/radio_pressed.png"
3333
}
34+
images {
35+
image: "/gooey/themes/dirtylarry/images/transparent1px.png"
36+
}
3437
margin: 0
3538
extrude_borders: 1
3639
inner_padding: 0
81 Bytes
Loading

0 commit comments

Comments
 (0)