def main(): glfw.init() glfw.window_hint(glfw.RESIZABLE, False) glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 4) glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 6) w, h = 800, 640 globs.window = glfw.create_window(w, h, 'PlatformPrototype', None, None) x = glfw.make_context_current(globs.window) # initialize libraries init_quadarray() init_textbox(w=2000, h=2000) # dimension of glyph atlas globs.spf = 0.015 # 60ish fps # this stuff gets rendered by the render_loop globs.quadarrays = [] globs.textboxes = [] # launch loops (order matters here) listen.launch(game_loop()) render_init(w, h) load_assets() edit_init() play_init() # the main loop. while not glfw.window_should_close(globs.window): glfw.wait_events_timeout(globs.spf / 10) listen.trigger_timers() glfw.terminate()
def main(): glfw.init() glfw.window_hint(glfw.RESIZABLE, False) glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 4) glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 6) w, h = 800, 800 globs.window = glfw.create_window(w, h, 'Tesseland', None, None) glfw.make_context_current(globs.window) init_polygon_shader() levels_init() globs.spf = 0.015 # 60ish fps listen.launch(game_loop()) render_init(w, h) play_init() hud_init() # the main loop. while not glfw.window_should_close(globs.window): glfw.wait_events_timeout(globs.spf / 10) listen.trigger_timers() glfw.terminate()
for block in self.blocks: dict_str += str(block) dict_str += "}" print "File saved" d_file = open("dictionary.py", "wb") d_file.write(dict_str) def add_block(self, widget=None): """ Adds a block for a single audio file to the window """ _ = widget self.blocks.append( DictionaryAudioBlock(self.vbox, self, len(self.blocks))) def rem_block(self, block_id): """ Removes a block for a single audio file to the window """ # TODO: look-up a better way to do this self.blocks.remove(self.blocks[block_id]) if __name__ == "__main__": # For debugging logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) # init audio methods play.play_init() DictionaryEditorWindow()