Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:02
    cuBeUrg starred mikke89/RmlUi
  • 13:50
    xenogenesi starred mikke89/RmlUi
  • Jan 25 07:59
    smrutil starred mikke89/RmlUi
  • Jan 24 00:28
    totorowldox starred mikke89/RmlUi
  • Jan 23 22:38

    mikke89 on layout

    Add tests for vertical-align an… Fix inline-block alignment Warn on missing font face when … and 1 more (compare)

  • Jan 23 22:15
    uranxo07 starred mikke89/RmlUi
  • Jan 23 14:39
    mikke89 commented #397
  • Jan 23 06:46
    chriscraws starred mikke89/RmlUi
  • Jan 23 05:57
  • Jan 22 23:48

    mikke89 on layout

    Add new inline formatting test Update line box, linked open fr… Allow splitting all open inline… (compare)

  • Jan 22 22:29
    cathaysia commented #397
  • Jan 22 11:37
    SevRyb starred mikke89/RmlUi
  • Jan 22 11:23

    mikke89 on layout

    Some cleanup, fix alignment of … Inline layout cleanup Refactor inline layout (compare)

  • Jan 22 11:21
    mikke89 commented #397
  • Jan 22 11:18
    mikke89 closed #398
  • Jan 21 16:07

    mikke89 on layout

    Fix float spacing Improved inline-block baseline Wrap if there is no available w… and 4 more (compare)

  • Jan 21 04:21
    0suddenly0 starred mikke89/RmlUi
  • Jan 21 04:09
    uncle-lu starred mikke89/RmlUi
  • Jan 21 00:41
    Naatan starred mikke89/RmlUi
Michael R. P. Ragazzon
@mikke89
Yup
zygon.sisyphus
@zygon.sisyphus:matrix.org
[m]
all apps need forms/menu/...
Michael R. P. Ragazzon
@mikke89
I understand now, I thought you always had a full browser to take advantage of.
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