Skip to content

Commit 716400c

Browse files
Refactor scene editor utilities and factory functions
1 parent d3a9fd8 commit 716400c

5 files changed

Lines changed: 713 additions & 689 deletions

File tree

src/main/kotlin/no/njoh/pulseengine/widgets/editor/EditorStyle.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ class EditorStyle
1111
fun getColor(name: String) = colors[name] ?: DEFAULT_COLOR
1212
fun getFont(name: String = "") = fonts[name] ?: Font.DEFAULT
1313

14+
init // Set default colors
15+
{
16+
colors["LABEL"] = Color(1.0f, 1.0f, 1.0f, 1.0f)
17+
colors["BG_LIGHT"] = Color(0.036326528f, 0.048244897f, 0.057142854f, 0.80784315f)
18+
colors["BG_DARK"] = Color(0.024897957f, 0.026741894f, 0.028571427f, 0.9490196f)
19+
colors["STROKE"] = Color(0.03612247f, 0.038525835f, 0.04285717f, 1.0f)
20+
colors["HEADER"] = Color(0.08892856f, 0.11766804f, 0.14999998f, 0.9490196f)
21+
colors["HEADER_HOVER"] = Color(0.09918367f, 0.17537574f, 0.25714284f, 1.0f)
22+
colors["BUTTON"] = Color(0.033418354f, 0.03418366f, 0.03571427f, 1.0f)
23+
colors["BUTTON_HOVER"] = Color(0.047058824f, 0.050980393f, 0.050980393f, 1.0f)
24+
colors["BUTTON_EXIT"] = Color(0.7642857f, 0.3603061f, 0.3603061f, 0.69803923f)
25+
colors["ITEM"] = Color(0.048367348f, 0.06711405f, 0.08571428f, 1.0f)
26+
colors["ITEM_HOVER"] = Color(0.10275511f, 0.11865307f, 0.13571429f, 1.0f)
27+
}
28+
1429
companion object
1530
{
1631
private var DEFAULT_COLOR = Color(1f, 1f, 1f)

0 commit comments

Comments
 (0)