thisdp/dgs

Dgs-exedit sometimes don't display it's content until you click them

ERAGON007 opened this issue · 6 comments

Dgs-exedit sometimes don't display it's content until you click them

because of the optimization, DGS edit only renders when visual property changes. There may be some condition missing.

Alright, didn't know about that, feel free to close this issue when you want. or it can be open until conditions are added

xLive commented

How to reproduce this?

How to reproduce this?

I don't remember rn but you could reproduce it by setting the parent element visible to false first and try to set it to true after creating edit

xLive commented

Just for the record, after a little investigation, I found that the cause of this issue is minimizing the game while the editbox/memo is invisible.
When you minimize the game, rendertargets are cleared, but DGS restores them when you restore the game.

dgs/client.lua

Lines 136 to 138 in e1ba5c3

addEventHandler("onClientRestore",root,function()
dgsRenderInfo.RTRestoreNeed = true --RT is not working when minimized, force to restore the draw result is needed.
end)
However, since invisible elements do not render, they miss the RTRestoreNeed check, which leads to rendertargets not being restored, causing this issue.

I will investigate more soon when I have some free time, but if someone wants to fix it, feel free to do so

xLive commented

This bug has been resolved in previous commits.