Thread: Licence
View Single Post
  #6  
Old 11-14-2013, 04:02 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
If I understand correctly, you want your code to handle different screen sizes, so that you can test your code on with a Lite license and a full license. Furthermore, you only seem to have a problem when the window size changes. So would your problem be solved when the window does not change size (as in a fixed size window, or fullscreen). If so, this code should help you out:
Code:
import viz
import viztask

viz.go(viz.FULLSCREEN)

def getSceenSize():
	yield viztask.waitDraw()
	[WindowWidth, WindowHeight] = viz.window.getSize()
	print WindowWidth
	print WindowHeight

viztask.schedule(getSceenSize)
The code first tries to go fullscreen. With a full license, WindowWidth & WindowHeight should be your screen resolution. With a Lite license, WindowWidth and WindowHeight should be the windowed resolution (standard 800 x 600). Furthermore, this screen does not change in size afterwards. Then, you could create SignSize, SignCentre, and SignRadius based on these values.
Reply With Quote