Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 00:16
    errorcpp starred mikke89/RmlUi
  • Feb 07 10:49
    industArk starred mikke89/RmlUi
  • Feb 07 08:45
    bayaraa starred mikke89/RmlUi
  • Feb 06 23:39
    mikke89 commented #397
  • Feb 06 22:49

    mikke89 on layout

    [cherry pick] Make (non-explici… Refactor flex and table formatt… Some cleanup and 6 more (compare)

  • Feb 06 20:38
    rygo6 starred mikke89/RmlUi
  • Feb 06 15:00
    alienwu2018 starred mikke89/RmlUi
  • Feb 06 03:54
  • Feb 06 03:54
    mitianshenyu starred mikke89/RmlUi
  • Feb 05 13:00
    MuSmile starred mikke89/RmlUi
  • Feb 05 03:51
    LucidSigma starred mikke89/RmlUi
  • Feb 04 19:09
    Flash-1337 starred mikke89/RmlUi
  • Feb 04 00:52
    cathaysia commented #397
  • Feb 04 00:49
    cathaysia commented #397
  • Feb 04 00:29
    hobyst commented #397
  • Feb 04 00:09

    mikke89 on layout

    WIP Formatting contexts WIP Make separate flex and tabl… Small refactor block container … and 3 more (compare)

  • Feb 03 15:08
    mikke89 commented #409
  • Feb 03 15:05

    mikke89 on build-fix

    (compare)

  • Feb 03 15:04

    mikke89 on master

    Fix compiler warnings (compare)

  • Feb 03 14:52

    mikke89 on build-fix

    Fix compiler warning 2 (compare)

it can work as electron/nwjs replacement
lite version
lite-xl.github.io can benefit from this
Michael R. P. Ragazzon
@mikke89
Yeah, I'd love to see something more lightweight take over from electron. One has to appreciate the irony though if one ends up integrating RmlUi into a wasm application and running it in the browser.
zygon.sisyphus
@zygon.sisyphus:matrix.org
[m]
:)
best part, all can be done with static link
libsdl+rmlui as one runtime
Michael R. P. Ragazzon
@mikke89
Ah, that's very nice.
zygon.sisyphus
@zygon.sisyphus:matrix.org
[m]
probably also with wasm runtime
then all you need is an small wrapper to start
and you have all cross platform
UI + CSS + Logic
zygon.sisyphus
@zygon.sisyphus:matrix.org
[m]
zygon.sisyphus
@zygon.sisyphus:matrix.org
[m]
Michael R. P. Ragazzon
@mikke89
@Foxxey Hey, and welcome! I don't really understand the setup, it looks like you are trying to integrate the library into your own project, but also including the RmlUi samples. I think you should start with just building the samples themselves using CMake, before trying to integrate it. Did you read the building documentation? Let us know if anything there is unclear.
Jack Powell
@jack9267
Is there a Discord server for RmlUi at all?
LWSS
@LWSS
no, discord sucks
Michael R. P. Ragazzon
@mikke89
Yeah, we only use this space for chats.
Foxxey
@Foxxey
aight I have a basic glfw, glad setup which just opens a window. how do i implement RmlUI into it?
i managed to setup all the libraries, I think
Foxxey
@Foxxey
image.png
Michael R. P. Ragazzon
@mikke89
@Foxxey Good job. Next up, you need to implement the system and render interfaces: https://mikke89.github.io/RmlUiDoc/pages/cpp_manual/integrating.html
Jack Powell
@jack9267
image.png
It didn't take me long to make a system/render/file interface for something I'm making for the GTA series. I made a renderware renderer for RmlUi.
Michael R. P. Ragazzon
@mikke89
@jack9267 Good job! That is very cool, so now we can use RML in GTA! :D
Is the renderer open source, if so I'd be happy to link to it from the resources post.
Jack Powell
@jack9267
It isn't open source although I can probably separate it all (when its tidier) https://gtaconnected.com/ is the mod site, I used to use my own GUI system so been trying to merge both together a bit.
Supports gta3/vice city/san andreas/iv
void CRmlRenderInterface::RenderGeometry(Rml::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rml::TextureHandle texture, const Rml::Vector2f& translation)
{
    static RwIm2DVertex rgVertices[4096];
    static RwImVertexIndex rgIndices[4096];

    if (num_vertices > ARRAY_COUNT(rgVertices) || num_indices > ARRAY_COUNT(rgIndices))
        return;

    float fZ = RwIm2DGetNearScreenZ();
    float fRHW = 1.0f / CGTA::GetCurrentRWCamera()->nearPlane;

    for (size_t i = 0; i < num_vertices; i++)
    {
        CVector3D::TransformCoordinate(CVector3D(vertices[i].position.x + translation.x, vertices[i].position.y + translation.y, fZ), m_matTransform, rgVertices[i].vec);
        rgVertices[i].vec.x -= 0.5f;
        rgVertices[i].vec.y -= 0.5f;
        rgVertices[i].rhw = fRHW;
        rgVertices[i].emissiveColor = CARGB(vertices[i].colour.alpha, vertices[i].colour.red, vertices[i].colour.green, vertices[i].colour.blue);
        rgVertices[i].u = vertices[i].tex_coord.x;
        rgVertices[i].v = vertices[i].tex_coord.y;
    }

    for (size_t i = 0; i < num_indices; i++)
    {
        rgIndices[i] = indices[i];
    }

    RwRenderStateSet(rwRENDERSTATEZTESTENABLE, FALSE);
    RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
    Texture* pTexture = (Texture*)texture;
    RwRaster* pRwRaster = nullptr;
    if (pTexture != nullptr)
        pRwRaster = Rw2D.GetRwRaster(pTexture);
    RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, rwFILTERLINEAR);
    RwRenderStateSet(rwRENDERSTATESRCBLEND, rwBLENDSRCALPHA);
    RwRenderStateSet(rwRENDERSTATEDESTBLEND, rwBLENDINVSRCALPHA);
    RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, TRUE);
    RwRenderStateSet(rwRENDERSTATETEXTUREADDRESS, rwTEXTUREADDRESSCLAMP);
    RwRenderStateSet(rwRENDERSTATETEXTURERASTER, (unsigned int)pRwRaster);
    RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, rgVertices, num_vertices, rgIndices, num_indices);
}
Looks like this for example.
Michael R. P. Ragazzon
@mikke89
I'm sure many would be interested if you decide to open source it :) Did you encounter any particular challenges during development?
Jack Powell
@jack9267
Scissor region got be stumped for a while until I thought about the viewport trick.
image.png
All renders just fine all the things that need scissor.
Michael R. P. Ragazzon
@mikke89
There's no built-in scissor API?
Jack Powell
@jack9267
Nope as renderware for gta3/vc is d3d8.
d3d9 adds scissor
Michael R. P. Ragazzon
@mikke89
Ah, that sounds tricky indeed.
Nice work
Jack Powell
@jack9267
image.png
This is still part of LucasGUI (our custom GUI)
thats the windows emoji
For Rml I need each glyph to be an array of colours argb rather than an array of alphas.
Michael R. P. Ragazzon
@mikke89
If you have some more polished screenshots to show later on I'd love to put some in the gallery :)
Jack Powell
@jack9267
Would be good (when this update is out)