import arcade from cld import * # Convert String config value to Bool or Float if possible def desktop_aux_convertValue( value: str ) -> any: # Bool. if ( value == "false" ): return False elif ( value == "true" ): return True # Float. elif ( cld_isdigit(value) ): return float(value) # String. return value # Load texture def desktop_aux_loadTexture( resDir: str, desc: dict[str, str] ): path = resDir + "/" + desc["file"] return arcade.load_texture( path, x = float(desc["x"]), y = float(desc["y"]), width = float(desc["width"]), height = float(desc["height"]) )