cyberarm_engine 0.24.0 → 0.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 294097836d861784fb91a7545e332296b77edae06130318a067c7d92a92bb0a4
|
4
|
+
data.tar.gz: 6e345593db98b441f6e02b5dd4d1da4b1f6b7df668d0d8deedcf9422ad1d66ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05c353bddf8d57cd9f7dc89c969022c496bde452fff8e732eaa61d0680bfcd6bd88377ecc6d8417d171eff2e999088578e77cad4e0a0a99c9562c1f87c52549f
|
7
|
+
data.tar.gz: b18674b78249fe48a3dc78b23680277125f1662bfbb18eb85182bb5a7fb614deaa5a74c8ebb76439b2728f1f57257a94933db908b8d723146898ab003ca261c2
|
@@ -163,7 +163,7 @@ module CyberarmEngine
|
|
163
163
|
elsif background.is_a?(Range)
|
164
164
|
set([background.begin, background.begin, background.end, background.end])
|
165
165
|
else
|
166
|
-
raise ArgumentError, "background '#{background}' of type '#{background.class}' was not able to be processed"
|
166
|
+
raise ArgumentError, "background '#{background.inspect}' of type '#{background.class}' was not able to be processed"
|
167
167
|
end
|
168
168
|
end
|
169
169
|
end
|
@@ -71,8 +71,19 @@ module CyberarmEngine
|
|
71
71
|
root.gui_state.request_repaint
|
72
72
|
end
|
73
73
|
|
74
|
-
def safe_style_fetch(
|
75
|
-
|
74
|
+
def safe_style_fetch(key, fallback_key = nil)
|
75
|
+
# Attempt to return value for requested key
|
76
|
+
v = @style.hash.dig(@style_event, key)
|
77
|
+
return v if v
|
78
|
+
|
79
|
+
# Attempt to return overriding value
|
80
|
+
if fallback_key
|
81
|
+
v = @style.hash.dig(@style_event, fallback_key)
|
82
|
+
return v if v
|
83
|
+
end
|
84
|
+
|
85
|
+
# Fallback to default style
|
86
|
+
@style.hash.dig(:default, key) || default(key)
|
76
87
|
end
|
77
88
|
|
78
89
|
def set_static_position
|
@@ -104,10 +115,10 @@ module CyberarmEngine
|
|
104
115
|
|
105
116
|
@style.background_nine_slice_from_edge = safe_style_fetch(:background_nine_slice_from_edge)
|
106
117
|
|
107
|
-
@style.background_nine_slice_left = safe_style_fetch(:background_nine_slice_left
|
108
|
-
@style.background_nine_slice_top = safe_style_fetch(:background_nine_slice_top
|
109
|
-
@style.background_nine_slice_right = safe_style_fetch(:background_nine_slice_right
|
110
|
-
@style.background_nine_slice_bottom = safe_style_fetch(:background_nine_slice_bottom
|
118
|
+
@style.background_nine_slice_left = safe_style_fetch(:background_nine_slice_left, :background_nine_slice_from_edge)
|
119
|
+
@style.background_nine_slice_top = safe_style_fetch(:background_nine_slice_top, :background_nine_slice_from_edge)
|
120
|
+
@style.background_nine_slice_right = safe_style_fetch(:background_nine_slice_right, :background_nine_slice_from_edge)
|
121
|
+
@style.background_nine_slice_bottom = safe_style_fetch(:background_nine_slice_bottom, :background_nine_slice_from_edge)
|
111
122
|
end
|
112
123
|
|
113
124
|
def set_background_image
|
@@ -121,19 +132,19 @@ module CyberarmEngine
|
|
121
132
|
def set_border_thickness
|
122
133
|
@style.border_thickness = safe_style_fetch(:border_thickness)
|
123
134
|
|
124
|
-
@style.border_thickness_left = safe_style_fetch(:border_thickness_left
|
125
|
-
@style.border_thickness_right = safe_style_fetch(:border_thickness_right
|
126
|
-
@style.border_thickness_top = safe_style_fetch(:border_thickness_top
|
127
|
-
@style.border_thickness_bottom = safe_style_fetch(:border_thickness_bottom
|
135
|
+
@style.border_thickness_left = safe_style_fetch(:border_thickness_left, :border_thickness)
|
136
|
+
@style.border_thickness_right = safe_style_fetch(:border_thickness_right, :border_thickness)
|
137
|
+
@style.border_thickness_top = safe_style_fetch(:border_thickness_top, :border_thickness)
|
138
|
+
@style.border_thickness_bottom = safe_style_fetch(:border_thickness_bottom, :border_thickness)
|
128
139
|
end
|
129
140
|
|
130
141
|
def set_border_color
|
131
142
|
@style.border_color = safe_style_fetch(:border_color)
|
132
143
|
|
133
|
-
@style.border_color_left = safe_style_fetch(:border_color_left
|
134
|
-
@style.border_color_right = safe_style_fetch(:border_color_right
|
135
|
-
@style.border_color_top = safe_style_fetch(:border_color_top
|
136
|
-
@style.border_color_bottom = safe_style_fetch(:border_color_bottom
|
144
|
+
@style.border_color_left = safe_style_fetch(:border_color_left, :border_color)
|
145
|
+
@style.border_color_right = safe_style_fetch(:border_color_right, :border_color)
|
146
|
+
@style.border_color_top = safe_style_fetch(:border_color_top, :border_color)
|
147
|
+
@style.border_color_bottom = safe_style_fetch(:border_color_bottom, :border_color)
|
137
148
|
|
138
149
|
@style.border_canvas.color = [
|
139
150
|
@style.border_color_top,
|
@@ -146,19 +157,19 @@ module CyberarmEngine
|
|
146
157
|
def set_padding
|
147
158
|
@style.padding = safe_style_fetch(:padding)
|
148
159
|
|
149
|
-
@style.padding_left = safe_style_fetch(:padding_left
|
150
|
-
@style.padding_right = safe_style_fetch(:padding_right
|
151
|
-
@style.padding_top = safe_style_fetch(:padding_top
|
152
|
-
@style.padding_bottom = safe_style_fetch(:padding_bottom
|
160
|
+
@style.padding_left = safe_style_fetch(:padding_left, :padding)
|
161
|
+
@style.padding_right = safe_style_fetch(:padding_right, :padding)
|
162
|
+
@style.padding_top = safe_style_fetch(:padding_top, :padding)
|
163
|
+
@style.padding_bottom = safe_style_fetch(:padding_bottom, :padding)
|
153
164
|
end
|
154
165
|
|
155
166
|
def set_margin
|
156
167
|
@style.margin = safe_style_fetch(:margin)
|
157
168
|
|
158
|
-
@style.margin_left = safe_style_fetch(:margin_left
|
159
|
-
@style.margin_right = safe_style_fetch(:margin_right
|
160
|
-
@style.margin_top = safe_style_fetch(:margin_top
|
161
|
-
@style.margin_bottom = safe_style_fetch(:margin_bottom
|
169
|
+
@style.margin_left = safe_style_fetch(:margin_left, :margin)
|
170
|
+
@style.margin_right = safe_style_fetch(:margin_right, :margin)
|
171
|
+
@style.margin_top = safe_style_fetch(:margin_top, :margin)
|
172
|
+
@style.margin_bottom = safe_style_fetch(:margin_bottom, :margin)
|
162
173
|
end
|
163
174
|
|
164
175
|
def update_styles(event = :default)
|
@@ -236,6 +236,11 @@ module CyberarmEngine
|
|
236
236
|
self.scroll_top = -@scroll_position.y
|
237
237
|
@scroll_target_position.y = @scroll_position.y
|
238
238
|
|
239
|
+
# Fixes resized container that is scrolled down from being stuck overscrolled when resized
|
240
|
+
if scroll_height < height
|
241
|
+
@scroll_target_position.y = 0
|
242
|
+
end
|
243
|
+
|
239
244
|
# NOTE: Experiment for removing need to explicitly call gui_state#recalculate at least 3 times for layout to layout...
|
240
245
|
if old_width != @width || old_height != @height
|
241
246
|
if @parent
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyberarm_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyberarm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
|
-
rubygems_version: 3.
|
212
|
+
rubygems_version: 3.5.3
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: Make games quickly and easily with gosu
|