Closed ogniK5377 closed 2 years ago
why don't you guys just implement chromium for the UI instead of re-implementing everything by hand. isn't it counter-productive? you'd have to keep up with CSS spec changes
@KrakenZ because chromium would bloat (and even slow down) the game probably
why don't you guys just implement chromium for the UI instead of re-implementing everything by hand. isn't it counter-productive? you'd have to keep up with CSS spec changes
There's lots of reasons not to use Chromium. We're not using a web framework because we want to directly interact with the UI elements from code. If we were using a web framework we'd have to wrap all this in a layer of javascript, which would add difficulty and latency. We wouldn't be able to render models on the UI as easily. I've tried it before on s&box and Rust, and it's way less trouble to do it this way.
The issue we're running into doing it this way is that people are expecting 100% compatibility, when really that's not our aim.
@garrynewman
we want to directly interact with the UI elements from code. If we were using a web framework we'd have to wrap all this in a layer of javascript
would you though? chromium is BSD open source.
We wouldn't be able to render models on the UI as easily. I've tried it before on s&box and Rust, and it's way less trouble to do it this way.
What about linking the model renderer to chromium via cpp? is that what has been tried? still too much trouble compared to adding the css features the current way?
The issue we're running into doing it this way is that people are expecting 100% compatibility, when really that's not our aim.
Seems like this is definitely going to be an ever going issue.
I'm just trying to understand things from your experience. I see lots of benefits from being able to use the "web" languages, and would rather not want to mix UI tree (which would normaly be done in HTML) in C# code
@garrynewman
we want to directly interact with the UI elements from code. If we were using a web framework we'd have to wrap all this in a layer of javascript
would you though? chromium is BSD open source.
We wouldn't be able to render models on the UI as easily. I've tried it before on s&box and Rust, and it's way less trouble to do it this way.
What about linking the model renderer to chromium via cpp? is that what has been tried? still too much trouble compared to adding the css features the current way?
The issue we're running into doing it this way is that people are expecting 100% compatibility, when really that's not our aim.
Seems like this is definitely going to be an ever going issue.
I'm just trying to understand things from your experience. I see lots of benefits from being able to use the "web" languages, and would rather not want to mix UI tree (which would normaly be done in HTML) in C# code
Wrapping an entire web engine with javascript and adding a sass compiler on top of that yields its own set of problems whereas a lightweight SCSS parser that styles native panels and elements yield faster results as well as more control.
Regardless of chromiums license, it's a behemoth of something to integrate for something just like UI. Javascript isn't needed, nor is a complete dom, you don't need all sorts of DOM elements & on top of that, it doesn't support SASS natively. Meaning you're going to have to compile SASS into CSS and then use that, it's just adding more and more layers of complexity. The SCSS implementation has a lot of what's needed already, it's just a few things here and there that need to be addressed.
What can't you do? Keyframe animations
How would you like it to work?
What have you tried? N/A
Additional context