- Updated theme plugin to support changing themes on runtime

- Added 4 themes
- Added Cache System for States
This commit is contained in:
Robert Jelic
2025-11-05 13:56:19 +01:00
parent e4ee937f0f
commit 71d23ee9a2
11 changed files with 304 additions and 46 deletions

47
themes/classic.json Normal file
View File

@@ -0,0 +1,47 @@
{
"theme": "classic",
"default": {
"background": "black",
"foreground": "lightGray"
},
"BaseFrame": {
"background": "lightGray",
"Container": {
"background": "gray",
"foreground": "white",
"Button" : {
"background" : "black",
"foreground" : "lightGray",
"states": {
"clicked": {
"background": "white",
"foreground": "black"
}
}
},
"Input": {
"background": "black",
"foreground": "lightGray"
}
},
"Button": {
"background": "black",
"foreground": "lightGray",
"states": {
"clicked": {
"background": "white",
"foreground": "black"
}
}
},
"Label": {
"foreground": "black"
},
"names": {
"basaltDebugLog": {
"background": "black",
"foreground": "white"
}
}
}
}

44
themes/dark.json Normal file
View File

@@ -0,0 +1,44 @@
{
"theme": "dark",
"default": {
"background": "white",
"foreground": "black"
},
"BaseFrame": {
"background": "black",
"Container": {
"background": "gray",
"foreground": "white",
"Button": {
"background": "lightGray",
"foreground": "black",
"states": {
"clicked": {
"background": "blue",
"foreground": "white"
}
}
},
"Input": {
"background": "black",
"foreground": "lightGray"
}
},
"Button": {
"background": "gray",
"foreground": "white",
"states": {
"clicked": {
"background": "blue",
"foreground": "white"
}
}
},
"names": {
"basaltDebugLog": {
"background": "red",
"foreground": "white"
}
}
}
}

50
themes/light.json Normal file
View File

@@ -0,0 +1,50 @@
{
"theme": "light",
"default": {
"background": "black",
"foreground": "white"
},
"BaseFrame": {
"background": "lightGray",
"Container": {
"background": "white",
"foreground": "black",
"Button": {
"background": "black",
"foreground": "white",
"states": {
"clicked": {
"background": "lightGray",
"foreground": "black"
}
}
},
"Input": {
"background": "black",
"foreground": "white"
},
"Label": {
"foreground": "black"
}
},
"Button": {
"background": "black",
"foreground": "white",
"states": {
"clicked": {
"background": "white",
"foreground": "black"
}
}
},
"Label": {
"foreground": "black"
},
"names": {
"basaltDebugLog": {
"background": "orange",
"foreground": "white"
}
}
}
}

47
themes/orange.json Normal file
View File

@@ -0,0 +1,47 @@
{
"theme": "orange",
"default": {
"background": "black",
"foreground": "orange"
},
"BaseFrame": {
"background": "white",
"Container": {
"default": {
"background": "black",
"foreground": "orange"
},
"background": "orange",
"foreground": "white",
"Button": {
"background": "black",
"foreground": "orange",
"states": {
"clicked": {
"background": "white",
"foreground": "orange"
}
}
},
"Label": {
"foreground": "black"
}
},
"Button": {
"background": "black",
"foreground": "orange",
"states": {
"clicked": {
"background": "orange",
"foreground": "white"
}
}
},
"names": {
"basaltDebugLog": {
"background": "red",
"foreground": "white"
}
}
}
}