Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:29
    ExoticMatter commented #313
  • May 17 19:43
    LeonToGamer starred mikke89/RmlUi
  • May 17 11:26
    mikke89 commented #307
  • May 17 11:16
    mikke89 commented #312
  • May 17 09:56
    Debug- starred mikke89/RmlUi
  • May 17 09:17
    wh1t3lord synchronize #236
  • May 17 09:09
    wh1t3lord synchronize #236
  • May 17 07:52
    xland commented #312
  • May 17 05:47
    xland commented #307
  • May 16 23:39
    mikke89 labeled #313
  • May 16 23:39
    mikke89 commented #313
  • May 16 21:26
    ExoticMatter opened #313
  • May 16 15:45
    bubby932 starred mikke89/RmlUi
  • May 16 12:07
    mikke89 closed #311
  • May 16 12:07
    mikke89 commented #311
  • May 16 12:06
    mikke89 closed #310
  • May 16 12:06
    mikke89 commented #310
  • May 16 12:05
    mikke89 labeled #312
  • May 16 12:05
    mikke89 commented #312
  • May 16 10:49
    wh1t3lord synchronize #236
Michael R. P. Ragazzon
@mikke89
Could be anything from projection matrix, viewport settings, context dimensions, and shader code.
VinaCC
@EngineLessCC
yeah im unsure what it could be atm, viewport dimensions match context, as for shader im using d3d9(Ex) funcs instead of shaders directly, projection matrix is basically taken from docs of rmlui on dx
Michael R. P. Ragazzon
@mikke89
Ah, hmm, if I remember correctly, dx9 has these half texel offset weirdness. Don't remember the details, but that should be something to investigate.
VinaCC
@EngineLessCC
yes! thank you for that tip! adding 0.5f to x and y translation fixed this
Michael R. P. Ragazzon
@mikke89
Great!
VinaCC
@EngineLessCC
are there reasons for the debuggers' element info window to be big yet empty on some elements?
Michael R. P. Ragazzon
@mikke89
It doesn't resize automatically, you can do that manually
Martin Suffer
@InactivatedPyschiopath
Hello, is there a link that I can see the supported tags, css properties and etc on rmlui?
Michael R. P. Ragazzon
@mikke89
@InactivatedPyschiopath Hi! Yes there is. See list of properties here: https://mikke89.github.io/RmlUiDoc/pages/rcss/property_index.html
Martin Suffer
@InactivatedPyschiopath
@mikke89 thanks!
Michael R. P. Ragazzon
@mikke89
Just added a search box on the documentation site! Hope you find it useful, let me know if you find any issues :)
Martin Suffer
@InactivatedPyschiopath
thanks! it's great
Martin Suffer
@InactivatedPyschiopath
@mikke89 I'm trying to add openh264 to rmlui, do you have any plan for that?
Michael R. P. Ragazzon
@mikke89
Haven't worked with that library before, let us know if you have any issues integrating it. Most likely you won't need any specific support from the RmlUi side, the library is quite flexible so you should be able to integrate it from the client side.
Martin Suffer
@InactivatedPyschiopath

Haven't worked with that library before, let us know if you have any issues integrating it. Most likely you won't need any specific support from the RmlUi side, the library is quite flexible so you should be able to integrate it from the client side.

@mikke89 yes I could decode and get the frame I guess I will face some issues to draw them in rmlui thanks for the help I will try to make it stable and send a commit to rmlui, lightweight mp4 files are extremely helpful for creating cool backgrounds.

Jeff425
@Jeff425

Hey @mikke89 I am getting a formatting error with tables Element has a display type 'table-row-group', but is not located in a table. It will not be formatted. In element tbody < table.commandBox < body < #root#main using the style sheet from https://mikke89.github.io/RmlUiDoc/pages/rcss/tables.html and my table is formatted as such

<table class='commandBox' data-model='commandModel'><tbody>
<tr class='commandLog'><td>{{commandLog}}</td></tr>
<tr class='commandInput'><td><input type='text' data-value='commandInput' /></td></tr>
</tbody></table>

I feel like I am missing something obvious (or if I need to change the table RCSS)

Jeff425
@Jeff425
Also love that you are working on flexbox support. Such an easy to use responsive layout
Jeff425
@Jeff425
Ah it seems using position absolute was causing issues with the table
Michael R. P. Ragazzon
@mikke89
@Jeff425 That's not the best error message for this situation certainly! Which element had absolute position here, the table or tbody?
Thanks, just getting started on flexbox, we'll see how it goes :)
Marco Bortolin
@barotto
I had the same problem with a table with absolute position. I solved putting the table inside an absolutely positioned div.
Michael R. P. Ragazzon
@mikke89
@barotto I don't think I ever tested this actually, thanks for letting me know, I'll see if we can do something about it. At least a better error message.
Marco Bortolin
@barotto
Just did a cursory look at the source code and I think this happens because when a table has absolute position it's added as such in the block_context_box obj but the LayoutTable::FormatTable won't be called in the CloseAbsoluteElements, and table elements have Static position. I also think putting a table inside an absolute div would be an acceptable workaround for this case, assuming a more meaningful error message is also provided.
Michael R. P. Ragazzon
@mikke89
Ah, right, that's a good start. I'll see if there is an easy fix, otherwise I'll just resort to an error message with your work-around.
Jeff425
@Jeff425
@mikke89 sorry for late reply, yeah it was on the table element itself. I ended up doing the same thing barotto did to fix it
Jeff425
@Jeff425
Is it possible to drag an element from one document to another?
Jeff425
@Jeff425
Another question: Is it possible to remove focus when ProcessMouseButtonDown(0, ...) is called while hovering over no elements?
Jeff425
@Jeff425
And no documents
Michael R. P. Ragazzon
@mikke89
@Jeff425 Yes, see the drag sample to do exactly this. As for removing focus, you could always do that manually if nothing captures the mouse button.
Jeff425
@Jeff425
Thanks for the help so far! Using context->GetRootElement()->Focus(); to remove focus but that doesn't seem to remove it from the input element. UnfocusDocument doesn't work as I don't have any other document on the screen. Is there an easy way to remove focus that I am missing?
Michael R. P. Ragazzon
@mikke89
@Jeff425 No problem! :) I think you have the right idea with context->GetRootElement()->Focus();, this is where I would start. Not sure why it doesn't work, maybe we want to do something about that? You could also try Focus on the document itself.
Jeff425
@Jeff425
I created a blank document to focus for this situation. That seems to work. Would be nice to have a context->Unfocus(); function as an easier solution
Marco Bortolin
@barotto
Hi, I need to use full paths with <img src="..."> on linux, is there any particular reason why the leading '/' character is stripped off from the texture source?
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?