beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
190 stars 97 forks source link

Integrate RmlUi #1415

Open p2004a opened 4 months ago

p2004a commented 4 months ago

Main RmlUi integration PR into engine. It is replacing https://github.com/beyond-all-reason/spring/pull/1076 and https://github.com/beyond-all-reason/spring/pull/1304.

To contribute to this work, please open separate PRs with clean git history into https://github.com/beyond-all-reason/spring/tree/rmlui-integration branch.

The branch is rebased on top of the stable BAR engine release version.

We will be periodically making Game Dev facing preview builds, and those are available in BAR launcher as "Engine RmlUi", latest: https://github.com/beyond-all-reason/spring/releases/tag/rmlui-integration-preview-v5

so they can test functionality and API before it fully lands into engine.


This description will be rewritten focusing on the summary of changes when we get close to merging.

blaisemccourtney commented 4 months ago

In case it is of help to anyone, RmlUi's main documentation: https://mikke89.github.io/RmlUiDoc/ .

ChrisFloofyKitsune commented 4 months ago

PR to clean up whitespaces

ChrisFloofyKitsune commented 4 months ago

PR to push forward the "this could be a standalone change" stuff

ChrisFloofyKitsune commented 4 months ago

Note that this needs done:

Implement the RmlUi font interface

https://mikke89.github.io/RmlUiDoc/pages/cpp_manual/interfaces/font_engine.html This will allow the RmlUI library to not link to FreeType as a dependency

blaisemccourtney commented 4 months ago

What does BAR usually use to draw text with? Or does it use its own internal FreeType dependency?

For anyone looking at implenting the RmlUi font interface, there are some samples for implementing a Rml::FontEngineInterface in RmlUi's repository:

RmlUi's default implementation for font handling, including FreeType: https://github.com/mikke89/RmlUi/tree/559d84ab274b8e480d9106f17602d439bf759b0e/Source/Core/FontEngineDefault .

ChrisFloofyKitsune commented 4 months ago

What does BAR usually use to draw text with? Or does it use its own internal FreeType dependency?

... \<snip>

BAR uses it's own FreeType dependency Thank you for the links, I'll probably be needing those later

ChrisFloofyKitsune commented 4 months ago

another batch of clean up changes and a bugfix

p2004a commented 4 months ago

This will allow the RmlUI library to not link to FreeType as a dependency

Engine already links to freetype so that doesn't matter.

blaisemccourtney commented 4 months ago

I wonder, should a click inside one widget "fall through" to a different widget that is visually "beneath" (z-level) and overlapping the first widget? I don't know BAR well, but in many UI systems, a click doesn't "fall through" like that. EDIT: Is this question relevant for BAR? I don't know BAR well enough to answer that.

sprunk commented 4 months ago

that should be for the widget to specify (you could put a panel covering any empty space to absorb clicks)

ChrisFloofyKitsune commented 4 months ago

PR for README + License issues in /Rml/SolLua folder

ChrisFloofyKitsune commented 4 months ago

improvement to \<texture> custom element

https://discord.com/channels/549281623154229250/1228831114143993896/1228950232587305003

ChrisFloofyKitsune commented 4 months ago

another round of fixes

lhog commented 1 month ago

Folks, is this the PR you want to merge to the main line?

p2004a commented 1 month ago

Yes @lhog this is the main RMLUI integration PR worked by @ChrisFloofyKitsune