|
|
@@ -1,5 +1,6 @@ |
|
|
|
import arcade |
|
|
|
from cld import * |
|
|
|
from desktop_Platform import * |
|
|
|
|
|
|
|
# Convert String config value to Bool or Float if possible |
|
|
|
def desktop_aux_convertValue( |
|
|
@@ -22,7 +23,23 @@ def desktop_aux_convertValue( |
|
|
|
# String. |
|
|
|
return value |
|
|
|
|
|
|
|
# Load texture |
|
|
|
def desktop_aux_createStaticSprite( |
|
|
|
p: desktop_Platform, |
|
|
|
name: str, |
|
|
|
desc: dict[str, str] |
|
|
|
): |
|
|
|
sp = arcade.Sprite() |
|
|
|
sp.guid = name |
|
|
|
texName = desc["texture"] |
|
|
|
sp.texture = p.textures[texName] |
|
|
|
# Position. |
|
|
|
sp.left = float(desc["left"]) |
|
|
|
sp.top = float(desc["top"]) |
|
|
|
# Visibility. |
|
|
|
sp.visible = True if desc["visible"] == "true" else False |
|
|
|
|
|
|
|
return sp |
|
|
|
|
|
|
|
def desktop_aux_loadTexture( |
|
|
|
resDir: str, |
|
|
|
desc: dict[str, str] |
|
|
|