Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 27 21:31
    NBurley93 starred mikke89/RmlUi
  • Jan 27 12:00

    mikke89 on master

    Update SDL RenderGeometry sampl… (compare)

  • Jan 26 22:12
    mikke89 closed #266
  • Jan 26 06:01
    xm88628 starred mikke89/RmlUi
  • Jan 25 22:09
    jack9267 commented #267
  • Jan 25 22:05
    mikke89 commented #267
  • Jan 25 21:53
    thiago-elias starred mikke89/RmlUi
  • Jan 25 21:12

    mikke89 on color_emoji

    (compare)

  • Jan 25 21:11

    mikke89 on master

    Update demo Font support for color emojis a… Make font effects compatible wi… and 2 more (compare)

  • Jan 25 14:47
  • Jan 25 14:47
    ajunlonglive starred mikke89/RmlUi
  • Jan 25 05:35
    simons-public starred mikke89/RmlUi
  • Jan 24 23:58

    mikke89 on color_emoji

    Update demo Font support for color emojis a… Make font effects compatible wi… and 1 more (compare)

  • Jan 23 22:50

    mikke89 on color_emoji

    Don't load default glyphs for f… Add missing include Update shell (compare)

  • Jan 23 22:25

    mikke89 on color_emoji

    Support grayscale bitmap resizi… Let metrics be affected by bitm… (compare)

  • Jan 23 16:58

    mikke89 on color_emoji

    Initial work on color emoji sup… Update demo Minor improvement and 8 more (compare)

  • Jan 22 19:35
    halitsever starred mikke89/RmlUi
  • Jan 21 11:33
    HLT starred mikke89/RmlUi
  • Jan 21 08:33
    Rodhin starred mikke89/RmlUi
  • Jan 21 07:01
    martonp96 commented #269
Michael R. P. Ragazzon
@mikke89
@barotto Yeah, I don't know why that is done. The whole path handling could need some improvements, see this issue here: mikke89/RmlUi#161
I'm also a bit afraid of changing it, because it will for sure break things for someone. And there are plenty of workarounds.
Marco Bortolin
@barotto
Thanks for the pointer. I can see why you're reluctant to touch the whole path handling system, that would certainly be a can of worms... For now I'll fix this issue adding an extra '/'.
Michael R. P. Ragazzon
@mikke89
Appreciate your understanding :)
Marco Bortolin
@barotto
What is the proper way to close/unload documents? Do I need to remove every event listener attached to any child element first?
Michael R. P. Ragazzon
@mikke89
Event listeners and everything is automatically removed, so there is no need to do that. However, note that documents aren't actually destroyed until the next call to Context::Update so be careful with lifetime issues this could cause in your code.
Marco Bortolin
@barotto
yes, in fact I have a problem with the lifetime of event listeners, where if i Close() a document and then delete an associated listener, i get a segfault when calling Rml::Shutdown(), unless i remove the listener from the document before deleting it. I was wandering if there exist a RemoveAllListeners or equivalent, or if I need to keep track of every listener added to every child element of a document.
Michael R. P. Ragazzon
@mikke89
Yeah, this issue has been discussed before. The easiest way really is to call Context::Update after Close. Then, it should be safe to delete your listener objects.
Marco Bortolin
@barotto
ok, thanks
wh1t3lord
@wh1t3lord

Hello guys. I hope we can implement this feature https://www.w3.org/TR/css-flexbox-1/

:))

Michael R. P. Ragazzon
@mikke89
@diamondhat Already working on it in the flexbox branch :)
Ravbug
@Ravbug
I updated RmlUi to 4.2 from a dev version of 4.0 and I noticed that I'm no longer getting change events on <select> elements
Clicks on buttons and change events on sliders work
I'm adding the change events in code like this for both sliders and select elements:
element->AddEventListener(Rml::EventId::Change, new Handler(...));
Michael R. P. Ragazzon
@mikke89
@Ravbug Hm, we did make some changes to the select element, so it could be that we broke something. But it seems to work well for me in all my testing. Can you post a complete reproducible, preferably a unit test?
Ravbug
@Ravbug

@mikke89 I have very simple RML and C++ which reproduces the issue:

<rml>
    <head>
        <link type="text/rcss" href="default.rcss"></link>
        <style>
            *{
                font-size: 30dp
            }
        </style>
    </head>
    <body>
        <main>
            <p id="diag"></p>
            <br></br>
           <p>
               Select Mesh<br />
               <select id="sel">
                    <option selected>Cube</option>
                    <option>Cone</option>
                    <option>Cylinder</option>
                    <option>Sphere</option>
               </select>
           </p>
        </main>
    </body>
</rml>
struct SelectionEventListener : public Rml::EventListener{
        void ProcessEvent(Rml::Event& evt) override{
            cout << "selection event triggered" << endl;
        }
    };

    doc->GetElementById("sel")->AddEventListener(Rml::EventId::Change, new SelectionEventListener);

struct BtnEventListener : public Rml::EventListener{
        void ProcessEvent(Rml::Event& evt) override{
            cout << "button event triggered" << endl;
        }
    };
 doc->GetElementById("btn")->AddEventListener(Rml::EventId::Click, new BtnEventListener);

When run, "button event triggered" is printed while "selection event triggered" is not printed

I can try to put together a test app if necessary

Michael R. P. Ragazzon
@mikke89
Ah, I managed to reproduce with that code, thanks. I see the issue now, there are no values on the options. Thus the value of the select element doesn't actually change when a new option is selected, and there is no resulting change event. Not sure how this worked before, but I do think that the new behavior makes some sense, what do you think?
Ravbug
@Ravbug
So the options need to have value=1, value=2, ...? If so, then I think the documentation should mention that change events are not fired for options that do not have values (unless it already does and I missed that)
If options having no value is never correct, then it might also be worth logging a warning if it encounters one while loading a document
Michael R. P. Ragazzon
@mikke89
I see there might be some value to having the old behavior, I'll see if I can make it work again without too much trouble.
Ravbug
@Ravbug
I have some C++ code that generates options and added them to a select, having them automatically get ascending values (instead of needing to call SetProperty) would be helpful but not completely necessary
Michael R. P. Ragazzon
@mikke89
I think automatically giving them a value would be quite unexpected behavior in my view, not something I'd want.
Michael R. P. Ragazzon
@mikke89
@Ravbug Could you test the latest master to see if it all works as expected now? :)
Ravbug
@Ravbug
Just tried latest, it's working as expected :) @mikke89
Michael R. P. Ragazzon
@mikke89
Great!
wh1t3lord
@wh1t3lord
Hello again. And it is great that you work on flexbox feature. If I have a free time I will try to implement Vulkan example.
Michael R. P. Ragazzon
@mikke89
Thanks! Sounds good, would be nice to have a Vulkan backend :)
Łukasz Nocuń
@nocun
Hi, is it possible for RmlUI to handle text selection within the layout using mouse? not in a text-box but normal HTML elements, just like in a regular browser
Michael R. P. Ragazzon
@mikke89
@nocun There is no support for this right now I'm afraid.
Łukasz Nocuń
@nocun
@mikke89 ok thank you
checked all the demos, this library looks really great
Michael R. P. Ragazzon
@mikke89
Thanks! I appreciate it, hope you find it useful :)
Łukasz Nocuń
@nocun
yeah for sure, thank you guys for all the work!
zcream
@zcream
Is there an example for converting HTML/CSS to an offscreen image buffer ? The user can then use it for further processing.
illwieckz
@illwieckz:matrix.org
[m]
Hi, is it valid in RML documents to use attribute without values?
I noticed some of our RML files does that, for example I have one file with that line:
<body id="menu_main" class="mainmenu" nohide onShow='welcome(event, document) Events.pushevent("play 2 sound/ui/heartbeat sound/ui/heartbeat1", event)'>
Notice the lone nohide
then our code just does HasAttribute( "nohide" )
but I noticed this was making some python xml parser to abort the parsing
it may be super convenient to just set attributes like that, and only check the presence of it
but are we abusing the format?
Michael R. P. Ragazzon
@mikke89
Hello. Plain attributes like that are perfectly valid, it's commonly used with some elements eg. the checked attribute. Not sure if it's strictly valid xml, but in rml (and html for that matter) it should be fine at least.
illwieckz
@illwieckz:matrix.org
[m]
ok thanks 👍
it makes easy to flag some markup without adding to add useless =""
Kolja
@pinguin999
Does RmlUi Supports Korean fonts?
Text like 계속하기 results in no text at all. :( (But I have a very old version)
Michael R. P. Ragazzon
@mikke89
@pinguin999 I haven't tested it, but I think it should work? Of course you need to load a font that supports it.
Kolja
@pinguin999
I have a font that supports it.
If you have a quick way to test it, it would be a big help.
Michael R. P. Ragazzon
@mikke89
@pinguin999 I just tested this now on my end it's working fine here for me.
image.png
Kolja
@pinguin999
Thanks a lot. Than I will update my RmlUi version.
Michael R. P. Ragazzon
@mikke89
Uhm, have any of you ever seen character escapes in CSS by forward slash? Or am I somehow misinterpreting this code: https://github.com/mikke89/RmlUi/blob/536c24b49304b9e6e1bd11b0d0f82d0452643924/Source/Core/PropertySpecification.cpp#L492