momorprods
Aug 16, 2015 - 21:13
Greetings,
I have a critical issue with the SceneView on the newest beta. Here is a test script, it crashes Pythonista upon running. Is there something I'm missing ?
# coding: utf-8
import ui
from scene import *
import console
class TestScene (Scene):
def draw(self):
# display hint --------
tint(1,1,1)
background(1, 1, 1)
fill(1, 0, 0)
for touch in self.touches.values():
ellipse(touch.location.x - 25, touch.location.y-25,50,50)
class TestView (ui.View):
def __init__(self, width=1024, height=1024):
self.bg_color = 'white'
w, h = ui.get_screen_size()
canvas_size = max(w, h)
sv = TestView(canvas_size, canvas_size)
sv.name = 'Test'
sv.present('fullscreen')
adv2 = SceneView()
adv2.scene = TestScene()
adv2.paused=False
adv2.bounds = sv.bounds
Thanks for any help on this issue.