white_gold 0.0.3 → 0.0.4
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 +1 -1
- data/lib/white_gold/abi/interface/interface.rb +3 -7
- data/lib/white_gold/convention/bang_def.rb +14 -0
- data/lib/white_gold/convention/bang_nest.rb +1 -1
- data/lib/white_gold/convention/bang_nested_caller.rb +55 -22
- data/lib/white_gold/convention/container_widgets.rb +46 -86
- data/lib/white_gold/convention/page.rb +10 -4
- data/lib/white_gold/convention/theme/boolean_attribute.rb +11 -9
- data/lib/white_gold/convention/theme/color_attribute.rb +11 -9
- data/lib/white_gold/convention/theme/float_attribute.rb +11 -9
- data/lib/white_gold/convention/theme/outline_attribute.rb +11 -9
- data/lib/white_gold/convention/theme/text_styles_attribute.rb +14 -12
- data/lib/white_gold/convention/theme/texture_attribute.rb +14 -12
- data/lib/white_gold/convention/theme/theme_attributed.rb +1 -1
- data/lib/white_gold/convention/theme/theme_component.rb +1 -1
- data/lib/white_gold/convention/theme_attributes.rb +6 -2
- data/lib/white_gold/convention/widget/keyboard_control.rb +30 -0
- data/lib/white_gold/convention/widget_class_aliases.rb +24 -0
- data/lib/white_gold/dsl/canvas.rb +5 -5
- data/lib/white_gold/dsl/chat_box.rb +1 -1
- data/lib/white_gold/dsl/child_window.rb +1 -1
- data/lib/white_gold/dsl/color.rb +4 -2
- data/lib/white_gold/dsl/combo_box.rb +2 -2
- data/lib/white_gold/dsl/container.rb +1 -1
- data/lib/white_gold/dsl/custom_widget.rb +28 -0
- data/lib/white_gold/dsl/grid.rb +34 -10
- data/lib/white_gold/dsl/gui.rb +10 -1
- data/lib/white_gold/dsl/label.rb +3 -0
- data/lib/white_gold/dsl/list_box.rb +2 -2
- data/lib/white_gold/dsl/list_view.rb +6 -6
- data/lib/white_gold/dsl/menu_bar.rb +4 -4
- data/lib/white_gold/dsl/message_box.rb +3 -3
- data/lib/white_gold/dsl/panel.rb +8 -0
- data/lib/white_gold/dsl/panel_list_box.rb +12 -3
- data/lib/white_gold/dsl/radio_button.rb +15 -2
- data/lib/white_gold/dsl/scrollable_panel.rb +7 -0
- data/lib/white_gold/dsl/sfml/circle_shape.rb +4 -0
- data/lib/white_gold/dsl/sfml/convex_shape.rb +4 -0
- data/lib/white_gold/dsl/sfml/rectangle_shape.rb +4 -0
- data/lib/white_gold/dsl/sfml/text.rb +4 -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/tab_container.rb +2 -2
- data/lib/white_gold/dsl/tabs.rb +2 -2
- data/lib/white_gold/dsl/theme.rb +2 -2
- data/lib/white_gold/dsl/toggle_button.rb +3 -0
- data/lib/white_gold/dsl/tree_view.rb +2 -2
- data/lib/white_gold/dsl/widget.rb +53 -23
- data/lib/white_gold/dsl/window.rb +7 -0
- data/lib/white_gold/generated/tgui-abi-loader.gf.rb +76 -1
- data/lib/white_gold/library/theme/light.rb +8 -1
- data/lib/white_gold/master.rb +30 -10
- data/lib/white_gold/path/array.path.rb +16 -0
- data/lib/white_gold/tgui-abi.rb +32 -22
- data/lib/white_gold/version.rb +1 -1
- data/lib/white_gold.rb +3 -1
- metadata +6 -3
- data/lib/white_gold/abi/reducer.rb +0 -12
@@ -0,0 +1,24 @@
|
|
1
|
+
module Tgui
|
2
|
+
Chatbox = ChatBox
|
3
|
+
Checkbox = CheckBox
|
4
|
+
Combobox = ComboBox
|
5
|
+
Editbox = EditBox
|
6
|
+
Hlayout = HorizontalLayout
|
7
|
+
Hwrap = HorizontalWrap
|
8
|
+
Listbox = ListBox
|
9
|
+
Listview = ListView
|
10
|
+
Menu = MenuBar
|
11
|
+
Messagebox = MessageBox
|
12
|
+
PanelListbox = PanelListBox
|
13
|
+
PanelTabs = TabContainer
|
14
|
+
Progressbar = ProgressBar
|
15
|
+
FancyLabel = RichTextLabel
|
16
|
+
Radio = RadioButton
|
17
|
+
RadioGroup = RadioButtonGroup
|
18
|
+
Separator = SeparatorLine
|
19
|
+
Spinner = SpinButton
|
20
|
+
Spinbox = SpinControl
|
21
|
+
Textarea = TextArea
|
22
|
+
Treeview = TreeView
|
23
|
+
Vlayout = VerticalLayout
|
24
|
+
end
|
@@ -10,29 +10,29 @@ module Tgui
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def! :rectangle do |**na, &b|
|
13
|
-
shape = RectangleShape.new
|
13
|
+
shape = scope! RectangleShape.new, **na, &b
|
14
14
|
host._abi_draw shape
|
15
15
|
end
|
16
16
|
|
17
17
|
def! :circle do |**na, &b|
|
18
|
-
shape = CircleShape.new
|
18
|
+
shape = scope! CircleShape.new, **na, &b
|
19
19
|
host._abi_draw shape
|
20
20
|
end
|
21
21
|
|
22
22
|
def! :convex do |**na, &b|
|
23
|
-
shape = ConvexShape.new
|
23
|
+
shape = scope! ConvexShape.new, **na, &b
|
24
24
|
host._abi_draw shape
|
25
25
|
end
|
26
26
|
|
27
27
|
def! :text do |**na, &b|
|
28
|
-
text = Text.new
|
28
|
+
text = scope! Text.new, **na, &b
|
29
29
|
host._abi_draw text
|
30
30
|
end
|
31
31
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def! :draw do |&b|
|
35
|
-
Draw.new(self, nil)
|
35
|
+
scope! Draw.new(self, nil), &b
|
36
36
|
_abi_display
|
37
37
|
end
|
38
38
|
|
data/lib/white_gold/dsl/color.rb
CHANGED
@@ -8,8 +8,10 @@ module Tgui
|
|
8
8
|
green: [0, 200, 0, 255],
|
9
9
|
blue: [0, 0, 200, 255],
|
10
10
|
yellow: [200, 200, 0, 255],
|
11
|
-
white: [
|
12
|
-
black: [0, 0, 0, 255]
|
11
|
+
white: [255, 255, 255, 255],
|
12
|
+
black: [0, 0, 0, 255],
|
13
|
+
gray: [100, 100, 100, 255],
|
14
|
+
transparent: [255, 255, 255, 0]
|
13
15
|
}
|
14
16
|
|
15
17
|
def self.from *arg
|
@@ -37,7 +37,7 @@ module Tgui
|
|
37
37
|
def block_caller &b
|
38
38
|
Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP]) do |str1, str2|
|
39
39
|
id = @widget.abi_unpack_string(str2)
|
40
|
-
@widget.
|
40
|
+
@widget.host! do
|
41
41
|
b.(@widget.self_get_object_by_id(id), @widget)
|
42
42
|
end
|
43
43
|
end
|
@@ -99,7 +99,7 @@ module Tgui
|
|
99
99
|
_abi_add_item abi_pack_string(text), abi_pack_string(id)
|
100
100
|
item = Item.new self, id
|
101
101
|
self_objects[id] = object
|
102
|
-
|
102
|
+
scope! item, **na, &b
|
103
103
|
end
|
104
104
|
|
105
105
|
def selected
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative 'widget'
|
2
|
+
|
3
|
+
module Tgui
|
4
|
+
class CustomWidget < Widget
|
5
|
+
|
6
|
+
api_attr :callbacks do
|
7
|
+
{}
|
8
|
+
end
|
9
|
+
|
10
|
+
def self_key_press=(value)
|
11
|
+
block_caller = Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_INT, Fiddle::TYPE_INT, Fiddle::TYPE_INT, Fiddle::TYPE_INT], &value)
|
12
|
+
_abi_impl_key_pressed block_caller
|
13
|
+
self.callbacks[:self_key_press] = block_caller
|
14
|
+
end
|
15
|
+
|
16
|
+
def self_can_gain_focus=(value)
|
17
|
+
block_caller = Fiddle::Closure::BlockCaller.new(Fiddle::TYPE_INT, [0], &value)
|
18
|
+
_abi_impl_can_gain_focus block_caller
|
19
|
+
self.callbacks[:self_can_gain_focus] = block_caller
|
20
|
+
end
|
21
|
+
|
22
|
+
def self_focus_changed=(value)
|
23
|
+
block_caller = Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_INT], &value)
|
24
|
+
_abi_impl_focus_changed block_caller
|
25
|
+
self.callbacks[:self_focus_changed] = block_caller
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/white_gold/dsl/grid.rb
CHANGED
@@ -27,23 +27,47 @@ module Tgui
|
|
27
27
|
abi_unpack(Outline, _abi_get_widget_padding(w))
|
28
28
|
end
|
29
29
|
|
30
|
-
abi_enum "Alignment", :center, :
|
31
|
-
top_left: :
|
32
|
-
|
33
|
-
|
30
|
+
abi_enum "Alignment", :center, :top_left, :top, :top_right, :right, :bottom_right, :bottom, :bottom_left, :left,
|
31
|
+
left_top: :top_left, right_top: :upper_right, right_bottom: :bottom_right, left_bottom: :bottom_left
|
32
|
+
|
33
|
+
abi_packer Alignment do |*arg|
|
34
|
+
case arg.size
|
35
|
+
when 1
|
36
|
+
o = arg.first
|
37
|
+
when 2
|
38
|
+
a = case arg[0]
|
39
|
+
when :begin then :left
|
40
|
+
when :end then :right
|
41
|
+
else arg[0]
|
42
|
+
end
|
43
|
+
b = case arg[1]
|
44
|
+
when :begin then :top
|
45
|
+
when :end then :bottom
|
46
|
+
else arg[1]
|
47
|
+
end
|
48
|
+
o = if a == :center && b == :center
|
49
|
+
:center
|
50
|
+
elsif a == :center
|
51
|
+
b
|
52
|
+
elsif b == :center
|
53
|
+
a
|
54
|
+
else
|
55
|
+
"#{a}_#{b}".to_sym
|
56
|
+
end
|
57
|
+
else raise "Unsupported argument #{arg}"
|
58
|
+
end
|
59
|
+
Alignment.sym_to_i o
|
60
|
+
end
|
34
61
|
|
35
62
|
api_child :alignment= do |w, alignment|
|
36
|
-
|
63
|
+
p abi_pack(Alignment, *alignment)
|
64
|
+
_abi_set_widget_alignment w, abi_pack(Alignment, *alignment)
|
37
65
|
end
|
38
66
|
|
39
67
|
api_child :alignment do |w|
|
40
68
|
abi_unpack(Alignment, _abi_get_widget_alignment(w))
|
41
69
|
end
|
42
70
|
|
43
|
-
api_child :alignment do |w|
|
44
|
-
Alignment[_abi_get_widget_alignment]
|
45
|
-
end
|
46
|
-
|
47
71
|
api_child :cell= do |w, cell|
|
48
72
|
_abi_set_widget_cell w, abi_pack_integer(cell[0]), abi_pack_integer(cell[1])
|
49
73
|
end
|
@@ -82,7 +106,7 @@ module Tgui
|
|
82
106
|
return widgets
|
83
107
|
end
|
84
108
|
|
85
|
-
def
|
109
|
+
def self_add widget, id
|
86
110
|
super
|
87
111
|
_abi_set_widget_cell abi_pack(Widget, widget), *cell
|
88
112
|
_abi_set_widget_alignment abi_pack(Widget, widget), abi_pack(Alignment, alignment) if alignment
|
data/lib/white_gold/dsl/gui.rb
CHANGED
@@ -9,8 +9,17 @@ module Tgui
|
|
9
9
|
abi_def :self_active?, :is_active, nil => Boolean
|
10
10
|
abi_def :self_poll_events, :poll_events
|
11
11
|
abi_def :self_draw, :draw
|
12
|
-
abi_def :
|
12
|
+
abi_def :background_color=, :set_clear_color, Color => nil
|
13
13
|
abi_attr :clipboard, String
|
14
|
+
abi_def :screen_size, :get_, nil => Vector2u
|
15
|
+
|
16
|
+
attr_accessor :page
|
17
|
+
|
18
|
+
def! :messagebox do |*a, **na, &b|
|
19
|
+
messagebox = MessageBox.new
|
20
|
+
@page.send! :add, messagebox
|
21
|
+
@page.scope! messagebox, *a, **na, &b
|
22
|
+
end
|
14
23
|
|
15
24
|
end
|
16
25
|
end
|
data/lib/white_gold/dsl/label.rb
CHANGED
@@ -26,6 +26,9 @@ module Tgui
|
|
26
26
|
abi_def :ignore_mouse_events?, :ignoring_mouse_events, nil => Boolean
|
27
27
|
abi_enum "HorizontalAlignment", :left, :center, :right
|
28
28
|
abi_attr :horizontal_alignment, HorizontalAlignment
|
29
|
+
def alignment=(a)
|
30
|
+
self.horizontal_alignment = a
|
31
|
+
end
|
29
32
|
abi_enum "VerticalAlignment", :top, :center, :bottom
|
30
33
|
abi_attr :vertical_alignment, VerticalAlignment
|
31
34
|
abi_enum Scrollbar::Policy
|
@@ -29,7 +29,7 @@ module Tgui
|
|
29
29
|
def block_caller &b
|
30
30
|
Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP]) do |str1, str2|
|
31
31
|
id = @widget.abi_unpack_string(str2)
|
32
|
-
@widget.
|
32
|
+
@widget.host! do
|
33
33
|
b.(@widget.self_get_object_by_id(id), @widget)
|
34
34
|
end
|
35
35
|
end
|
@@ -80,7 +80,7 @@ module Tgui
|
|
80
80
|
_abi_add_item abi_pack_string(text), abi_pack_string(id)
|
81
81
|
item = Item.new self, id
|
82
82
|
na[:object] ||= object
|
83
|
-
|
83
|
+
scope! item, **na, &b
|
84
84
|
end
|
85
85
|
|
86
86
|
def remove_all
|
@@ -31,7 +31,7 @@ module Tgui
|
|
31
31
|
class ListViewItemSignal < Tgui::SignalInt
|
32
32
|
def block_caller &b
|
33
33
|
Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_INT]) do |index|
|
34
|
-
@widget.
|
34
|
+
@widget.host! do
|
35
35
|
b.(@widget.self_objects[index], @widget)
|
36
36
|
end
|
37
37
|
end
|
@@ -41,7 +41,7 @@ module Tgui
|
|
41
41
|
class ListViewColumnSignal < Tgui::SignalInt
|
42
42
|
def block_caller &b
|
43
43
|
Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_INT]) do |index|
|
44
|
-
@widget.
|
44
|
+
@widget.host! do
|
45
45
|
b.(@widget.columns[index], @widget)
|
46
46
|
end
|
47
47
|
end
|
@@ -93,14 +93,14 @@ module Tgui
|
|
93
93
|
index = _abi_add_column
|
94
94
|
column = Column.new self, index
|
95
95
|
columns << column
|
96
|
-
|
96
|
+
scope! column, **na, &b
|
97
97
|
end
|
98
98
|
|
99
99
|
def! :item do |object, **na, &b|
|
100
100
|
self_add_object object, na[:index]
|
101
101
|
item = Item.new self, object
|
102
102
|
na.delete :index
|
103
|
-
|
103
|
+
scope! item, **na, &b
|
104
104
|
end
|
105
105
|
|
106
106
|
def items=(items)
|
@@ -173,7 +173,7 @@ module Tgui
|
|
173
173
|
|
174
174
|
def! :grid_lines do | **na, &b|
|
175
175
|
lines = GridLines.new self
|
176
|
-
|
176
|
+
scope! lines, **na, &b
|
177
177
|
end
|
178
178
|
|
179
179
|
def grid_lines=(grid_lines)
|
@@ -199,7 +199,7 @@ module Tgui
|
|
199
199
|
|
200
200
|
def! :header do |**na, &b|
|
201
201
|
header = Header.new self
|
202
|
-
|
202
|
+
scope! header, **na, &b
|
203
203
|
end
|
204
204
|
|
205
205
|
def header=(header)
|
@@ -30,7 +30,7 @@ module Tgui
|
|
30
30
|
|
31
31
|
def connect &b
|
32
32
|
on_press = Fiddle::Closure::BlockCaller.new(0, [0]) do
|
33
|
-
@menu_bar.
|
33
|
+
@menu_bar.host! do
|
34
34
|
b.(@path.last, @path, @menu_bar)
|
35
35
|
end
|
36
36
|
end
|
@@ -57,7 +57,7 @@ module Tgui
|
|
57
57
|
end
|
58
58
|
SignalItemHierarchy.fetch_path vector, loader
|
59
59
|
object_path = @widget.self_object_path path
|
60
|
-
@widget.
|
60
|
+
@widget.host! do
|
61
61
|
b.(object_path.last, object_path, @widget)
|
62
62
|
end
|
63
63
|
end
|
@@ -79,7 +79,7 @@ module Tgui
|
|
79
79
|
host._abi_add_menu_item _1, _2
|
80
80
|
end
|
81
81
|
item = Item.new host, item_path
|
82
|
-
|
82
|
+
scope! item, **na, &b
|
83
83
|
end
|
84
84
|
|
85
85
|
def! :separator do
|
@@ -165,7 +165,7 @@ module Tgui
|
|
165
165
|
self_tree[object, grow: true].text = text
|
166
166
|
_abi_add_menu abi_pack_string(text)
|
167
167
|
item = Menu.new self, object
|
168
|
-
|
168
|
+
scope! item, **na, &b
|
169
169
|
end
|
170
170
|
|
171
171
|
def items=(items)
|
@@ -37,7 +37,7 @@ module Tgui
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def press_signal_execute
|
40
|
-
host.
|
40
|
+
host.host! do
|
41
41
|
@on_press_callbacks.each do |c|
|
42
42
|
c.(id, self, host)
|
43
43
|
end
|
@@ -52,7 +52,7 @@ module Tgui
|
|
52
52
|
_abi_add_button abi_pack_string(text)
|
53
53
|
button = Button.new self, object
|
54
54
|
self_buttons[text] = button
|
55
|
-
|
55
|
+
scope! button, **na, &b
|
56
56
|
end
|
57
57
|
|
58
58
|
def [](object)
|
@@ -73,7 +73,7 @@ module Tgui
|
|
73
73
|
self_buttons[text] = button
|
74
74
|
text
|
75
75
|
end
|
76
|
-
self_change_buttons names
|
76
|
+
self_change_buttons *names
|
77
77
|
end
|
78
78
|
|
79
79
|
def buttons
|
data/lib/white_gold/dsl/panel.rb
CHANGED
@@ -4,6 +4,14 @@ require_relative 'signal/signal_vector2f'
|
|
4
4
|
module Tgui
|
5
5
|
class Panel < Group
|
6
6
|
|
7
|
+
class Theme < Group::Theme
|
8
|
+
theme_attr :borders, :outline
|
9
|
+
theme_attr :border_color, :color
|
10
|
+
theme_attr :background_color, :color
|
11
|
+
theme_attr :texture_background, :texture
|
12
|
+
theme_attr :rounded_border_radius, :float
|
13
|
+
end
|
14
|
+
|
7
15
|
abi_signal :on_mouse_press, SignalVector2f
|
8
16
|
abi_signal :on_mouse_release, SignalVector2f
|
9
17
|
abi_signal :on_click, SignalVector2f
|
@@ -5,10 +5,19 @@ require_relative 'signal/signal_panel_list_box_item'
|
|
5
5
|
module Tgui
|
6
6
|
class PanelListBox < ScrollablePanel
|
7
7
|
|
8
|
+
class Theme < ScrollablePanel::Theme
|
9
|
+
|
10
|
+
theme_attr :items_background_color, :color
|
11
|
+
theme_attr :items_background_color_hover, :color
|
12
|
+
theme_attr :selected_items_background_color, :color
|
13
|
+
theme_attr :selected_items_background_color_hover, :color
|
14
|
+
|
15
|
+
end
|
16
|
+
|
8
17
|
class SignalPanelListBoxItem < Tgui::SignalPanelListBoxItem
|
9
18
|
def block_caller &b
|
10
19
|
Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_VOIDP]) do |id|
|
11
|
-
@widget.
|
20
|
+
@widget.host! do
|
12
21
|
b.(@widget.self_objects.key(@widget.abi_unpack_string(id)), @widget)
|
13
22
|
end
|
14
23
|
end
|
@@ -22,7 +31,7 @@ module Tgui
|
|
22
31
|
panel = Panel.new pointer: _abi_add_item(id, abi_pack_integer(index))
|
23
32
|
panel.page = page
|
24
33
|
self_objects[object] = id
|
25
|
-
|
34
|
+
scope! panel, **na, &b
|
26
35
|
end
|
27
36
|
|
28
37
|
def [](object)
|
@@ -71,7 +80,7 @@ module Tgui
|
|
71
80
|
def! :template do |**na, &b|
|
72
81
|
panel = Panel.new(pointer: _abi_get_panel_template)
|
73
82
|
panel.page = page
|
74
|
-
|
83
|
+
scope! panel, **na, &b
|
75
84
|
end
|
76
85
|
|
77
86
|
# internal
|
@@ -28,6 +28,10 @@ module Tgui
|
|
28
28
|
theme_attr :text_style, :text_styles
|
29
29
|
theme_attr :text_style_checked, :text_styles
|
30
30
|
end
|
31
|
+
|
32
|
+
api_attr :format do
|
33
|
+
:to_s
|
34
|
+
end
|
31
35
|
|
32
36
|
abi_attr :checked?
|
33
37
|
abi_attr :text, String
|
@@ -35,9 +39,18 @@ module Tgui
|
|
35
39
|
abi_signal :on_check, Signal
|
36
40
|
abi_signal :on_uncheck, Signal
|
37
41
|
abi_signal :on_change, SignalBoolean
|
38
|
-
|
42
|
+
|
43
|
+
def object
|
44
|
+
self_object
|
45
|
+
end
|
46
|
+
|
47
|
+
def object=(object)
|
48
|
+
self.self_object = object
|
49
|
+
self.text = object.then(&format)
|
50
|
+
end
|
51
|
+
|
52
|
+
api_attr :self_object do
|
39
53
|
nil
|
40
54
|
end
|
41
|
-
|
42
55
|
end
|
43
56
|
end
|
@@ -5,6 +5,13 @@ require_relative 'scrollbar'
|
|
5
5
|
module Tgui
|
6
6
|
class ScrollablePanel < Panel
|
7
7
|
|
8
|
+
class Theme < Panel::Theme
|
9
|
+
|
10
|
+
theme_comp :scrollbar, Tgui::Scrollbar::Theme
|
11
|
+
theme_attr :scrollbar_width, :float
|
12
|
+
|
13
|
+
end
|
14
|
+
|
8
15
|
abi_attr :content_size, Vector2f
|
9
16
|
abi_def :content_offset, :get_, nil => Vector2f
|
10
17
|
abi_def :scrollbar_width, :get_, nil => Float
|
@@ -7,7 +7,7 @@ module Tgui
|
|
7
7
|
Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_INT, Fiddle::TYPE_INT]) do |show_effect_type, shown|
|
8
8
|
effect_type = @widget.abi_unpack ShowEffectType, show_effect_type
|
9
9
|
shown = @widget.abi_unpack Boolean, shown
|
10
|
-
@widget.
|
10
|
+
@widget.host! do
|
11
11
|
b.(effect_type, shown, @widget)
|
12
12
|
end
|
13
13
|
end
|