Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

[UI] TBEditField recreates embedded widgets when doing layout #1297

Open
JoshEngebretson opened this issue Dec 22, 2016 · 0 comments
Open

[UI] TBEditField recreates embedded widgets when doing layout #1297

JoshEngebretson opened this issue Dec 22, 2016 · 0 comments

Comments

@JoshEngebretson
Copy link
Contributor

tb_style_edit calls CreateFragmentContent here on layout:

https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Source/ThirdParty/TurboBadger/tb_style_edit.cpp#L936

Which creates embedded widgets whenever there is a layout, resize, etc:

https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Source/ThirdParty/TurboBadger/tb_editfield.cpp#L670

So for example an embedded Button would be recreated: <widget TBButton: id: 'mybutton' text: 'Click Me'>

This can get quite expensive and could be why the about dialog is slow on resize, the widgets should only be recreated if necessary, probably cached and then clear widget cache if content changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant