atome 0.5.6.8.3 → 0.5.6.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/atome/atome.rb +1 -0
- data/lib/atome/genesis/particles/utility.rb +7 -0
- data/lib/atome/kernel/universe.rb +7 -7
- data/lib/atome/version.rb +1 -1
- data/lib/molecules/intuition/utillities.rb +56 -4
- data/vendor/assets/application/examples/input.rb +1 -2
- data/vendor/assets/application/examples/tick.rb +29 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc11996c8508fa65ea2a2401926454c5486140404ef425fdd7b74225358a8e75
|
4
|
+
data.tar.gz: ac2a247d50790d1ea6d72acdbb180d8108db50b2338a367494f9b085c5a9c4f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fce46bde01f078febc6818ec8b294763c957531715c2c22100e32a8f23fcd5e524d03d9e4e05d6ecd239c0c70c14b65275f7753a4d5e86d8a4f8ab37e56efd0
|
7
|
+
data.tar.gz: b1d15a32434a85c3966316767d0bcd098d71f919878ce2d84f86af8370efe09192cd55a259ab88393f386412645fb211ac1d1d8267f7f73b8a61176709fa2695
|
data/lib/atome/atome.rb
CHANGED
@@ -32,13 +32,13 @@ class Universe
|
|
32
32
|
@messages
|
33
33
|
end
|
34
34
|
|
35
|
-
def eVe(val = nil)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
end
|
35
|
+
# def eVe(val = nil)
|
36
|
+
# if val
|
37
|
+
# @eve = val
|
38
|
+
# else
|
39
|
+
# @eve
|
40
|
+
# end
|
41
|
+
# end
|
42
42
|
|
43
43
|
def store_messages(new_msg)
|
44
44
|
@messages[new_msg[:msg_nb]] = new_msg[:proc]
|
data/lib/atome/version.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
new(molecule: :input) do |params, bloc|
|
4
4
|
params[:height] ||= 15
|
5
5
|
params[:width] ||= 222
|
6
|
+
new_id = params.delete(:id) || identity_generator
|
7
|
+
|
6
8
|
trigger = params.delete(:trigger)
|
7
9
|
trigger ||= :return
|
8
10
|
limit = params.delete(:limit)
|
@@ -21,7 +23,7 @@ new(molecule: :input) do |params, bloc|
|
|
21
23
|
attach_to = params[:attach] || default_parent
|
22
24
|
renderer_found = grab(attach_to).renderers
|
23
25
|
input_back = Atome.new(
|
24
|
-
{ renderers: renderer_found, type: :shape, color: back_col,
|
26
|
+
{ renderers: renderer_found,id: new_id, type: :shape, color: back_col,
|
25
27
|
left: 0, top: 0, data: '', attach: attach_to,
|
26
28
|
smooth: 6, overflow: :hidden,
|
27
29
|
})
|
@@ -34,9 +36,17 @@ new(molecule: :input) do |params, bloc|
|
|
34
36
|
)
|
35
37
|
|
36
38
|
text_input.touch(:down) do
|
39
|
+
tick(:input)
|
37
40
|
text_input.edit(true)
|
38
41
|
end
|
39
42
|
|
43
|
+
input_back.touch(:up) do
|
44
|
+
if tick[:input] == 1
|
45
|
+
text_input.component({ selected: true })
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
|
40
50
|
text_input.keyboard(:down) do |native_event|
|
41
51
|
# text_input.component({ selected: { color: :red, text: :red } })
|
42
52
|
|
@@ -75,6 +85,7 @@ new(molecule: :list) do |params, _bloc|
|
|
75
85
|
styles_found = params.delete(:styles)
|
76
86
|
element = params.delete(:element)
|
77
87
|
listing = params.delete(:listing)
|
88
|
+
new_id = params.delete(:id) || identity_generator
|
78
89
|
|
79
90
|
styles_found ||= {
|
80
91
|
width: 99,
|
@@ -107,7 +118,7 @@ new(molecule: :list) do |params, _bloc|
|
|
107
118
|
end
|
108
119
|
attach_to = params[:attach] || default_parent
|
109
120
|
renderer_found = grab(attach_to).renderers
|
110
|
-
list = Atome.new({ renderers: renderer_found, type: :shape, color: { alpha: 0 }, attach: attach_to }.merge(params))
|
121
|
+
list = Atome.new({ renderers: renderer_found,id: new_id, type: :shape, color: { alpha: 0 }, attach: attach_to }.merge(params))
|
111
122
|
# Atome.new(
|
112
123
|
# { renderers: [:html], type: :shape, attach: :view, color: back_col,
|
113
124
|
# left: 0, top: 0, data: '', attach: attach_to,
|
@@ -133,8 +144,10 @@ new({ molecule: :slider }) do |params, bloc|
|
|
133
144
|
min_value = params.delete(:min) || 0
|
134
145
|
max_value = params.delete(:max) || 100
|
135
146
|
color_found = params[:color] ||= :gray
|
147
|
+
new_id = params.delete(:id) || identity_generator
|
148
|
+
|
136
149
|
default_smooth = 9
|
137
|
-
default_slider_particles = { color: color_found, width: 333, height: 33, left: 0, top: 0, smooth: default_smooth }
|
150
|
+
default_slider_particles = {id: new_id, color: color_found, width: 333, height: 33, left: 0, top: 0, smooth: default_smooth }
|
138
151
|
default_cursor_particles = { color: color_found, width: 29, height: 29, left: 0, smooth: '100%' }
|
139
152
|
cursor_found = params.delete(:cursor)
|
140
153
|
slider_particle = default_slider_particles.merge(params)
|
@@ -266,4 +279,43 @@ new({ molecule: :slider }) do |params, bloc|
|
|
266
279
|
slider
|
267
280
|
|
268
281
|
end
|
269
|
-
new(
|
282
|
+
new(molecule: :button) do |params, bloc|
|
283
|
+
params[:height] ||= 25
|
284
|
+
params[:width] ||= 25
|
285
|
+
states=params.delete(:states) || 1
|
286
|
+
new_id = params.delete(:id) || identity_generator
|
287
|
+
|
288
|
+
|
289
|
+
back_col = params.delete(:back)
|
290
|
+
back_col ||= :grey
|
291
|
+
|
292
|
+
default_parent = if self.instance_of?(Atome)
|
293
|
+
id
|
294
|
+
else
|
295
|
+
:view
|
296
|
+
end
|
297
|
+
attach_to = params[:attach] || default_parent
|
298
|
+
renderer_found = grab(attach_to).renderers
|
299
|
+
button = box(
|
300
|
+
{ renderers: renderer_found,id: new_id, type: :shape, color: back_col,
|
301
|
+
left: 0, top: 0, data: '', attach: attach_to,
|
302
|
+
smooth: 3, overflow: :hidden,
|
303
|
+
})
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
button.touch(:down) do
|
308
|
+
tick(:button)
|
309
|
+
bloc.call(tick[:button]%states)
|
310
|
+
end
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
params.each do |part_f, val_f|
|
315
|
+
button.send(part_f, val_f)
|
316
|
+
end
|
317
|
+
button.left(55)
|
318
|
+
|
319
|
+
|
320
|
+
button
|
321
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# tick allow you to automatise any action counting
|
4
|
+
# it can be added into any new created particle ex: here a dummy
|
5
|
+
|
6
|
+
new({ particle: :dummy }) do |_p|
|
7
|
+
tick(:dummy )
|
8
|
+
end
|
9
|
+
|
10
|
+
new({ particle: :dummy2 }) do |_p|
|
11
|
+
tick(:dummy2 )
|
12
|
+
end
|
13
|
+
|
14
|
+
a=box
|
15
|
+
a.dummy(:hi)
|
16
|
+
|
17
|
+
puts a.tick[:dummy]
|
18
|
+
a.dummy(:ho)
|
19
|
+
puts a.tick[:dummy]
|
20
|
+
|
21
|
+
a.dummy2(:ho)
|
22
|
+
puts a.tick[:dummy2]
|
23
|
+
|
24
|
+
c=circle({left: 99})
|
25
|
+
|
26
|
+
c.touch(true) do
|
27
|
+
c.tick(:my_counter)
|
28
|
+
puts c.tick[:my_counter]
|
29
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Eric Godard
|
@@ -637,6 +637,7 @@ files:
|
|
637
637
|
- vendor/assets/application/examples/terminal.rb
|
638
638
|
- vendor/assets/application/examples/test.rb
|
639
639
|
- vendor/assets/application/examples/text.rb
|
640
|
+
- vendor/assets/application/examples/tick.rb
|
640
641
|
- vendor/assets/application/examples/tools.rb
|
641
642
|
- vendor/assets/application/examples/touch.rb
|
642
643
|
- vendor/assets/application/examples/type_mutation.rb
|