def __init__(self, w, h, fullscreen, title="Unseen"): Renderer3DBase.__init__(self, w, h, fullscreen) PyUnseen.initialize(w, h, gotEvent, messageMap, title ) self.font1 = PyUnseen.createFont( "Arial", 9, 0 ) self.fixedFont = PyUnseen.createFont( "Courier", 7, 0 ) self.populateConstants() # store the actual height and width surface created (might be less than requested) #(getDesktop().width, getDesktop().height) = PyUnseen.getDesktopSize() (w, pyui2.locals.TEXT_HEIGHT) = self.getTextSize(" ") self.images = {} self.cache = {} # tracks all objects by Handle. useful for debugging
def __init__(self, w, h, fullscreen, title): Renderer3DBase.__init__(self, w, h, fullscreen, title) self.frame = 0 self.last = time.time() self.width = w self.height = h self.fontId = 50000 self.fonts = {} self.textures = {} pyui2.locals.K_SHIFT = 304 pyui2.locals.K_CONTROL = 306 pyui2.locals.K_ALT = 308 pyui2.locals.K_PAGEUP = 280 pyui2.locals.K_PAGEDOWN = 281 pyui2.locals.K_END = 279 pyui2.locals.K_HOME = 278 pyui2.locals.K_LEFT = 276 pyui2.locals.K_UP = 273 pyui2.locals.K_RIGHT = 275 pyui2.locals.K_DOWN = 274 pyui2.locals.K_INSERT = 277 pyui2.locals.K_DELETE = 127 pyui2.locals.K_PAD0 = 256 pyui2.locals.K_PAD1 = 257 pyui2.locals.K_PAD2 = 258 pyui2.locals.K_PAD3 = 259 pyui2.locals.K_PAD4 = 260 pyui2.locals.K_PAD5 = 261 pyui2.locals.K_PAD6 = 262 pyui2.locals.K_PAD7 = 263 pyui2.locals.K_PAD8 = 264 pyui2.locals.K_PAD9 = 265 pyui2.locals.K_PADDIVIDE = 267 pyui2.locals.K_PADTIMES = 268 pyui2.locals.K_PADMINUS = 269 pyui2.locals.K_PADPLUS = 270 pyui2.locals.K_PADENTER = 271 pyui2.locals.K_PADDECIMAL= 266 pyui2.locals.K_F1 = 282 pyui2.locals.K_F2 = 283 pyui2.locals.K_F3 = 284 pyui2.locals.K_F4 = 285 pyui2.locals.K_F5 = 286 pyui2.locals.K_F6 = 287 pyui2.locals.K_F7 = 288 pyui2.locals.K_F8 = 289 pyui2.locals.K_F9 = 290 pyui2.locals.K_F10 = 291 pyui2.locals.K_F11 = 292 pyui2.locals.K_F12 = 293 self.keyMap = { 100: pyui2.locals.K_LEFT, 101: pyui2.locals.K_UP, 102: pyui2.locals.K_RIGHT, 103: pyui2.locals.K_DOWN } self.drawBackMethod = self.clear