easycoder 250107.2__py2.py3-none-any.whl → 250107.4__py2.py3-none-any.whl
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.
Potentially problematic release.
This version of easycoder might be problematic. Click here for more details.
- easycoder/__init__.py +1 -1
- easycoder/ec_graphics.py +30 -0
- easycoder/ec_renderer.py +21 -4
- {easycoder-250107.2.dist-info → easycoder-250107.4.dist-info}/METADATA +1 -1
- {easycoder-250107.2.dist-info → easycoder-250107.4.dist-info}/RECORD +8 -8
- {easycoder-250107.2.dist-info → easycoder-250107.4.dist-info}/LICENSE +0 -0
- {easycoder-250107.2.dist-info → easycoder-250107.4.dist-info}/WHEEL +0 -0
- {easycoder-250107.2.dist-info → easycoder-250107.4.dist-info}/entry_points.txt +0 -0
easycoder/__init__.py
CHANGED
easycoder/ec_graphics.py
CHANGED
|
@@ -228,6 +228,21 @@ class Graphics(Handler):
|
|
|
228
228
|
self.ui = self.renderer.getUI()
|
|
229
229
|
return self.nextPC()
|
|
230
230
|
|
|
231
|
+
# Hide an element
|
|
232
|
+
def k_hide(self, command):
|
|
233
|
+
if self.nextIsSymbol():
|
|
234
|
+
record = self.getSymbolRecord()
|
|
235
|
+
type = record['keyword']
|
|
236
|
+
if self.isGraphicType(type):
|
|
237
|
+
command['target'] = record['id']
|
|
238
|
+
self.add(command)
|
|
239
|
+
return True
|
|
240
|
+
return False
|
|
241
|
+
|
|
242
|
+
def r_hide(self, command):
|
|
243
|
+
self.ui.setVisible(self.getRuntimeValue(command['target']), False)
|
|
244
|
+
return self.nextPC()
|
|
245
|
+
|
|
231
246
|
def k_image(self, command):
|
|
232
247
|
return self.compileVariable(command)
|
|
233
248
|
|
|
@@ -393,6 +408,21 @@ class Graphics(Handler):
|
|
|
393
408
|
self.ui.setAttribute(id, attribute, value)
|
|
394
409
|
return self.nextPC()
|
|
395
410
|
|
|
411
|
+
# Show an element (restore it to its current position)
|
|
412
|
+
def k_show(self, command):
|
|
413
|
+
if self.nextIsSymbol():
|
|
414
|
+
record = self.getSymbolRecord()
|
|
415
|
+
type = record['keyword']
|
|
416
|
+
if self.isGraphicType(type):
|
|
417
|
+
command['target'] = record['id']
|
|
418
|
+
self.add(command)
|
|
419
|
+
return True
|
|
420
|
+
return False
|
|
421
|
+
|
|
422
|
+
def r_show(self, command):
|
|
423
|
+
self.ui.setVisible(self.getRuntimeValue(command['target']), True)
|
|
424
|
+
return self.nextPC()
|
|
425
|
+
|
|
396
426
|
def k_text(self, command):
|
|
397
427
|
return self.compileVariable(command)
|
|
398
428
|
|
easycoder/ec_renderer.py
CHANGED
|
@@ -35,6 +35,7 @@ class Element():
|
|
|
35
35
|
def __init__(self, type, spec):
|
|
36
36
|
self.type = type
|
|
37
37
|
self.spec = spec
|
|
38
|
+
self.visible= True
|
|
38
39
|
self.actionCB = None
|
|
39
40
|
|
|
40
41
|
def getRelativePosition(self):
|
|
@@ -57,10 +58,11 @@ class Element():
|
|
|
57
58
|
return pos
|
|
58
59
|
|
|
59
60
|
def setPos(self, pos):
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
if self.visible:
|
|
62
|
+
# Update the spec
|
|
63
|
+
self.spec.realpos = pos
|
|
64
|
+
# Update the displayed item
|
|
65
|
+
self.spec.item.pos = pos
|
|
64
66
|
|
|
65
67
|
def getSize(self):
|
|
66
68
|
return self.spec.realsize
|
|
@@ -69,6 +71,13 @@ class Element():
|
|
|
69
71
|
self.spec.realsize = size
|
|
70
72
|
self.spec.item.size = size
|
|
71
73
|
|
|
74
|
+
def setVisible(self, vis):
|
|
75
|
+
self.visible = vis
|
|
76
|
+
if vis:
|
|
77
|
+
self.setPos(self.spec.realpos)
|
|
78
|
+
else:
|
|
79
|
+
self.spec.item.pos = (Window.width, self.getPos()[1])
|
|
80
|
+
|
|
72
81
|
def getChildren(self):
|
|
73
82
|
return self.spec.children
|
|
74
83
|
|
|
@@ -142,6 +151,14 @@ class UI(Widget):
|
|
|
142
151
|
self.moveElementBy(id, Vector(pos) - element.getPos())
|
|
143
152
|
return
|
|
144
153
|
|
|
154
|
+
def setVisible(self, id, vis):
|
|
155
|
+
element = self.getElement(id)
|
|
156
|
+
if element != None:
|
|
157
|
+
element.setVisible(vis)
|
|
158
|
+
for id in element.getChildren():
|
|
159
|
+
self.setVisible(id, vis)
|
|
160
|
+
return
|
|
161
|
+
|
|
145
162
|
def on_touch_down(self, touch):
|
|
146
163
|
tp = touch.pos
|
|
147
164
|
x = tp[0]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version: 250107.
|
|
3
|
+
Version: 250107.4
|
|
4
4
|
Summary: Rapid scripting in English
|
|
5
5
|
Keywords: compiler,scripting,prototyping,programming,coding,python,low code,hypertalk,computer language,learn to code
|
|
6
6
|
Author-email: Graham Trott <gtanyware@gmail.com>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
easycoder/README.md,sha256=PYqOc_SkIGiFbyCNs90y7JqoqWe4aO1xYIW-6bOnFKU,573
|
|
2
|
-
easycoder/__init__.py,sha256=
|
|
2
|
+
easycoder/__init__.py,sha256=J-25pqc30KkHPO5UzX5ZTBS1d4NijjSZMeFcPC1An3c,283
|
|
3
3
|
easycoder/ec.py,sha256=Nj5PRl8GsKjfGJKq0FOM1a7FeK3cN68CoIFg8lswQEg,221
|
|
4
4
|
easycoder/ec_classes.py,sha256=xnWBNak8oKydkFoxHLlq9wo3lIsB3aMnTDrqbtCfoWo,1512
|
|
5
5
|
easycoder/ec_compiler.py,sha256=f3zZRtbNsegBuRHTvTLK8BOdnuRq5p_p-1vtJYb-LiY,4800
|
|
6
6
|
easycoder/ec_condition.py,sha256=WSbONo4zs2sX1icOVpscZDFSCAEFmTsquoc2RGcLx_k,763
|
|
7
7
|
easycoder/ec_core.py,sha256=71rSNOwMrO0Ik1hdgTshOYRo2XVD0Br7gUZfCR7A0OA,86291
|
|
8
|
-
easycoder/ec_graphics.py,sha256=
|
|
8
|
+
easycoder/ec_graphics.py,sha256=oSOYp76eXwwlGi3D8pyPJT2JecT8qvzeOewKAuZNqfY,18730
|
|
9
9
|
easycoder/ec_handler.py,sha256=IJvxcrJJSR53d6DS_8H5qPHKhp9y5-GV4WXAjhZxu_o,2250
|
|
10
10
|
easycoder/ec_program.py,sha256=xNhFM6hoRaXx3Nl9Scn9f_qQL5-57WnvNXfwKdHl0rc,9844
|
|
11
|
-
easycoder/ec_renderer.py,sha256=
|
|
11
|
+
easycoder/ec_renderer.py,sha256=ac643-wRsePClMI_l8bjZIgjbNZbR7WQa6zOo5mLwLM,8516
|
|
12
12
|
easycoder/ec_screenspec.py,sha256=qNqhbP16gAi2cRUD3W0dpb8tTC4-N4mE2l6HtOG0vbc,2405
|
|
13
13
|
easycoder/ec_timestamp.py,sha256=_3QFJPzIWZ9Rzk3SQOQJ-gwmvB07pg78k23SPntoZtY,288
|
|
14
14
|
easycoder/ec_value.py,sha256=7yJovn24pPC3jrURSQyEvZ8m826fXiqxsCpSvxwNrfQ,2403
|
|
15
|
-
easycoder-250107.
|
|
16
|
-
easycoder-250107.
|
|
17
|
-
easycoder-250107.
|
|
18
|
-
easycoder-250107.
|
|
19
|
-
easycoder-250107.
|
|
15
|
+
easycoder-250107.4.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
16
|
+
easycoder-250107.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
17
|
+
easycoder-250107.4.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
|
|
18
|
+
easycoder-250107.4.dist-info/METADATA,sha256=fSAK0zcnj-XNADlQ9_hgkgI--stSuWmzlB_SIJK6x7U,5817
|
|
19
|
+
easycoder-250107.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|