from cfg_aux import * from cld import * from desktop_aux import * from desktop_Platform import * # Pass config init key-value pairs to context controller # # Conditions: # 1. Config tree has just been parsed def desktop_applyConfigInit(p): if ( p.c.recentField != "cfgTree" ): return for key in p.c.cfgTree["init"]: val = p.c.cfgTree["init"][key] value = desktop_aux_convertValue(val) p.ctrl.set(key, value) # Load textures # # Conditions: # 1. Config tree has just been parsed def desktop_loadConfigTextures(p): if ( p.c.recentField != "cfgTree" ): return for key in p.c.cfgTree: if ( cld_startswith(key, "texture ") ): name = cfg_aux_textureName(key) tex = desktop_aux_loadTexture(p.c.cfgDir, p.c.cfgTree[key]) p.textures[name] = tex