atome 0.5.6.8.6 → 0.5.6.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/atome/genesis/particles/utility.rb +1 -1
- data/lib/atome/version.rb +1 -1
- data/lib/molecules/intuition/utillities.rb +12 -19
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bb8391acf611cd0f36e1d82282bb76554b558d54d9014a6bf3cf584f39b0b76
|
4
|
+
data.tar.gz: 0c92e8b67c476a8ff80e25da5254d7a237b4a7c94437f5bf649a34033a836041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e81f72d62647d4bd8d008c0fb9cb0e95efcc8e600652bf73195314e5f745870261faf1465d0c194e95ccd8b22500de953485a850023481c72450fb7ebc062739
|
7
|
+
data.tar.gz: 3c61e4f0a6ae722b07b980766586e6e338d1cfac8f788afa46b70cf8ac07d649a8f5957ff96c223bce3e7e66e821d79047899a5c8d33bd9662442b811e492172
|
data/lib/atome/version.rb
CHANGED
@@ -23,7 +23,7 @@ new(molecule: :input) do |params, bloc|
|
|
23
23
|
attach_to = params[:attach] || default_parent
|
24
24
|
renderer_found = grab(attach_to).renderers
|
25
25
|
input_back = Atome.new(
|
26
|
-
{ renderers: renderer_found,id: new_id, type: :shape, color: back_col,
|
26
|
+
{ renderers: renderer_found, id: new_id, type: :shape, color: back_col,
|
27
27
|
left: 0, top: 0, data: '', attach: attach_to,
|
28
28
|
smooth: 6, overflow: :hidden,
|
29
29
|
})
|
@@ -41,12 +41,11 @@ new(molecule: :input) do |params, bloc|
|
|
41
41
|
end
|
42
42
|
|
43
43
|
input_back.touch(:up) do
|
44
|
-
if
|
44
|
+
if input_back.tick[:input] == 1
|
45
45
|
text_input.component({ selected: true })
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
|
50
49
|
text_input.keyboard(:down) do |native_event|
|
51
50
|
# text_input.component({ selected: { color: :red, text: :red } })
|
52
51
|
|
@@ -118,7 +117,7 @@ new(molecule: :list) do |params, _bloc|
|
|
118
117
|
end
|
119
118
|
attach_to = params[:attach] || default_parent
|
120
119
|
renderer_found = grab(attach_to).renderers
|
121
|
-
list = Atome.new({ renderers: renderer_found,id: new_id, type: :shape,
|
120
|
+
list = Atome.new({ renderers: renderer_found, id: new_id, type: :shape, color: { alpha: 0 }, attach: attach_to }.merge(params))
|
122
121
|
# Atome.new(
|
123
122
|
# { renderers: [:html], type: :shape, attach: :view, color: back_col,
|
124
123
|
# left: 0, top: 0, data: '', attach: attach_to,
|
@@ -147,7 +146,7 @@ new({ molecule: :slider }) do |params, bloc|
|
|
147
146
|
new_id = params.delete(:id) || identity_generator
|
148
147
|
|
149
148
|
default_smooth = 9
|
150
|
-
default_slider_particles = {id: new_id, color: color_found, width: 333, height: 33, left: 0, top: 0, smooth: default_smooth }
|
149
|
+
default_slider_particles = { id: new_id, color: color_found, width: 333, height: 33, left: 0, top: 0, smooth: default_smooth }
|
151
150
|
default_cursor_particles = { color: color_found, width: 29, height: 29, left: 0, smooth: '100%' }
|
152
151
|
cursor_found = params.delete(:cursor)
|
153
152
|
slider_particle = default_slider_particles.merge(params)
|
@@ -186,7 +185,7 @@ new({ molecule: :slider }) do |params, bloc|
|
|
186
185
|
end
|
187
186
|
cursor_top_initial = ((max_value - new_value).to_f / (max_value - min_value)) * (slider_particle[:height] - cursor_particle[:height])
|
188
187
|
bloc.call(new_value)
|
189
|
-
slider.instance_variable_set('@value',new_value)
|
188
|
+
slider.instance_variable_set('@value', new_value)
|
190
189
|
cursor.top(cursor_top_initial)
|
191
190
|
cursor.left(cursor_left)
|
192
191
|
range.height((slider.height - cursor.top) - cursor.height / 2)
|
@@ -200,7 +199,7 @@ new({ molecule: :slider }) do |params, bloc|
|
|
200
199
|
end
|
201
200
|
cursor_left_initial = ((new_value - min_value).to_f / (max_value - min_value)) * (slider_particle[:width] - cursor_particle[:width])
|
202
201
|
bloc.call(new_value)
|
203
|
-
slider.instance_variable_set('@value',new_value)
|
202
|
+
slider.instance_variable_set('@value', new_value)
|
204
203
|
cursor.left(cursor_left_initial)
|
205
204
|
cursor.top(cursor_top)
|
206
205
|
range.width(cursor.left + cursor.width / 2)
|
@@ -239,7 +238,7 @@ new({ molecule: :slider }) do |params, bloc|
|
|
239
238
|
value = update_value.call(cursor.top, cursor_particle[:height], slider_particle[:height], orientation)
|
240
239
|
range.height((slider.height - cursor.top) - cursor.height / 2)
|
241
240
|
bloc.call(value)
|
242
|
-
slider.instance_variable_set('@value',value)
|
241
|
+
slider.instance_variable_set('@value', value)
|
243
242
|
end
|
244
243
|
|
245
244
|
else
|
@@ -263,7 +262,7 @@ new({ molecule: :slider }) do |params, bloc|
|
|
263
262
|
value = update_value.call(cursor.left, cursor_particle[:width], slider_particle[:width], orientation)
|
264
263
|
range.width(cursor.left + cursor.width / 2)
|
265
264
|
bloc.call(value)
|
266
|
-
slider.instance_variable_set('@value',value)
|
265
|
+
slider.instance_variable_set('@value', value)
|
267
266
|
end
|
268
267
|
end
|
269
268
|
cursor.touch(:double) do
|
@@ -282,10 +281,9 @@ end
|
|
282
281
|
new(molecule: :button) do |params, bloc|
|
283
282
|
params[:height] ||= 25
|
284
283
|
params[:width] ||= 25
|
285
|
-
states=params.delete(:states) || 1
|
284
|
+
states = params.delete(:states) || 1
|
286
285
|
new_id = params.delete(:id) || identity_generator
|
287
286
|
|
288
|
-
|
289
287
|
back_col = params.delete(:back)
|
290
288
|
back_col ||= :grey
|
291
289
|
|
@@ -297,25 +295,20 @@ new(molecule: :button) do |params, bloc|
|
|
297
295
|
attach_to = params[:attach] || default_parent
|
298
296
|
renderer_found = grab(attach_to).renderers
|
299
297
|
button = box(
|
300
|
-
{ renderers: renderer_found,id: new_id, type: :shape, color: back_col,
|
298
|
+
{ renderers: renderer_found, id: new_id, type: :shape, color: back_col,
|
301
299
|
left: 0, top: 0, data: '', attach: attach_to,
|
302
300
|
smooth: 3, overflow: :hidden,
|
303
301
|
})
|
304
302
|
|
305
|
-
|
306
|
-
|
307
303
|
button.touch(:down) do
|
308
304
|
button.tick(:button)
|
309
|
-
bloc.call(button.tick[:button]%states)
|
310
|
-
end
|
311
|
-
|
305
|
+
bloc.call((button.tick[:button]-1) % states)
|
312
306
|
|
307
|
+
end
|
313
308
|
|
314
309
|
params.each do |part_f, val_f|
|
315
310
|
button.send(part_f, val_f)
|
316
311
|
end
|
317
|
-
button.left(55)
|
318
|
-
|
319
312
|
|
320
313
|
button
|
321
314
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.6.8.
|
4
|
+
version: 0.5.6.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Eric Godard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: artoo
|