The title is vague, so I’ll explain.
I was frustrated with UI dev (in general), and even more-so when working with a application that needed OpenGL with embedded UI. What if I wanted to make a full application with OpenGL? (Custom game engine anyone?)
Well I did want to. And I’m working on it right now. But it started me onto making what I think is a great idea of a styling language;
I present KSS (pron. Kiss) The multitudes more programmable version of CSS… (only for desktop dev)
BUT
It also has some cool things. I’ve taken the liberty to add variables, templates (style inheritance), hierarchy-selection, events (as objects), native function calls, in-file functions.
But wait, you ask… what If I need to select items from a hierarchy? Surely using element names and id’s couldn’t be robust enough!
Well… there’s an app for that:
The last things to note are event-pointers, how tagging works, ‘this’, and general workflow.
Tagging works (basically) the same as Unity, you say @tagName : tagValue inside a styling field to assign that element a tag that’s referable in the application.
You have the ability to refer to any variable you assign within the styling sheet, from say… source-code. The backend. As such, being able to set a variable to ‘this’ (the element being styled) allows you to operate with buttons who are currently in focus, or set the parent of an item to another element.
All elements are available to use as variables inside and outside the styling sheet, so an event can effectively parent an element or group of elements to a UI you specify. Ill show that in a figure below,
Event pointers are so that you can trigger an event with a UI component, but affect another, below-
Lastly: The results/workflow.
I’m in the process of building my first (serious) game engine after learning OpenGL, and I’m building it with Kotlin and Python. I can bind both Kotlin and Python functions for use inside the styling sheet, and although I didn’t show the layout-language (cause its honestly not good), this is the result after a day of work so far, while using these two UI languages I’ve made
It’s also important to note that while it does adopt the CSS Box-model, it is not a Cascading layout.
That’s all I had to show. Essentially, right now Its a Kotlin -backed creation, but can be made for Java specifically, C++, C#, … Lua? etc. I’m planning on adding more into the language to make it even more robust. What’s more, it doesn’t need to be OpenGL backed- it can use Java paint classes, SFML, … Roblox Studio? etc etc. I just need to standardize the API for it. I guess what I’m wondering is, if I put it out there- would anyone want to use it for desktop application dev?
P.S. Of course the syntax is subject to change, via suggestion.
P.S.[2] The image in the middle of the editor is static, but wont be when I put 3D scenes in the scene-view.
P.S.[3] Sorry everyone, the syntax highlighting is only css rn. so it looks like garbo.
Here’s the GitHub/Wiki for it.