white_gold 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/dll/tgui.dll +0 -0
- data/ext/so/libtgui.so +0 -0
- data/lib/white_gold/abi/enum.rb +0 -8
- data/lib/white_gold/abi/extern_object.rb +6 -1
- data/lib/white_gold/abi/unpacker.rb +4 -2
- data/lib/white_gold/convention/bang_nest.rb +12 -2
- data/lib/white_gold/convention/bang_nested_caller.rb +34 -34
- data/lib/white_gold/convention/container_widgets.rb +53 -51
- data/lib/white_gold/convention/page.rb +22 -4
- data/lib/white_gold/{dsl → convention}/theme/color_attribute.rb +2 -0
- data/lib/white_gold/{dsl → convention}/theme/outline_attribute.rb +2 -0
- data/lib/white_gold/convention/theme/text_styles_attribute.rb +18 -0
- data/lib/white_gold/{dsl → convention}/theme/texture_attribute.rb +2 -0
- data/lib/white_gold/{dsl → convention}/theme/theme_attributed.rb +4 -18
- data/lib/white_gold/{dsl → convention}/theme/theme_component.rb +14 -3
- data/lib/white_gold/convention/theme_attributes.rb +49 -0
- data/lib/white_gold/convention/tree_node.rb +43 -0
- data/lib/white_gold/convention/widget_like.rb +0 -6
- data/lib/white_gold/dsl/backend_gui.rb +1 -0
- data/lib/white_gold/dsl/button_base.rb +17 -2
- data/lib/white_gold/dsl/canvas.rb +40 -0
- data/lib/white_gold/dsl/chat_box.rb +12 -1
- data/lib/white_gold/dsl/child_window.rb +22 -1
- data/lib/white_gold/dsl/color.rb +5 -2
- data/lib/white_gold/dsl/color_picker.rb +9 -0
- data/lib/white_gold/dsl/combo_box.rb +30 -2
- data/lib/white_gold/dsl/container.rb +17 -11
- data/lib/white_gold/dsl/edit_box.rb +29 -0
- data/lib/white_gold/dsl/file_dialog.rb +17 -0
- data/lib/white_gold/dsl/font.rb +5 -1
- data/lib/white_gold/dsl/grid.rb +3 -3
- data/lib/white_gold/dsl/group.rb +5 -0
- data/lib/white_gold/dsl/knob.rb +10 -0
- data/lib/white_gold/dsl/label.rb +14 -0
- data/lib/white_gold/dsl/list_box.rb +27 -11
- data/lib/white_gold/dsl/list_view.rb +29 -6
- data/lib/white_gold/dsl/menu_bar.rb +21 -48
- data/lib/white_gold/dsl/message_box.rb +8 -2
- data/lib/white_gold/dsl/panel_list_box.rb +3 -3
- data/lib/white_gold/dsl/progress_bar.rb +14 -0
- data/lib/white_gold/dsl/radio_button.rb +25 -0
- data/lib/white_gold/dsl/range_slider.rb +8 -0
- data/lib/white_gold/dsl/scrollbar.rb +19 -0
- data/lib/white_gold/dsl/separator_line.rb +5 -0
- data/lib/white_gold/dsl/sfml/circle_shape.rb +7 -0
- data/lib/white_gold/dsl/sfml/convex_shape.rb +15 -0
- data/lib/white_gold/dsl/sfml/rectangle_shape.rb +7 -0
- data/lib/white_gold/dsl/sfml/shape.rb +19 -0
- data/lib/white_gold/dsl/sfml/text.rb +22 -0
- data/lib/white_gold/dsl/signal/global_signal.rb +1 -1
- data/lib/white_gold/dsl/signal/signal.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_animation_type.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_bool.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_color.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_float.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_int.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_pointer.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_range.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_show_effect.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_string.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_u_int.rb +1 -1
- data/lib/white_gold/dsl/signal/signal_vector2f.rb +1 -1
- data/lib/white_gold/dsl/slider.rb +15 -0
- data/lib/white_gold/dsl/spin_button.rb +14 -0
- data/lib/white_gold/dsl/tab_container.rb +2 -2
- data/lib/white_gold/dsl/tabs.rb +26 -2
- data/lib/white_gold/dsl/text_area.rb +16 -0
- data/lib/white_gold/dsl/theme.rb +11 -51
- data/lib/white_gold/dsl/tree_view.rb +41 -33
- data/lib/white_gold/dsl/widget.rb +81 -39
- data/lib/white_gold/generated/tgui-abi-loader.gf.rb +197 -47
- data/lib/white_gold/library/theme/light.rb +15 -3
- data/lib/white_gold/master.rb +21 -40
- data/lib/white_gold/path/object.path.rb +0 -11
- data/lib/white_gold/tgui-abi.rb +17 -16
- data/lib/white_gold/version.rb +3 -0
- data/lib/white_gold.rb +29 -28
- metadata +26 -39
- data/lib/white_gold/dsl/theme/button_theme.rb +0 -19
- data/lib/white_gold/dsl/theme/chat_box_theme.rb +0 -16
- data/lib/white_gold/dsl/theme/child_window_theme.rb +0 -25
- data/lib/white_gold/dsl/theme/color_picker_theme.rb +0 -14
- data/lib/white_gold/dsl/theme/combo_box_theme.rb +0 -33
- data/lib/white_gold/dsl/theme/common_renderer.rb +0 -7
- data/lib/white_gold/dsl/theme/edit_box_theme.rb +0 -34
- data/lib/white_gold/dsl/theme/file_dialog_theme.rb +0 -22
- data/lib/white_gold/dsl/theme/group_theme.rb +0 -9
- data/lib/white_gold/dsl/theme/knob_theme.rb +0 -15
- data/lib/white_gold/dsl/theme/label_theme.rb +0 -20
- data/lib/white_gold/dsl/theme/list_box_theme.rb +0 -25
- data/lib/white_gold/dsl/theme/list_view_theme.rb +0 -27
- data/lib/white_gold/dsl/theme/menu_bar_theme.rb +0 -21
- data/lib/white_gold/dsl/theme/message_box_theme.rb +0 -11
- data/lib/white_gold/dsl/theme/progress_bar_theme.rb +0 -19
- data/lib/white_gold/dsl/theme/radio_button_theme.rb +0 -30
- data/lib/white_gold/dsl/theme/scrollbar_theme.rb +0 -24
- data/lib/white_gold/dsl/theme/separator_line_theme.rb +0 -9
- data/lib/white_gold/dsl/theme/slider_theme.rb +0 -20
- data/lib/white_gold/dsl/theme/spin_button_theme.rb +0 -19
- data/lib/white_gold/dsl/theme/tabs_theme.rb +0 -29
- data/lib/white_gold/dsl/theme/text_area_theme.rb +0 -22
- data/lib/white_gold/dsl/theme/text_styles_attribute.rb +0 -13
- data/lib/white_gold/dsl/theme/tree_view_theme.rb +0 -26
- data/lib/white_gold/dsl/theme/widget_theme.rb +0 -12
- /data/lib/white_gold/{dsl → convention}/theme/boolean_attribute.rb +0 -0
- /data/lib/white_gold/{dsl → convention}/theme/float_attribute.rb +0 -0
- /data/lib/white_gold/dsl/{checkbox.rb → check_box.rb} +0 -0
data/lib/white_gold/master.rb
CHANGED
@@ -17,7 +17,7 @@ class WhiteGold
|
|
17
17
|
@frame_delay = 1.0 / fps
|
18
18
|
end
|
19
19
|
|
20
|
-
def init
|
20
|
+
def init fps: nil, theme: nil
|
21
21
|
@window = Window.new
|
22
22
|
@gui = Gui.new window
|
23
23
|
@preserved_pages = {}
|
@@ -25,12 +25,12 @@ class WhiteGold
|
|
25
25
|
self.fps = fps if fps
|
26
26
|
@frame_delay = 0.015 if !@frame_delay
|
27
27
|
@jobs = []
|
28
|
-
@
|
29
|
-
load_page init_page
|
28
|
+
@initialized = true
|
30
29
|
end
|
31
30
|
|
32
|
-
def run
|
33
|
-
self.init
|
31
|
+
def run page = nil, fps: nil, theme: nil
|
32
|
+
self.init fps: fps, theme: theme if !@initialized
|
33
|
+
load_page page if page
|
34
34
|
|
35
35
|
next_frame_time = Time.now
|
36
36
|
while @gui.self_active?
|
@@ -53,35 +53,33 @@ class WhiteGold
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def load_page page_id
|
56
|
-
@current_page_id = page_id
|
56
|
+
@next_page_id = @current_page_id = page_id
|
57
57
|
case page_id
|
58
58
|
when Symbol
|
59
59
|
page = @preserved_pages[page_id] = Page.new self
|
60
|
-
|
61
|
-
@current_page = page
|
62
|
-
ExternObject.callback_storage = page.widget_callbacks
|
63
|
-
ExternObject.global_callback_storage = page.global_callbacks
|
64
|
-
ExternObject.data_storage = page.custom_data
|
60
|
+
init_page page
|
65
61
|
send(page_id)
|
66
62
|
when Class
|
67
63
|
page = @preserved_pages[page_id] = page_id.new self
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
ExternObject.data_storage = page.custom_data
|
73
|
-
page.build
|
64
|
+
init_page page
|
65
|
+
page.send! do
|
66
|
+
page.build
|
67
|
+
end
|
74
68
|
when Proc
|
75
69
|
page = @preserved_pages[page_id] = Page.new self
|
76
|
-
|
77
|
-
|
78
|
-
ExternObject.callback_storage = page.widget_callbacks
|
79
|
-
ExternObject.global_callback_storage = page.global_callbacks
|
80
|
-
ExternObject.data_storage = page.custom_data
|
81
|
-
instance_exec &page_id
|
70
|
+
init_page page
|
71
|
+
page_id.call
|
82
72
|
end
|
83
73
|
end
|
84
74
|
|
75
|
+
def init_page page
|
76
|
+
@gui.self_add page, "main_container"
|
77
|
+
@current_page = page
|
78
|
+
ExternObject.callback_storage = page.widget_callbacks
|
79
|
+
ExternObject.global_callback_storage = page.global_callbacks
|
80
|
+
ExternObject.data_storage = page.custom_data
|
81
|
+
end
|
82
|
+
|
85
83
|
attr_accessor :next_page_id
|
86
84
|
attr :gui, :window
|
87
85
|
|
@@ -150,21 +148,4 @@ class WhiteGold
|
|
150
148
|
job delay: delay || delay_, repeat: do
|
151
149
|
end.on_done &b
|
152
150
|
end
|
153
|
-
|
154
|
-
def respond_to? name
|
155
|
-
super || @current_page.respond_to?(name)
|
156
|
-
end
|
157
|
-
|
158
|
-
def method_missing name, *a, **na, &b
|
159
|
-
if @current_page.respond_to? name
|
160
|
-
@current_page.send(name, *a, **na, &b)
|
161
|
-
elsif @gui.respond_to? name
|
162
|
-
@gui.send(name, *a, **na, &b)
|
163
|
-
elsif @window.respond_to? name
|
164
|
-
@window.send(name, *a, **na, &b)
|
165
|
-
else
|
166
|
-
no_method_error = "method missing in Page/Gui/Window"
|
167
|
-
raise no_method_error
|
168
|
-
end
|
169
|
-
end
|
170
151
|
end
|
data/lib/white_gold/tgui-abi.rb
CHANGED
@@ -76,6 +76,7 @@ end
|
|
76
76
|
# ABI loader should be required after dsl directory files because of class hierarchy
|
77
77
|
require_relative 'generated/tgui-abi-loader.gf'
|
78
78
|
require_relative 'convention/container_widgets'
|
79
|
+
require_relative 'convention/theme_attributes'
|
79
80
|
|
80
81
|
class ExternObject
|
81
82
|
class << self
|
@@ -159,14 +160,16 @@ class ExternObject
|
|
159
160
|
end
|
160
161
|
end
|
161
162
|
|
162
|
-
abi_packer Tgui::Abi::Vector2f do |
|
163
|
-
case
|
164
|
-
when
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
163
|
+
abi_packer Tgui::Abi::Vector2f do |*arg|
|
164
|
+
case arg.size
|
165
|
+
when 1
|
166
|
+
a = arg.first
|
167
|
+
x = y = a
|
168
|
+
when 2
|
169
|
+
x, y = *arg
|
170
|
+
else raise "Unsupported argument #{arg}"
|
169
171
|
end
|
172
|
+
[abi_pack_float(x), abi_pack_float(y)]
|
170
173
|
end
|
171
174
|
|
172
175
|
abi_packer Tgui::Abi::Vector2u do |o|
|
@@ -218,21 +221,19 @@ class ExternObject
|
|
218
221
|
o.odd?
|
219
222
|
end
|
220
223
|
|
221
|
-
|
222
|
-
[o.x, o.y]
|
223
|
-
end
|
224
|
-
|
225
|
-
abi_unpacker "PositionLayout" do |o|
|
226
|
-
[o.x, o.y]
|
227
|
-
end
|
228
|
-
|
229
|
-
abi_unpacker Tgui::Vector2f do |o|
|
224
|
+
vector2f_unpacker = proc do |o|
|
230
225
|
v = Tgui::Vector2f.new o
|
231
226
|
r = [v.x, v.y]
|
232
227
|
Util.free(o)
|
233
228
|
r
|
234
229
|
end
|
235
230
|
|
231
|
+
abi_unpacker "SizeLayout", &vector2f_unpacker
|
232
|
+
|
233
|
+
abi_unpacker "PositionLayout", &vector2f_unpacker
|
234
|
+
|
235
|
+
abi_unpacker Tgui::Vector2f, &vector2f_unpacker
|
236
|
+
|
236
237
|
abi_unpacker Tgui::Vector2u do |o|
|
237
238
|
v = Tgui::Vector2u.new o
|
238
239
|
r = [v.x, v.y]
|
data/lib/white_gold.rb
CHANGED
@@ -1,47 +1,48 @@
|
|
1
1
|
require_relative 'white_gold/master'
|
2
2
|
include Tgui
|
3
3
|
|
4
|
-
@
|
4
|
+
@white_gold_instance = WhiteGold.new
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
10
|
-
end
|
6
|
+
class << self
|
7
|
+
include BangNestedCaller
|
8
|
+
include BangDef
|
11
9
|
|
12
|
-
|
10
|
+
def go page
|
11
|
+
@white_gold_instance.go page.is_a?(Symbol) ? proc{ send(page) } : page
|
12
|
+
end
|
13
|
+
|
14
|
+
def page
|
15
|
+
@white_gold_instance.page
|
16
|
+
end
|
13
17
|
|
14
18
|
def respond_to? name
|
15
|
-
super ||
|
19
|
+
super ||
|
20
|
+
(name.end_with?("!") && bang_respond_to?(name[...-1])) ||
|
21
|
+
@white_gold_instance.page.respond_to?(name)
|
16
22
|
end
|
17
23
|
|
18
24
|
def method_missing name, *a, **na, &b
|
19
|
-
if name.end_with?
|
20
|
-
|
25
|
+
if name.end_with? "!"
|
26
|
+
bang_method_missing name[...-1], *a, **na, &b
|
27
|
+
elsif @white_gold_instance.page.respond_to? name
|
28
|
+
@white_gold_instance.page.send name, *a, **na, &b
|
21
29
|
else super
|
22
30
|
end
|
23
31
|
end
|
32
|
+
end
|
24
33
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
def page
|
31
|
-
@wg.page
|
32
|
-
end
|
33
|
-
|
34
|
-
def def! name, &b
|
35
|
-
@wg.page.class.def! name, &b
|
36
|
-
end
|
34
|
+
def! :run do |page = nil|
|
35
|
+
go page if page
|
36
|
+
@white_gold_instance.run
|
37
|
+
@white_gold_instance = nil
|
37
38
|
end
|
38
39
|
|
39
|
-
@
|
40
|
+
@white_gold_instance.init
|
41
|
+
@white_gold_instance.load_page Page
|
40
42
|
if $0 != 'irb'
|
41
43
|
at_exit do
|
42
|
-
|
43
|
-
rescue NameError
|
44
|
-
ensure
|
45
|
-
@wg.run init: false
|
44
|
+
@white_gold_instance&.run
|
46
45
|
end
|
47
|
-
end
|
46
|
+
end
|
47
|
+
|
48
|
+
BangNestedCaller.push self
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: white_gold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Łukasz Pomietło
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fiddle
|
@@ -24,8 +24,10 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.1'
|
27
|
-
description:
|
28
|
-
|
27
|
+
description: |2
|
28
|
+
Ruby gem for building pure ruby graphical user interface.
|
29
|
+
Uses TGUI & SFML as a backend.
|
30
|
+
Dedicated to creating single-file applications and learning programming.
|
29
31
|
email: oficjalnyadreslukasza@gmail.com
|
30
32
|
executables: []
|
31
33
|
extensions: []
|
@@ -65,6 +67,16 @@ files:
|
|
65
67
|
- lib/white_gold/convention/container_widgets.rb
|
66
68
|
- lib/white_gold/convention/page.rb
|
67
69
|
- lib/white_gold/convention/proc_method_factory.rb
|
70
|
+
- lib/white_gold/convention/theme/boolean_attribute.rb
|
71
|
+
- lib/white_gold/convention/theme/color_attribute.rb
|
72
|
+
- lib/white_gold/convention/theme/float_attribute.rb
|
73
|
+
- lib/white_gold/convention/theme/outline_attribute.rb
|
74
|
+
- lib/white_gold/convention/theme/text_styles_attribute.rb
|
75
|
+
- lib/white_gold/convention/theme/texture_attribute.rb
|
76
|
+
- lib/white_gold/convention/theme/theme_attributed.rb
|
77
|
+
- lib/white_gold/convention/theme/theme_component.rb
|
78
|
+
- lib/white_gold/convention/theme_attributes.rb
|
79
|
+
- lib/white_gold/convention/tree_node.rb
|
68
80
|
- lib/white_gold/convention/unit.rb
|
69
81
|
- lib/white_gold/convention/widget_like.rb
|
70
82
|
- lib/white_gold/dsl/backend_gui.rb
|
@@ -73,8 +85,9 @@ files:
|
|
73
85
|
- lib/white_gold/dsl/box_layout_ratios.rb
|
74
86
|
- lib/white_gold/dsl/button.rb
|
75
87
|
- lib/white_gold/dsl/button_base.rb
|
88
|
+
- lib/white_gold/dsl/canvas.rb
|
76
89
|
- lib/white_gold/dsl/chat_box.rb
|
77
|
-
- lib/white_gold/dsl/
|
90
|
+
- lib/white_gold/dsl/check_box.rb
|
78
91
|
- lib/white_gold/dsl/child_window.rb
|
79
92
|
- lib/white_gold/dsl/clickable_widget.rb
|
80
93
|
- lib/white_gold/dsl/color.rb
|
@@ -107,6 +120,11 @@ files:
|
|
107
120
|
- lib/white_gold/dsl/scrollable_panel.rb
|
108
121
|
- lib/white_gold/dsl/scrollbar.rb
|
109
122
|
- lib/white_gold/dsl/separator_line.rb
|
123
|
+
- lib/white_gold/dsl/sfml/circle_shape.rb
|
124
|
+
- lib/white_gold/dsl/sfml/convex_shape.rb
|
125
|
+
- lib/white_gold/dsl/sfml/rectangle_shape.rb
|
126
|
+
- lib/white_gold/dsl/sfml/shape.rb
|
127
|
+
- lib/white_gold/dsl/sfml/text.rb
|
110
128
|
- lib/white_gold/dsl/signal/global_signal.rb
|
111
129
|
- lib/white_gold/dsl/signal/signal.rb
|
112
130
|
- lib/white_gold/dsl/signal/signal_animation_type.rb
|
@@ -134,39 +152,6 @@ files:
|
|
134
152
|
- lib/white_gold/dsl/text_area.rb
|
135
153
|
- lib/white_gold/dsl/texture.rb
|
136
154
|
- lib/white_gold/dsl/theme.rb
|
137
|
-
- lib/white_gold/dsl/theme/boolean_attribute.rb
|
138
|
-
- lib/white_gold/dsl/theme/button_theme.rb
|
139
|
-
- lib/white_gold/dsl/theme/chat_box_theme.rb
|
140
|
-
- lib/white_gold/dsl/theme/child_window_theme.rb
|
141
|
-
- lib/white_gold/dsl/theme/color_attribute.rb
|
142
|
-
- lib/white_gold/dsl/theme/color_picker_theme.rb
|
143
|
-
- lib/white_gold/dsl/theme/combo_box_theme.rb
|
144
|
-
- lib/white_gold/dsl/theme/common_renderer.rb
|
145
|
-
- lib/white_gold/dsl/theme/edit_box_theme.rb
|
146
|
-
- lib/white_gold/dsl/theme/file_dialog_theme.rb
|
147
|
-
- lib/white_gold/dsl/theme/float_attribute.rb
|
148
|
-
- lib/white_gold/dsl/theme/group_theme.rb
|
149
|
-
- lib/white_gold/dsl/theme/knob_theme.rb
|
150
|
-
- lib/white_gold/dsl/theme/label_theme.rb
|
151
|
-
- lib/white_gold/dsl/theme/list_box_theme.rb
|
152
|
-
- lib/white_gold/dsl/theme/list_view_theme.rb
|
153
|
-
- lib/white_gold/dsl/theme/menu_bar_theme.rb
|
154
|
-
- lib/white_gold/dsl/theme/message_box_theme.rb
|
155
|
-
- lib/white_gold/dsl/theme/outline_attribute.rb
|
156
|
-
- lib/white_gold/dsl/theme/progress_bar_theme.rb
|
157
|
-
- lib/white_gold/dsl/theme/radio_button_theme.rb
|
158
|
-
- lib/white_gold/dsl/theme/scrollbar_theme.rb
|
159
|
-
- lib/white_gold/dsl/theme/separator_line_theme.rb
|
160
|
-
- lib/white_gold/dsl/theme/slider_theme.rb
|
161
|
-
- lib/white_gold/dsl/theme/spin_button_theme.rb
|
162
|
-
- lib/white_gold/dsl/theme/tabs_theme.rb
|
163
|
-
- lib/white_gold/dsl/theme/text_area_theme.rb
|
164
|
-
- lib/white_gold/dsl/theme/text_styles_attribute.rb
|
165
|
-
- lib/white_gold/dsl/theme/texture_attribute.rb
|
166
|
-
- lib/white_gold/dsl/theme/theme_attributed.rb
|
167
|
-
- lib/white_gold/dsl/theme/theme_component.rb
|
168
|
-
- lib/white_gold/dsl/theme/tree_view_theme.rb
|
169
|
-
- lib/white_gold/dsl/theme/widget_theme.rb
|
170
155
|
- lib/white_gold/dsl/toggle_button.rb
|
171
156
|
- lib/white_gold/dsl/tool_tip.rb
|
172
157
|
- lib/white_gold/dsl/tree_view.rb
|
@@ -183,10 +168,12 @@ files:
|
|
183
168
|
- lib/white_gold/path/string.path.rb
|
184
169
|
- lib/white_gold/tgui-abi.rb
|
185
170
|
- lib/white_gold/tgui-config.rb
|
171
|
+
- lib/white_gold/version.rb
|
186
172
|
homepage: https://github.com/lpogic/white_gold
|
187
173
|
licenses:
|
188
174
|
- Zlib
|
189
|
-
metadata:
|
175
|
+
metadata:
|
176
|
+
documentation_uri: https://github.com/lpogic/white_gold/blob/master/doc/wiki/README.md
|
190
177
|
post_install_message:
|
191
178
|
rdoc_options: []
|
192
179
|
require_paths:
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
|
3
|
-
module Tgui
|
4
|
-
class ButtonTheme < WidgetTheme
|
5
|
-
|
6
|
-
theme_attr :borders, :outline
|
7
|
-
[ '', :_down, :_hover, :_down_hover, :_disabled, :_down_disabled, :_focused, :_down_focused ].each do |v|
|
8
|
-
theme_attr "text_color#{v}".to_sym, :color
|
9
|
-
theme_attr "background_color#{v}".to_sym, :color
|
10
|
-
theme_attr "border_color#{v}".to_sym, :color
|
11
|
-
theme_attr "texture#{v}".to_sym, :texture
|
12
|
-
theme_attr "text_style#{v}".to_sym, :text_styles
|
13
|
-
end
|
14
|
-
theme_attr :text_outline_color, :color
|
15
|
-
theme_attr :text_outline_thickness, :float
|
16
|
-
theme_attr :rounded_border_radius, :float
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
require_relative 'scrollbar_theme'
|
3
|
-
|
4
|
-
module Tgui
|
5
|
-
class ChatBoxTheme < WidgetTheme
|
6
|
-
|
7
|
-
theme_attr :borders, :outline
|
8
|
-
theme_attr :padding, :outline
|
9
|
-
theme_attr :background_color, :color
|
10
|
-
theme_attr :border_color, :color
|
11
|
-
theme_attr :texture_background, :texture
|
12
|
-
theme_comp :scrollbar, ScrollbarTheme
|
13
|
-
theme_attr :scrollbar_width, :float
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
|
3
|
-
module Tgui
|
4
|
-
class ChildWindowTheme < WidgetTheme
|
5
|
-
|
6
|
-
theme_attr :borders, :outline
|
7
|
-
theme_attr :title_bar_height, :float
|
8
|
-
theme_attr :title_bar_color, :color
|
9
|
-
theme_attr :title_color, :color
|
10
|
-
theme_attr :background_color, :color
|
11
|
-
theme_attr :border_color, :color
|
12
|
-
theme_attr :border_color_focused, :color
|
13
|
-
theme_attr :border_below_title_bar, :float
|
14
|
-
theme_attr :distance_to_side, :float
|
15
|
-
theme_attr :padding_between_buttons, :float
|
16
|
-
theme_attr :minimum_resizable_border_width, :float
|
17
|
-
theme_attr :show_text_on_title_buttons, :boolean
|
18
|
-
theme_attr :texture_title_bar, :texture
|
19
|
-
theme_attr :texture_background, :texture
|
20
|
-
theme_comp :close_button, ButtonTheme
|
21
|
-
theme_comp :maximize_button, ButtonTheme
|
22
|
-
theme_comp :minimize_button, ButtonTheme
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
require_relative 'button_theme'
|
3
|
-
require_relative 'label_theme'
|
4
|
-
require_relative 'slider_theme'
|
5
|
-
|
6
|
-
module Tgui
|
7
|
-
class ColorPickerTheme < WidgetTheme
|
8
|
-
|
9
|
-
theme_comp :button, ButtonTheme
|
10
|
-
theme_comp :label, LabelTheme
|
11
|
-
theme_comp :slider, SliderTheme
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
require_relative 'list_box_theme'
|
3
|
-
|
4
|
-
module Tgui
|
5
|
-
class ComboBoxTheme < WidgetTheme
|
6
|
-
|
7
|
-
theme_attr :borders, :outline
|
8
|
-
theme_attr :padding, :outline
|
9
|
-
theme_attr :text_style, :text_styles
|
10
|
-
theme_attr :default_text_style, :text_styles
|
11
|
-
theme_attr :background_color, :color
|
12
|
-
theme_attr :background_color_disabled, :color
|
13
|
-
theme_attr :text_color, :color
|
14
|
-
theme_attr :text_color_disabled, :color
|
15
|
-
theme_attr :default_text_color, :color
|
16
|
-
theme_attr :arrow_background_color, :color
|
17
|
-
theme_attr :arrow_background_color_disabled, :color
|
18
|
-
theme_attr :arrow_background_color_hover, :color
|
19
|
-
theme_attr :arrow_color, :color
|
20
|
-
theme_attr :arrow_color_hover, :color
|
21
|
-
theme_attr :arrow_color_disabled, :color
|
22
|
-
theme_attr :texture_background, :texture
|
23
|
-
theme_attr :texture_background_disabled, :texture
|
24
|
-
theme_attr :border_color, :color
|
25
|
-
theme_attr :texture_background, :texture
|
26
|
-
theme_attr :texture_background_disabled, :texture
|
27
|
-
theme_attr :texture_arrow, :texture
|
28
|
-
theme_attr :texture_arrow_hover, :texture
|
29
|
-
theme_attr :texture_arrow_disabled, :texture
|
30
|
-
theme_comp :list_box, ListBoxTheme
|
31
|
-
|
32
|
-
end
|
33
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
|
3
|
-
module Tgui
|
4
|
-
class EditBoxTheme < WidgetTheme
|
5
|
-
|
6
|
-
theme_attr :text_style, :text_styles
|
7
|
-
theme_attr :default_text_style, :text_styles
|
8
|
-
theme_attr :borders, :outline
|
9
|
-
theme_attr :padding, :outline
|
10
|
-
theme_attr :caret_width, :float
|
11
|
-
theme_attr :text_color, :color
|
12
|
-
theme_attr :text_color_disabled, :color
|
13
|
-
theme_attr :text_color_focused, :color
|
14
|
-
theme_attr :selected_text_color, :color
|
15
|
-
theme_attr :selected_text_background_color, :color
|
16
|
-
theme_attr :default_text_color, :color
|
17
|
-
theme_attr :background_color, :color
|
18
|
-
theme_attr :background_color_hover, :color
|
19
|
-
theme_attr :background_color_disabled, :color
|
20
|
-
theme_attr :background_color_focused, :color
|
21
|
-
theme_attr :caret_color, :color
|
22
|
-
theme_attr :caret_color_hover, :color
|
23
|
-
theme_attr :caret_color_focused, :color
|
24
|
-
theme_attr :border_color, :color
|
25
|
-
theme_attr :border_color_hover, :color
|
26
|
-
theme_attr :border_color_disabled, :color
|
27
|
-
theme_attr :border_color_focused, :color
|
28
|
-
theme_attr :texture, :texture
|
29
|
-
theme_attr :texture_hover, :texture
|
30
|
-
theme_attr :texture_disabled, :texture
|
31
|
-
theme_attr :texture_focused, :texture
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
require_relative 'button_theme'
|
3
|
-
require_relative 'label_theme'
|
4
|
-
require_relative 'list_view_theme'
|
5
|
-
require_relative 'edit_box_theme'
|
6
|
-
require_relative 'combo_box_theme'
|
7
|
-
|
8
|
-
module Tgui
|
9
|
-
class FileDialogTheme < WidgetTheme
|
10
|
-
|
11
|
-
theme_comp :list_view, ListViewTheme
|
12
|
-
theme_comp :edit_box, EditBoxTheme
|
13
|
-
theme_comp :filename_label, LabelTheme
|
14
|
-
theme_comp :file_type_combo_box, ComboBoxTheme
|
15
|
-
theme_comp :button, ButtonTheme
|
16
|
-
theme_comp :back_button, ButtonTheme
|
17
|
-
theme_comp :forward_button, ButtonTheme
|
18
|
-
theme_comp :up_button, ButtonTheme
|
19
|
-
theme_attr :arrow_on_navigation_buttons_visible, :boolean
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
|
3
|
-
module Tgui
|
4
|
-
class KnobTheme < WidgetTheme
|
5
|
-
|
6
|
-
theme_attr :borders, :outline
|
7
|
-
theme_attr :background_color, :color
|
8
|
-
theme_attr :thumb_color, :color
|
9
|
-
theme_attr :border_color, :color
|
10
|
-
theme_attr :texture_background, :texture
|
11
|
-
theme_attr :texture_foreground, :texture
|
12
|
-
theme_attr :image_rotation, :float
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
require_relative 'scrollbar_theme'
|
3
|
-
|
4
|
-
module Tgui
|
5
|
-
class LabelTheme < WidgetTheme
|
6
|
-
|
7
|
-
theme_attr :borders, :outline
|
8
|
-
theme_attr :padding, :outline
|
9
|
-
theme_attr :text_color, :color
|
10
|
-
theme_attr :background_color, :color
|
11
|
-
theme_attr :border_color, :color
|
12
|
-
theme_attr :text_style, :text_styles
|
13
|
-
theme_attr :text_outline_color, :color
|
14
|
-
theme_attr :text_outline_thickness, :float
|
15
|
-
theme_attr :texture_background, :texture
|
16
|
-
theme_comp :scrollbar, ScrollbarTheme
|
17
|
-
theme_attr :scrollbar_width, :float
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
require_relative 'scrollbar_theme'
|
3
|
-
|
4
|
-
module Tgui
|
5
|
-
class ListBoxTheme < WidgetTheme
|
6
|
-
|
7
|
-
theme_attr :borders, :outline
|
8
|
-
theme_attr :padding, :outline
|
9
|
-
theme_attr :text_style, :text_styles
|
10
|
-
theme_attr :selected_text_style, :text_styles
|
11
|
-
theme_attr :background_color, :color
|
12
|
-
theme_attr :background_color_hover, :color
|
13
|
-
theme_attr :selected_background_color, :color
|
14
|
-
theme_attr :selected_background_color_hover, :color
|
15
|
-
theme_attr :text_color, :color
|
16
|
-
theme_attr :text_color_hover, :color
|
17
|
-
theme_attr :selected_text_color, :color
|
18
|
-
theme_attr :selected_text_color_hover, :color
|
19
|
-
theme_attr :border_color, :color
|
20
|
-
theme_attr :texture_background, :texture
|
21
|
-
theme_comp :scrollbar, ScrollbarTheme
|
22
|
-
theme_attr :scrollbar_width, :float
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require_relative 'widget_theme'
|
2
|
-
|
3
|
-
module Tgui
|
4
|
-
class ListViewTheme < WidgetTheme
|
5
|
-
|
6
|
-
theme_attr :borders, :outline
|
7
|
-
theme_attr :padding, :outline
|
8
|
-
theme_attr :background_color, :color
|
9
|
-
theme_attr :background_color_hover, :color
|
10
|
-
theme_attr :selected_background_color, :color
|
11
|
-
theme_attr :selected_background_color_hover, :color
|
12
|
-
theme_attr :text_color, :color
|
13
|
-
theme_attr :text_color_hover, :color
|
14
|
-
theme_attr :selected_text_color, :color
|
15
|
-
theme_attr :selected_text_color_hover, :color
|
16
|
-
theme_attr :header_background_color, :color
|
17
|
-
theme_attr :header_text_color, :color
|
18
|
-
theme_attr :border_color, :color
|
19
|
-
theme_attr :separator_color, :color
|
20
|
-
theme_attr :grid_lines_color, :color
|
21
|
-
theme_attr :texture_header_background, :texture
|
22
|
-
theme_attr :texture_background, :texture
|
23
|
-
theme_comp :scrollbar, ScrollbarTheme
|
24
|
-
theme_attr :scrollbar_width, :float
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|