Update two examples
they work on my machine, really!
This commit is contained in:
parent
1f4da24498
commit
be1c7dc0dc
2 changed files with 13 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ import time
|
|||
import toolboxevent
|
||||
import uctypes
|
||||
import windowmgr
|
||||
|
||||
import machine
|
||||
|
||||
# Globals
|
||||
kNumLines = 50 # Try 100 or 150!
|
||||
|
|
@ -58,6 +58,7 @@ def WindowInit():
|
|||
"""
|
||||
global gOldMBarHeight
|
||||
|
||||
machine.HideConsole()
|
||||
gOldMBarHeight = menumgr.LMGetMBarHeight()
|
||||
newMBarHeight = menumgr.LMGetMBarHeight()
|
||||
newMBarHeight[1] = 0
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
# m68k-micropython window creation demo
|
||||
|
||||
import deskmgr
|
||||
import eventmgr
|
||||
import mactypes
|
||||
import qd
|
||||
import toolboxevent
|
||||
import uctypes
|
||||
import windowmgr
|
||||
import random
|
||||
import machine
|
||||
|
||||
scrn = qd.qdGlobals().screenBits
|
||||
|
||||
machine.HideConsole()
|
||||
|
||||
def pstr(s):
|
||||
b = mactypes.Str255()
|
||||
|
|
@ -23,7 +27,7 @@ ev = eventmgr.EventRecord()
|
|||
NIL_WINDOW = uctypes.struct(0, qd.GrafPtr)
|
||||
ABOVE_ALL_WINDOWS = uctypes.struct(-1, qd.GrafPtr)
|
||||
|
||||
title = pstr("Hello World 11")
|
||||
title = pstr("Region test")
|
||||
r = mactypes.Rect()
|
||||
r[:] = scrn.bounds
|
||||
r.top += 80
|
||||
|
|
@ -52,4 +56,9 @@ qd.FillRgn(barbell, g.black)
|
|||
|
||||
qd.DisposeRgn(barbell)
|
||||
|
||||
input("hit enter to exit")
|
||||
qd.MoveTo(24, 65)
|
||||
qd.DrawString(pstr("Click Mouse to Exit"))
|
||||
|
||||
|
||||
while not toolboxevent.Button():
|
||||
deskmgr.SystemTask() # scott added - slows it down on fast machines
|
||||
|
|
|
|||
Loading…
Reference in a new issue