white_gold 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/lib/white_gold/abi/enum.rb +0 -8
  3. data/lib/white_gold/convention/container_widgets.rb +26 -29
  4. data/lib/white_gold/convention/page.rb +2 -2
  5. data/lib/white_gold/{dsl → convention}/theme/color_attribute.rb +2 -0
  6. data/lib/white_gold/{dsl → convention}/theme/outline_attribute.rb +2 -0
  7. data/lib/white_gold/{dsl → convention}/theme/texture_attribute.rb +2 -0
  8. data/lib/white_gold/{dsl → convention}/theme/theme_attributed.rb +3 -17
  9. data/lib/white_gold/{dsl → convention}/theme/theme_component.rb +14 -3
  10. data/lib/white_gold/convention/theme_attributes.rb +49 -0
  11. data/lib/white_gold/dsl/button_base.rb +17 -2
  12. data/lib/white_gold/dsl/chat_box.rb +11 -0
  13. data/lib/white_gold/dsl/child_window.rb +21 -0
  14. data/lib/white_gold/dsl/color_picker.rb +9 -0
  15. data/lib/white_gold/dsl/combo_box.rb +28 -0
  16. data/lib/white_gold/dsl/edit_box.rb +29 -0
  17. data/lib/white_gold/dsl/file_dialog.rb +17 -0
  18. data/lib/white_gold/dsl/group.rb +5 -0
  19. data/lib/white_gold/dsl/knob.rb +10 -0
  20. data/lib/white_gold/dsl/label.rb +14 -0
  21. data/lib/white_gold/dsl/list_box.rb +20 -0
  22. data/lib/white_gold/dsl/list_view.rb +23 -0
  23. data/lib/white_gold/dsl/menu_bar.rb +16 -0
  24. data/lib/white_gold/dsl/message_box.rb +6 -0
  25. data/lib/white_gold/dsl/progress_bar.rb +14 -0
  26. data/lib/white_gold/dsl/radio_button.rb +25 -0
  27. data/lib/white_gold/dsl/range_slider.rb +8 -0
  28. data/lib/white_gold/dsl/scrollbar.rb +19 -0
  29. data/lib/white_gold/dsl/separator_line.rb +5 -0
  30. data/lib/white_gold/dsl/slider.rb +15 -0
  31. data/lib/white_gold/dsl/spin_button.rb +14 -0
  32. data/lib/white_gold/dsl/tabs.rb +24 -0
  33. data/lib/white_gold/dsl/text_area.rb +16 -0
  34. data/lib/white_gold/dsl/theme.rb +11 -51
  35. data/lib/white_gold/dsl/tree_view.rb +20 -0
  36. data/lib/white_gold/dsl/widget.rb +11 -2
  37. data/lib/white_gold/library/theme/light.rb +15 -3
  38. data/lib/white_gold/master.rb +1 -1
  39. data/lib/white_gold/path/object.path.rb +0 -11
  40. data/lib/white_gold/tgui-abi.rb +1 -0
  41. metadata +13 -37
  42. data/lib/white_gold/dsl/theme/button_theme.rb +0 -19
  43. data/lib/white_gold/dsl/theme/chat_box_theme.rb +0 -16
  44. data/lib/white_gold/dsl/theme/child_window_theme.rb +0 -25
  45. data/lib/white_gold/dsl/theme/color_picker_theme.rb +0 -14
  46. data/lib/white_gold/dsl/theme/combo_box_theme.rb +0 -33
  47. data/lib/white_gold/dsl/theme/common_renderer.rb +0 -7
  48. data/lib/white_gold/dsl/theme/edit_box_theme.rb +0 -34
  49. data/lib/white_gold/dsl/theme/file_dialog_theme.rb +0 -22
  50. data/lib/white_gold/dsl/theme/group_theme.rb +0 -9
  51. data/lib/white_gold/dsl/theme/knob_theme.rb +0 -15
  52. data/lib/white_gold/dsl/theme/label_theme.rb +0 -20
  53. data/lib/white_gold/dsl/theme/list_box_theme.rb +0 -25
  54. data/lib/white_gold/dsl/theme/list_view_theme.rb +0 -27
  55. data/lib/white_gold/dsl/theme/menu_bar_theme.rb +0 -21
  56. data/lib/white_gold/dsl/theme/message_box_theme.rb +0 -11
  57. data/lib/white_gold/dsl/theme/progress_bar_theme.rb +0 -19
  58. data/lib/white_gold/dsl/theme/radio_button_theme.rb +0 -30
  59. data/lib/white_gold/dsl/theme/scrollbar_theme.rb +0 -24
  60. data/lib/white_gold/dsl/theme/separator_line_theme.rb +0 -9
  61. data/lib/white_gold/dsl/theme/slider_theme.rb +0 -20
  62. data/lib/white_gold/dsl/theme/spin_button_theme.rb +0 -19
  63. data/lib/white_gold/dsl/theme/tabs_theme.rb +0 -29
  64. data/lib/white_gold/dsl/theme/text_area_theme.rb +0 -22
  65. data/lib/white_gold/dsl/theme/tree_view_theme.rb +0 -26
  66. data/lib/white_gold/dsl/theme/widget_theme.rb +0 -12
  67. /data/lib/white_gold/{dsl → convention}/theme/boolean_attribute.rb +0 -0
  68. /data/lib/white_gold/{dsl → convention}/theme/float_attribute.rb +0 -0
  69. /data/lib/white_gold/{dsl → convention}/theme/text_styles_attribute.rb +0 -0
  70. /data/lib/white_gold/dsl/{checkbox.rb → check_box.rb} +0 -0
@@ -3,6 +3,31 @@ require_relative 'signal/signal_bool'
3
3
 
4
4
  module Tgui
5
5
  class RadioButton < ClickableWidget
6
+
7
+ class Theme < Widget::Theme
8
+ theme_attr :borders, :outline
9
+ theme_attr :text_distance_ratio, :float
10
+ [ '', :_hover, :_disabled, :_checked, :_checked_hover, :_checked_disabled ].each do |v|
11
+ theme_attr "text_color#{v}".to_sym, :color
12
+ theme_attr "background_color#{v}".to_sym, :color
13
+ theme_attr "border_color#{v}".to_sym, :color
14
+ end
15
+ theme_attr :border_color_focused, :color
16
+ theme_attr :border_color_checked_focused, :color
17
+ theme_attr :check_color, :color
18
+ theme_attr :check_color_hover, :color
19
+ theme_attr :check_color_disabled, :color
20
+ theme_attr :texture_unchecked, :texture
21
+ theme_attr :texture_unchecked_hover, :texture
22
+ theme_attr :texture_unchecked_disabled, :texture
23
+ theme_attr :texture_unchecked_focused, :texture
24
+ theme_attr :texture_checked, :texture
25
+ theme_attr :texture_checked_hover, :texture
26
+ theme_attr :texture_checked_disabled, :texture
27
+ theme_attr :texture_checked_focused, :texture
28
+ theme_attr :text_style, :text_styles
29
+ theme_attr :text_style_checked, :text_styles
30
+ end
6
31
 
7
32
  abi_attr :checked?
8
33
  abi_attr :text, String
@@ -1,9 +1,17 @@
1
1
  require_relative 'widget'
2
+ require_relative 'slider'
2
3
  require_relative 'signal/signal_range'
3
4
 
4
5
  module Tgui
5
6
  class RangeSlider < Widget
6
7
 
8
+ class Theme < Slider::Theme
9
+ theme_attr :selected_track_color, :color
10
+ theme_attr :selected_track_color_hover, :color
11
+ theme_attr :texture_selected_track, :texture
12
+ theme_attr :texture_selected_track_hover, :texture
13
+ end
14
+
7
15
  abi_attr :min, Float, :minimum
8
16
  abi_attr :max, Float, :maximum
9
17
  abi_attr :selection_start, Float
@@ -4,6 +4,25 @@ require_relative 'signal/signal_u_int'
4
4
  module Tgui
5
5
  class Scrollbar < Widget
6
6
 
7
+ class Theme < Widget::Theme
8
+ theme_attr :track_color, :color
9
+ theme_attr :track_color_hover, :color
10
+ theme_attr :thumb_color, :color
11
+ theme_attr :thumb_color_hover, :color
12
+ theme_attr :arrow_background_color, :color
13
+ theme_attr :arrow_background_color_hover, :color
14
+ theme_attr :arrow_color, :color
15
+ theme_attr :arrow_color_hover, :color
16
+ theme_attr :texture_track, :texture
17
+ theme_attr :texture_track_hover, :texture
18
+ theme_attr :texture_thumb, :texture
19
+ theme_attr :texture_thumb_hover, :texture
20
+ theme_attr :texture_arrow_up, :texture
21
+ theme_attr :texture_arrow_up_hover, :texture
22
+ theme_attr :texture_arrow_down, :texture
23
+ theme_attr :texture_arrow_down_hover, :texture
24
+ end
25
+
7
26
  abi_enum "Policy", :auto, :always, :never
8
27
 
9
28
  abi_attr :max, Integer, :maximum
@@ -2,5 +2,10 @@ require_relative 'clickable_widget'
2
2
 
3
3
  module Tgui
4
4
  class SeparatorLine < ClickableWidget
5
+
6
+ class Theme < Widget::Theme
7
+ theme_attr :color, :color
8
+ end
9
+
5
10
  end
6
11
  end
@@ -4,6 +4,21 @@ require_relative 'signal/signal_float'
4
4
  module Tgui
5
5
  class Slider < Widget
6
6
 
7
+ class Theme < Widget::Theme
8
+ theme_attr :borders, :outline
9
+ theme_attr :track_color, :color
10
+ theme_attr :track_color_hover, :color
11
+ theme_attr :thumb_color, :color
12
+ theme_attr :thumb_color_hover, :color
13
+ theme_attr :border_color, :color
14
+ theme_attr :border_color_hover, :color
15
+ theme_attr :texture_track, :texture
16
+ theme_attr :texture_track_hover, :texture
17
+ theme_attr :texture_thumb, :texture
18
+ theme_attr :texture_thumb_hover, :texture
19
+ theme_attr :thumb_within_track, :boolean
20
+ end
21
+
7
22
  abi_attr :min, Float, :minimum
8
23
  abi_attr :max, Float, :maximum
9
24
  abi_attr :value, Float
@@ -4,6 +4,20 @@ require_relative 'signal/signal_float'
4
4
  module Tgui
5
5
  class SpinButton < ClickableWidget
6
6
 
7
+ class Theme < Widget::Theme
8
+ theme_attr :borders, :outline
9
+ theme_attr :border_between_arrows, :float
10
+ theme_attr :background_color, :color
11
+ theme_attr :background_color_hover, :color
12
+ theme_attr :arrow_color, :color
13
+ theme_attr :arrow_color_hover, :color
14
+ theme_attr :border_color, :color
15
+ theme_attr :texture_arrow_up, :texture
16
+ theme_attr :texture_arrow_up_hover, :texture
17
+ theme_attr :texture_arrow_down, :texture
18
+ theme_attr :texture_arrow_down_hover, :texture
19
+ end
20
+
7
21
  abi_attr :min, Float, :minimum
8
22
  abi_attr :max, Float, :maximum
9
23
  abi_attr :value, Float
@@ -5,6 +5,30 @@ require_relative 'signal/signal'
5
5
  module Tgui
6
6
  class Tabs < Widget
7
7
 
8
+ class Theme < Widget::Theme
9
+ theme_attr :borders, :outline
10
+ theme_attr :background_color, :color
11
+ theme_attr :background_color_hover, :color
12
+ theme_attr :background_color_disabled, :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 :text_color_disabled, :color
18
+ theme_attr :selected_text_color, :color
19
+ theme_attr :selected_text_color_hover, :color
20
+ theme_attr :border_color, :color
21
+ theme_attr :border_color_hover, :color
22
+ theme_attr :selected_border_color, :color
23
+ theme_attr :selected_border_color_hover, :color
24
+ theme_attr :texture_tab, :texture
25
+ theme_attr :texture_tab_hover, :texture
26
+ theme_attr :texture_selected_tab, :texture
27
+ theme_attr :texture_selected_tab_hover, :texture
28
+ theme_attr :texture_disabled_tab, :texture
29
+ theme_attr :distance_to_side, :float
30
+ end
31
+
8
32
  class Tab < WidgetLike
9
33
 
10
34
  abi_def :text=, :change_text, id: 0, String => nil
@@ -6,6 +6,22 @@ require_relative 'signal/signal_string'
6
6
  module Tgui
7
7
  class TextArea < Widget
8
8
 
9
+ class Theme < Widget::Theme
10
+ theme_attr :borders, :outline
11
+ theme_attr :padding, :outline
12
+ theme_attr :background_color, :color
13
+ theme_attr :text_color, :color
14
+ theme_attr :default_text_color, :color
15
+ theme_attr :selected_text_color, :color
16
+ theme_attr :selected_text_background_color, :color
17
+ theme_attr :border_color, :color
18
+ theme_attr :caret_color, :color
19
+ theme_attr :texture_background, :texture
20
+ theme_attr :caret_width, :float
21
+ theme_comp :scrollbar, Scrollbar::Theme
22
+ theme_attr :scrollbar_width, :float
23
+ end
24
+
9
25
  abi_attr :text, String
10
26
  abi_def :add_text, String => nil
11
27
  abi_attr :default_text, String
@@ -1,9 +1,7 @@
1
1
  require 'tempfile'
2
2
  require_relative '../abi/extern_object'
3
3
  require_relative '../convention/bang_nest'
4
- Dir.each_child File.dirname(__FILE__) + "/theme" do |filename|
5
- require_relative "theme/#{filename}"
6
- end
4
+ require_relative '../convention/theme/theme_attributed'
7
5
 
8
6
  module Tgui
9
7
  class Theme < ExternObject
@@ -63,59 +61,20 @@ module Tgui
63
61
  self.attributes = {}
64
62
  end
65
63
 
66
- def! :custom do |comp, seed, **na, &b|
64
+ @@debug = false
65
+ def debug=(debug)
66
+ @@debug = debug
67
+ end
68
+
69
+ def! :custom do |type, seed, **na, &b|
67
70
  self.next_renderer_id = renderer_id = next_renderer_id.next
68
- send("#{comp}!", renderer_id, seed, **na, &b)
71
+ attribute = type.new(seed, renderer_id)
72
+ attributes[attribute.name] = attribute
73
+ upon! attribute, **na, &b
69
74
  self_commit
70
75
  renderer_id
71
76
  end
72
77
 
73
-
74
- theme_attr :text_color, :color
75
- theme_attr :text_color_hover, :color
76
- theme_attr :text_color_disabled, :color
77
- theme_attr :background_color, :color
78
- theme_attr :background_color_hover, :color
79
- theme_attr :background_color_disabled, :color
80
- theme_attr :selected_text_color, :color
81
- theme_attr :selected_text_color_hover, :color
82
- theme_attr :selected_background_color, :color
83
- theme_attr :selected_background_color_hover, :color
84
- theme_attr :border_color, :color
85
- theme_attr :borders, :outline
86
- theme_attr :scrollbar_width, :float
87
- theme_attr :arrow_background_color, :color
88
- theme_attr :arrow_background_color_hover, :color
89
- theme_attr :arrow_background_color_disabled, :color
90
- theme_attr :arrow_color, :color
91
- theme_attr :arrow_color_hover, :color
92
- theme_attr :arrow_color_disabled, :color
93
-
94
- theme_comp :button, ButtonTheme
95
- theme_comp :chat_box, ChatBoxTheme
96
- theme_comp :child_window, ChildWindowTheme
97
- theme_comp :color_picker, ColorPickerTheme
98
- theme_comp :combobox, ComboBoxTheme, "ComboBox"
99
- theme_comp :editbox, EditBoxTheme, "EditBox"
100
- theme_comp :file_dialog, FileDialogTheme
101
- theme_comp :group, GroupTheme
102
- theme_comp :knob, KnobTheme
103
- theme_comp :label, LabelTheme
104
- theme_comp :listbox, ListBoxTheme, "ListBox"
105
- theme_comp :list_view, ListViewTheme
106
- theme_comp :menu, MenuBarTheme, "MenuBar"
107
- theme_comp :message_box, MessageBoxTheme
108
- theme_comp :progress_bar, ProgressBarTheme
109
- theme_comp :radio_button, RadioButtonTheme
110
- theme_comp :scrollbar, ScrollbarTheme
111
- theme_comp :separator, SeparatorLineTheme
112
- theme_comp :slider, SliderTheme
113
- theme_comp :spin_button, SpinButtonTheme
114
- theme_comp :tabs, TabsTheme
115
- theme_comp :text_area, TextAreaTheme
116
- theme_comp :tree_view, TreeViewTheme
117
- theme_comp :widget, WidgetTheme
118
-
119
78
  def self_commit custom_rendered = nil
120
79
  if attributes.size > 0
121
80
  file = Tempfile.new
@@ -129,6 +88,7 @@ module Tgui
129
88
  file << v.to_theme << "\n"
130
89
  end
131
90
  file.close
91
+ puts File.readlines(file.path) if @@debug
132
92
  _abi_load file.path
133
93
  ensure
134
94
  file.close!
@@ -4,6 +4,26 @@ require_relative 'signal/signal_item_hierarchy'
4
4
  module Tgui
5
5
  class TreeView < Widget
6
6
 
7
+ class Theme < Widget::Theme
8
+ theme_attr :borders, :outline
9
+ theme_attr :padding, :outline
10
+ theme_attr :background_color, :color
11
+ theme_attr :background_color_hover, :color
12
+ theme_attr :selected_background_color, :color
13
+ theme_attr :selected_background_color_hover, :color
14
+ theme_attr :border_color, :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_comp :scrollbar, Scrollbar::Theme
20
+ theme_attr :scrollbar_width, :float
21
+ theme_attr :texture_background, :texture
22
+ theme_attr :texture_branch_expanded, :texture
23
+ theme_attr :texture_branch_collapsed, :texture
24
+ theme_attr :texture_leaf, :texture
25
+ end
26
+
7
27
  class SignalItemHierarchy < Tgui::SignalItemHierarchy
8
28
  def block_caller &b
9
29
  Fiddle::Closure::BlockCaller.new(0, [Fiddle::TYPE_VOIDP]) do |vector|
@@ -3,7 +3,7 @@ require_relative '../convention/bang_nested_caller'
3
3
  require_relative '../convention/unit'
4
4
  require_relative '../convention/widget_like'
5
5
  require_relative '../convention/api_child'
6
- require_relative 'theme/widget_theme'
6
+ require_relative '../convention/theme/theme_component'
7
7
  require_relative 'color'
8
8
  require_relative 'outline'
9
9
  require_relative 'texture'
@@ -18,6 +18,15 @@ module Tgui
18
18
  include BangNestedCaller
19
19
  extend BangDef
20
20
 
21
+ class Theme < ThemeComponent
22
+
23
+ theme_attr :opacity, :float
24
+ theme_attr :opacity_disabled, :float
25
+ theme_attr :text_size, :float
26
+ theme_attr :transparent_texture, :boolean
27
+
28
+ end
29
+
21
30
  attr_accessor :page
22
31
 
23
32
  def window
@@ -39,7 +48,7 @@ module Tgui
39
48
  seed = page.custom_renderers[self] if seed == VOID
40
49
  if !na.empty? || b
41
50
  upon! page.theme do
42
- seed = custom! theme_comp, seed, **na, &b
51
+ seed = custom! self.class::Theme, seed, **na, &b
43
52
  end
44
53
  page.custom_renderers[self] = seed
45
54
  elsif !seed
@@ -49,7 +49,7 @@ text_area! do
49
49
  selected_text_background_color! 157, 185, 240
50
50
  end
51
51
 
52
- chat_box! do
52
+ chatbox! do
53
53
  background_color! 240
54
54
  end
55
55
 
@@ -64,7 +64,7 @@ listbox! do
64
64
  background_color_hover! 220
65
65
  end
66
66
 
67
- list_view! do
67
+ listview! do
68
68
  background_color! 240
69
69
  header_background_color! 220
70
70
  end
@@ -76,7 +76,7 @@ menu! do
76
76
  separator_side_padding! 2
77
77
  end
78
78
 
79
- progress_bar! do
79
+ progressbar! do
80
80
  borders! 1
81
81
  end
82
82
 
@@ -87,6 +87,14 @@ radio_button! do
87
87
  text_distance_ratio! 0.3
88
88
  end
89
89
 
90
+ range_slider! do
91
+ track_color! 220
92
+ thumb_color! 200
93
+ thumb_color_hover! 190
94
+ borders! 0
95
+ selected_track_color_hover! 157, 185, 240
96
+ end
97
+
90
98
  scrollbar! do
91
99
  track_color! 220
92
100
  thumb_color! 200
@@ -95,6 +103,10 @@ scrollbar! do
95
103
  arrow_background_color_hover! 190
96
104
  end
97
105
 
106
+ separator! do
107
+ color! 220
108
+ end
109
+
98
110
  slider! do
99
111
  track_color! 220
100
112
  thumb_color! 200
@@ -163,7 +163,7 @@ class WhiteGold
163
163
  elsif @window.respond_to? name
164
164
  @window.send(name, *a, **na, &b)
165
165
  else
166
- no_method_error = "method missing in Page/Gui/Window"
166
+ no_method_error = "method '#{name}' missing in Page/Gui/Window"
167
167
  raise no_method_error
168
168
  end
169
169
  end
@@ -8,15 +8,4 @@ class Object
8
8
  def proc &block
9
9
  block_given? ? Kernel.proc(&block) : ProcMethodFactory.new(self)
10
10
  end
11
-
12
- class << self
13
- def to_abi object
14
- object
15
- end
16
-
17
- def to_api data
18
- data
19
- end
20
- end
21
-
22
11
  end
@@ -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
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.1
4
+ version: 0.0.2
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-01 00:00:00.000000000 Z
11
+ date: 2024-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiddle
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.1'
27
27
  description: " Ruby gem for building pure ruby graphical user interface. \n Uses
28
- [TGUI](https://tgui.eu/) & [SFML](https://www.sfml-dev.org/) as a backend.\"\n"
28
+ TGUI & SFML as a backend.\n"
29
29
  email: oficjalnyadreslukasza@gmail.com
30
30
  executables: []
31
31
  extensions: []
@@ -65,6 +65,15 @@ files:
65
65
  - lib/white_gold/convention/container_widgets.rb
66
66
  - lib/white_gold/convention/page.rb
67
67
  - lib/white_gold/convention/proc_method_factory.rb
68
+ - lib/white_gold/convention/theme/boolean_attribute.rb
69
+ - lib/white_gold/convention/theme/color_attribute.rb
70
+ - lib/white_gold/convention/theme/float_attribute.rb
71
+ - lib/white_gold/convention/theme/outline_attribute.rb
72
+ - lib/white_gold/convention/theme/text_styles_attribute.rb
73
+ - lib/white_gold/convention/theme/texture_attribute.rb
74
+ - lib/white_gold/convention/theme/theme_attributed.rb
75
+ - lib/white_gold/convention/theme/theme_component.rb
76
+ - lib/white_gold/convention/theme_attributes.rb
68
77
  - lib/white_gold/convention/unit.rb
69
78
  - lib/white_gold/convention/widget_like.rb
70
79
  - lib/white_gold/dsl/backend_gui.rb
@@ -74,7 +83,7 @@ files:
74
83
  - lib/white_gold/dsl/button.rb
75
84
  - lib/white_gold/dsl/button_base.rb
76
85
  - lib/white_gold/dsl/chat_box.rb
77
- - lib/white_gold/dsl/checkbox.rb
86
+ - lib/white_gold/dsl/check_box.rb
78
87
  - lib/white_gold/dsl/child_window.rb
79
88
  - lib/white_gold/dsl/clickable_widget.rb
80
89
  - lib/white_gold/dsl/color.rb
@@ -134,39 +143,6 @@ files:
134
143
  - lib/white_gold/dsl/text_area.rb
135
144
  - lib/white_gold/dsl/texture.rb
136
145
  - 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
146
  - lib/white_gold/dsl/toggle_button.rb
171
147
  - lib/white_gold/dsl/tool_tip.rb
172
148
  - lib/white_gold/dsl/tree_view.rb
@@ -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,7 +0,0 @@
1
- class CommonRenderer
2
- include BangNest
3
-
4
- def initialize widget
5
- @widget = widget
6
- end
7
- 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