white_gold 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ext/dll/openal32.dll +0 -0
- data/ext/dll/sfml-audio-2.dll +0 -0
- data/ext/dll/sfml-graphics-2.dll +0 -0
- data/ext/dll/sfml-network-2.dll +0 -0
- data/ext/dll/sfml-system-2.dll +0 -0
- data/ext/dll/sfml-window-2.dll +0 -0
- data/ext/dll/tgui.dll +0 -0
- data/ext/so/libsfml-audio.so +0 -0
- data/ext/so/libsfml-graphics.so +0 -0
- data/ext/so/libsfml-network.so +0 -0
- data/ext/so/libsfml-system.so +0 -0
- data/ext/so/libsfml-window.so +0 -0
- data/ext/so/libtgui.so +0 -0
- data/lib/white_gold/abi/alias.rb +50 -0
- data/lib/white_gold/abi/enum.rb +43 -0
- data/lib/white_gold/abi/extern_object.rb +180 -0
- data/lib/white_gold/abi/interface/interface.rb +114 -0
- data/lib/white_gold/abi/interface/interface_collection_out.rb +29 -0
- data/lib/white_gold/abi/interface/interface_composed_out.rb +28 -0
- data/lib/white_gold/abi/interface/interface_single_out.rb +19 -0
- data/lib/white_gold/abi/packer.rb +28 -0
- data/lib/white_gold/abi/reducer.rb +12 -0
- data/lib/white_gold/abi/unpacker.rb +27 -0
- data/lib/white_gold/convention/api_child.rb +30 -0
- data/lib/white_gold/convention/bang_def.rb +5 -0
- data/lib/white_gold/convention/bang_nest.rb +16 -0
- data/lib/white_gold/convention/bang_nested_caller.rb +48 -0
- data/lib/white_gold/convention/bool_property.rb +13 -0
- data/lib/white_gold/convention/boolean.rb +2 -0
- data/lib/white_gold/convention/club.rb +26 -0
- data/lib/white_gold/convention/container_widgets.rb +181 -0
- data/lib/white_gold/convention/page.rb +96 -0
- data/lib/white_gold/convention/proc_method_factory.rb +22 -0
- data/lib/white_gold/convention/unit.rb +22 -0
- data/lib/white_gold/convention/widget_like.rb +146 -0
- data/lib/white_gold/dsl/backend_gui.rb +37 -0
- data/lib/white_gold/dsl/bitmap_button.rb +11 -0
- data/lib/white_gold/dsl/box_layout.rb +47 -0
- data/lib/white_gold/dsl/box_layout_ratios.rb +13 -0
- data/lib/white_gold/dsl/button.rb +10 -0
- data/lib/white_gold/dsl/button_base.rb +18 -0
- data/lib/white_gold/dsl/chat_box.rb +65 -0
- data/lib/white_gold/dsl/checkbox.rb +6 -0
- data/lib/white_gold/dsl/child_window.rb +47 -0
- data/lib/white_gold/dsl/clickable_widget.rb +15 -0
- data/lib/white_gold/dsl/color.rb +124 -0
- data/lib/white_gold/dsl/color_picker.rb +12 -0
- data/lib/white_gold/dsl/combo_box.rb +135 -0
- data/lib/white_gold/dsl/container.rb +95 -0
- data/lib/white_gold/dsl/edit_box.rb +38 -0
- data/lib/white_gold/dsl/file_dialog.rb +86 -0
- data/lib/white_gold/dsl/font.rb +23 -0
- data/lib/white_gold/dsl/grid.rb +131 -0
- data/lib/white_gold/dsl/group.rb +6 -0
- data/lib/white_gold/dsl/gui.rb +16 -0
- data/lib/white_gold/dsl/horizontal_layout.rb +6 -0
- data/lib/white_gold/dsl/horizontal_wrap.rb +6 -0
- data/lib/white_gold/dsl/knob.rb +16 -0
- data/lib/white_gold/dsl/label.rb +21 -0
- data/lib/white_gold/dsl/list_box.rb +125 -0
- data/lib/white_gold/dsl/list_view.rb +239 -0
- data/lib/white_gold/dsl/menu_bar.rb +252 -0
- data/lib/white_gold/dsl/message_box.rb +90 -0
- data/lib/white_gold/dsl/outline.rb +52 -0
- data/lib/white_gold/dsl/panel.rb +16 -0
- data/lib/white_gold/dsl/panel_list_box.rb +83 -0
- data/lib/white_gold/dsl/picture.rb +12 -0
- data/lib/white_gold/dsl/progress_bar.rb +19 -0
- data/lib/white_gold/dsl/radio_button.rb +18 -0
- data/lib/white_gold/dsl/radio_button_group.rb +14 -0
- data/lib/white_gold/dsl/range_slider.rb +15 -0
- data/lib/white_gold/dsl/rich_text_label.rb +6 -0
- data/lib/white_gold/dsl/scrollable_panel.rb +53 -0
- data/lib/white_gold/dsl/scrollbar.rb +28 -0
- data/lib/white_gold/dsl/separator_line.rb +6 -0
- data/lib/white_gold/dsl/signal/global_signal.rb +33 -0
- data/lib/white_gold/dsl/signal/signal.rb +44 -0
- data/lib/white_gold/dsl/signal/signal_animation_type.rb +16 -0
- data/lib/white_gold/dsl/signal/signal_bool.rb +16 -0
- data/lib/white_gold/dsl/signal/signal_color.rb +16 -0
- data/lib/white_gold/dsl/signal/signal_float.rb +16 -0
- data/lib/white_gold/dsl/signal/signal_int.rb +16 -0
- data/lib/white_gold/dsl/signal/signal_item.rb +6 -0
- data/lib/white_gold/dsl/signal/signal_item_hierarchy.rb +9 -0
- data/lib/white_gold/dsl/signal/signal_panel_list_box_item.rb +7 -0
- data/lib/white_gold/dsl/signal/signal_pointer.rb +15 -0
- data/lib/white_gold/dsl/signal/signal_range.rb +15 -0
- data/lib/white_gold/dsl/signal/signal_show_effect.rb +17 -0
- data/lib/white_gold/dsl/signal/signal_string.rb +16 -0
- data/lib/white_gold/dsl/signal/signal_typed_int_bool_ptr.rb +15 -0
- data/lib/white_gold/dsl/signal/signal_typed_size_t.rb +6 -0
- data/lib/white_gold/dsl/signal/signal_u_int.rb +16 -0
- data/lib/white_gold/dsl/signal/signal_vector2f.rb +14 -0
- data/lib/white_gold/dsl/slider.rb +26 -0
- data/lib/white_gold/dsl/spin_button.rb +24 -0
- data/lib/white_gold/dsl/spin_control.rb +15 -0
- data/lib/white_gold/dsl/subwidget_container.rb +9 -0
- data/lib/white_gold/dsl/tab_container.rb +121 -0
- data/lib/white_gold/dsl/tabs.rb +91 -0
- data/lib/white_gold/dsl/text_area.rb +34 -0
- data/lib/white_gold/dsl/texture.rb +53 -0
- data/lib/white_gold/dsl/theme/boolean_attribute.rb +13 -0
- data/lib/white_gold/dsl/theme/button_theme.rb +19 -0
- data/lib/white_gold/dsl/theme/chat_box_theme.rb +16 -0
- data/lib/white_gold/dsl/theme/child_window_theme.rb +25 -0
- data/lib/white_gold/dsl/theme/color_attribute.rb +13 -0
- data/lib/white_gold/dsl/theme/color_picker_theme.rb +14 -0
- data/lib/white_gold/dsl/theme/combo_box_theme.rb +33 -0
- data/lib/white_gold/dsl/theme/common_renderer.rb +7 -0
- data/lib/white_gold/dsl/theme/edit_box_theme.rb +34 -0
- data/lib/white_gold/dsl/theme/file_dialog_theme.rb +22 -0
- data/lib/white_gold/dsl/theme/float_attribute.rb +13 -0
- data/lib/white_gold/dsl/theme/group_theme.rb +9 -0
- data/lib/white_gold/dsl/theme/knob_theme.rb +15 -0
- data/lib/white_gold/dsl/theme/label_theme.rb +20 -0
- data/lib/white_gold/dsl/theme/list_box_theme.rb +25 -0
- data/lib/white_gold/dsl/theme/list_view_theme.rb +27 -0
- data/lib/white_gold/dsl/theme/menu_bar_theme.rb +21 -0
- data/lib/white_gold/dsl/theme/message_box_theme.rb +11 -0
- data/lib/white_gold/dsl/theme/outline_attribute.rb +13 -0
- data/lib/white_gold/dsl/theme/progress_bar_theme.rb +19 -0
- data/lib/white_gold/dsl/theme/radio_button_theme.rb +30 -0
- data/lib/white_gold/dsl/theme/scrollbar_theme.rb +24 -0
- data/lib/white_gold/dsl/theme/separator_line_theme.rb +9 -0
- data/lib/white_gold/dsl/theme/slider_theme.rb +20 -0
- data/lib/white_gold/dsl/theme/spin_button_theme.rb +19 -0
- data/lib/white_gold/dsl/theme/tabs_theme.rb +29 -0
- data/lib/white_gold/dsl/theme/text_area_theme.rb +22 -0
- data/lib/white_gold/dsl/theme/text_styles_attribute.rb +13 -0
- data/lib/white_gold/dsl/theme/texture_attribute.rb +17 -0
- data/lib/white_gold/dsl/theme/theme_attributed.rb +51 -0
- data/lib/white_gold/dsl/theme/theme_component.rb +23 -0
- data/lib/white_gold/dsl/theme/tree_view_theme.rb +26 -0
- data/lib/white_gold/dsl/theme/widget_theme.rb +12 -0
- data/lib/white_gold/dsl/theme.rb +144 -0
- data/lib/white_gold/dsl/toggle_button.rb +10 -0
- data/lib/white_gold/dsl/tool_tip.rb +21 -0
- data/lib/white_gold/dsl/tree_view.rb +186 -0
- data/lib/white_gold/dsl/util.rb +17 -0
- data/lib/white_gold/dsl/vertical_layout.rb +6 -0
- data/lib/white_gold/dsl/widget.rb +279 -0
- data/lib/white_gold/dsl/window.rb +16 -0
- data/lib/white_gold/generated/tgui-abi-loader.gf.rb +1813 -0
- data/lib/white_gold/library/theme/light.rb +111 -0
- data/lib/white_gold/master.rb +170 -0
- data/lib/white_gold/path/kernel.path.rb +3 -0
- data/lib/white_gold/path/numeric.path.rb +9 -0
- data/lib/white_gold/path/object.path.rb +22 -0
- data/lib/white_gold/path/string.path.rb +5 -0
- data/lib/white_gold/tgui-abi.rb +255 -0
- data/lib/white_gold/tgui-config.rb +20 -0
- data/lib/white_gold.rb +47 -0
- metadata +209 -0
@@ -0,0 +1,19 @@
|
|
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
|
@@ -0,0 +1,16 @@
|
|
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
|
@@ -0,0 +1,25 @@
|
|
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
|
@@ -0,0 +1,14 @@
|
|
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
|
@@ -0,0 +1,33 @@
|
|
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
|
@@ -0,0 +1,34 @@
|
|
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
|
@@ -0,0 +1,22 @@
|
|
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
|
@@ -0,0 +1,15 @@
|
|
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
|
@@ -0,0 +1,20 @@
|
|
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
|
@@ -0,0 +1,25 @@
|
|
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
|
@@ -0,0 +1,27 @@
|
|
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
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative 'widget_theme'
|
2
|
+
|
3
|
+
module Tgui
|
4
|
+
class MenuBarTheme < WidgetTheme
|
5
|
+
|
6
|
+
theme_attr :background_color, :color
|
7
|
+
theme_attr :selected_background_color, :color
|
8
|
+
theme_attr :text_color, :color
|
9
|
+
theme_attr :selected_text_color, :color
|
10
|
+
theme_attr :text_color_disabled, :color
|
11
|
+
theme_attr :separator_color, :color
|
12
|
+
theme_attr :texture_background, :texture
|
13
|
+
theme_attr :texture_item_background, :texture
|
14
|
+
theme_attr :texture_selected_item_background, :texture
|
15
|
+
theme_attr :distance_to_side, :float
|
16
|
+
theme_attr :separator_thickness, :float
|
17
|
+
theme_attr :separator_vertical_padding, :float
|
18
|
+
theme_attr :separator_side_padding, :float
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'widget_theme'
|
2
|
+
|
3
|
+
module Tgui
|
4
|
+
class ProgressBarTheme < WidgetTheme
|
5
|
+
|
6
|
+
theme_attr :borders, :outline
|
7
|
+
theme_attr :text_color, :color
|
8
|
+
theme_attr :text_color_filled, :color
|
9
|
+
theme_attr :background_color, :color
|
10
|
+
theme_attr :fill_color, :color
|
11
|
+
theme_attr :border_color, :color
|
12
|
+
theme_attr :texture_background, :texture
|
13
|
+
theme_attr :texture_fill, :texture
|
14
|
+
theme_attr :text_style, :text_styles
|
15
|
+
theme_attr :text_outline_color, :color
|
16
|
+
theme_attr :text_outline_thickness, :float
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require_relative 'widget_theme'
|
2
|
+
|
3
|
+
module Tgui
|
4
|
+
class RadioButtonTheme < WidgetTheme
|
5
|
+
|
6
|
+
theme_attr :borders, :outline
|
7
|
+
theme_attr :text_distance_ratio, :float
|
8
|
+
[ '', :_hover, :_disabled, :_checked, :_checked_hover, :_checked_disabled ].each do |v|
|
9
|
+
theme_attr "text_color#{v}".to_sym, :color
|
10
|
+
theme_attr "background_color#{v}".to_sym, :color
|
11
|
+
theme_attr "border_color#{v}".to_sym, :color
|
12
|
+
end
|
13
|
+
theme_attr :border_color_focused, :color
|
14
|
+
theme_attr :border_color_checked_focused, :color
|
15
|
+
theme_attr :check_color, :color
|
16
|
+
theme_attr :check_color_hover, :color
|
17
|
+
theme_attr :check_color_disabled, :color
|
18
|
+
theme_attr :texture_unchecked, :texture
|
19
|
+
theme_attr :texture_unchecked_hover, :texture
|
20
|
+
theme_attr :texture_unchecked_disabled, :texture
|
21
|
+
theme_attr :texture_unchecked_focused, :texture
|
22
|
+
theme_attr :texture_checked, :texture
|
23
|
+
theme_attr :texture_checked_hover, :texture
|
24
|
+
theme_attr :texture_checked_disabled, :texture
|
25
|
+
theme_attr :texture_checked_focused, :texture
|
26
|
+
theme_attr :text_style, :text_styles
|
27
|
+
theme_attr :text_style_checked, :text_styles
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'widget_theme'
|
2
|
+
|
3
|
+
module Tgui
|
4
|
+
class ScrollbarTheme < WidgetTheme
|
5
|
+
|
6
|
+
theme_attr :track_color, :color
|
7
|
+
theme_attr :track_color_hover, :color
|
8
|
+
theme_attr :thumb_color, :color
|
9
|
+
theme_attr :thumb_color_hover, :color
|
10
|
+
theme_attr :arrow_background_color, :color
|
11
|
+
theme_attr :arrow_background_color_hover, :color
|
12
|
+
theme_attr :arrow_color, :color
|
13
|
+
theme_attr :arrow_color_hover, :color
|
14
|
+
theme_attr :texture_track, :texture
|
15
|
+
theme_attr :texture_track_hover, :texture
|
16
|
+
theme_attr :texture_thumb, :texture
|
17
|
+
theme_attr :texture_thumb_hover, :texture
|
18
|
+
theme_attr :texture_arrow_up, :texture
|
19
|
+
theme_attr :texture_arrow_up_hover, :texture
|
20
|
+
theme_attr :texture_arrow_down, :texture
|
21
|
+
theme_attr :texture_arrow_down_hover, :texture
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative 'widget_theme'
|
2
|
+
|
3
|
+
module Tgui
|
4
|
+
class SliderTheme < WidgetTheme
|
5
|
+
|
6
|
+
theme_attr :borders, :outline
|
7
|
+
theme_attr :track_color, :color
|
8
|
+
theme_attr :track_color_hover, :color
|
9
|
+
theme_attr :thumb_color, :color
|
10
|
+
theme_attr :thumb_color_hover, :color
|
11
|
+
theme_attr :border_color, :color
|
12
|
+
theme_attr :border_color_hover, :color
|
13
|
+
theme_attr :texture_track, :texture
|
14
|
+
theme_attr :texture_track_hover, :texture
|
15
|
+
theme_attr :texture_thumb, :texture
|
16
|
+
theme_attr :texture_thumb_hover, :texture
|
17
|
+
theme_attr :thumb_within_track, :boolean
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'widget_theme'
|
2
|
+
|
3
|
+
module Tgui
|
4
|
+
class SpinButtonTheme < WidgetTheme
|
5
|
+
|
6
|
+
theme_attr :borders, :outline
|
7
|
+
theme_attr :border_between_arrows, :float
|
8
|
+
theme_attr :background_color, :color
|
9
|
+
theme_attr :background_color_hover, :color
|
10
|
+
theme_attr :arrow_color, :color
|
11
|
+
theme_attr :arrow_color_hover, :color
|
12
|
+
theme_attr :border_color, :color
|
13
|
+
theme_attr :texture_arrow_up, :texture
|
14
|
+
theme_attr :texture_arrow_up_hover, :texture
|
15
|
+
theme_attr :texture_arrow_down, :texture
|
16
|
+
theme_attr :texture_arrow_down_hover, :texture
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative 'widget_theme'
|
2
|
+
|
3
|
+
module Tgui
|
4
|
+
class TabsTheme < WidgetTheme
|
5
|
+
|
6
|
+
theme_attr :borders, :outline
|
7
|
+
theme_attr :background_color, :color
|
8
|
+
theme_attr :background_color_hover, :color
|
9
|
+
theme_attr :background_color_disabled, :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 :text_color_disabled, :color
|
15
|
+
theme_attr :selected_text_color, :color
|
16
|
+
theme_attr :selected_text_color_hover, :color
|
17
|
+
theme_attr :border_color, :color
|
18
|
+
theme_attr :border_color_hover, :color
|
19
|
+
theme_attr :selected_border_color, :color
|
20
|
+
theme_attr :selected_border_color_hover, :color
|
21
|
+
theme_attr :texture_tab, :texture
|
22
|
+
theme_attr :texture_tab_hover, :texture
|
23
|
+
theme_attr :texture_selected_tab, :texture
|
24
|
+
theme_attr :texture_selected_tab_hover, :texture
|
25
|
+
theme_attr :texture_disabled_tab, :texture
|
26
|
+
theme_attr :distance_to_side, :float
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require_relative 'widget_theme'
|
2
|
+
require_relative 'scrollbar_theme'
|
3
|
+
|
4
|
+
module Tgui
|
5
|
+
class TextAreaTheme < WidgetTheme
|
6
|
+
|
7
|
+
theme_attr :borders, :outline
|
8
|
+
theme_attr :padding, :outline
|
9
|
+
theme_attr :background_color, :color
|
10
|
+
theme_attr :text_color, :color
|
11
|
+
theme_attr :default_text_color, :color
|
12
|
+
theme_attr :selected_text_color, :color
|
13
|
+
theme_attr :selected_text_background_color, :color
|
14
|
+
theme_attr :border_color, :color
|
15
|
+
theme_attr :caret_color, :color
|
16
|
+
theme_attr :texture_background, :texture
|
17
|
+
theme_attr :caret_width, :float
|
18
|
+
theme_comp :scrollbar, ScrollbarTheme
|
19
|
+
theme_attr :scrollbar_width, :float
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require_relative '../color'
|
2
|
+
require_relative '../outline'
|
3
|
+
require_relative '../texture'
|
4
|
+
require_relative 'boolean_attribute'
|
5
|
+
require_relative 'color_attribute'
|
6
|
+
require_relative 'float_attribute'
|
7
|
+
require_relative 'outline_attribute'
|
8
|
+
require_relative 'text_styles_attribute'
|
9
|
+
require_relative 'texture_attribute'
|
10
|
+
|
11
|
+
module Tgui
|
12
|
+
module ThemeAttributed
|
13
|
+
include BangDef
|
14
|
+
|
15
|
+
ATTRIBUTE_TYPES = {
|
16
|
+
boolean: BooleanAttribute,
|
17
|
+
color: ColorAttribute,
|
18
|
+
float: FloatAttribute,
|
19
|
+
outline: OutlineAttribute,
|
20
|
+
text_styles: TextStylesAttribute,
|
21
|
+
texture: TextureAttribute,
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
def theme_attr name, type
|
25
|
+
attr_name = name.to_s.pascalcase
|
26
|
+
attr_type = ATTRIBUTE_TYPES[type]
|
27
|
+
def! name do |*value|
|
28
|
+
attributes[attr_name] = attr_type.new attr_name, value
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def theme_comp name, type, tgui_attr_name = nil
|
33
|
+
attr_name = tgui_attr_name || name.to_s.pascalcase
|
34
|
+
def! name do |custom_name = nil, base_name = nil, **na, &b|
|
35
|
+
if base_name
|
36
|
+
attribute = attributes[custom_name]
|
37
|
+
if !attribute || attribute.name != base_name
|
38
|
+
attribute = attributes[custom_name] = type.new base_name, custom_name
|
39
|
+
end
|
40
|
+
else
|
41
|
+
a_name = custom_name || attr_name
|
42
|
+
attribute = attributes[a_name]
|
43
|
+
if !attribute || attribute.name != attr_name
|
44
|
+
attribute = attributes[a_name] = type.new attr_name, custom_name
|
45
|
+
end
|
46
|
+
end
|
47
|
+
upon! attribute, **na, &b
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require_relative 'theme_attributed'
|
2
|
+
require_relative 'common_renderer'
|
3
|
+
|
4
|
+
module Tgui
|
5
|
+
class ThemeComponent
|
6
|
+
include BangNest
|
7
|
+
extend ThemeAttributed
|
8
|
+
|
9
|
+
def initialize name, custom_name
|
10
|
+
@name = name
|
11
|
+
@custom_name = custom_name
|
12
|
+
@attributes = {}
|
13
|
+
end
|
14
|
+
|
15
|
+
attr :name, :attributes
|
16
|
+
|
17
|
+
def to_theme
|
18
|
+
return "" if @attributes.empty?
|
19
|
+
header = @custom_name ? "#{@custom_name} : #{@name}" : @name
|
20
|
+
"#{header} {\n#{@attributes.values.map(&:to_theme).join("\n")}\n}"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|