HomeWildfire Games

Cleanup GUI Checkbox C++ code by removing broken, non-obvious internal text…
AuditedrP14476

Description

Cleanup GUI Checkbox C++ code by removing broken, non-obvious internal text rendering.

Details

Auditors
elexis
Committed
JoshuaJBJan 2 2014, 4:28 AM
Parents
rP14475: small code cleanup
Branches
Unknown
Tags
Unknown

Event Timeline

elexis raised a concern with this commit.EditedAug 23 2019, 4:29 PM
elexis added a subscriber: elexis.

If removing the DrawText call is right, then this should not only remove the DrawText call but also CCheckBox::SetupText(), the according Settings, and IGUITextOwner inheritance.

non-obvious internal text rendering

sounds like the text either might still rendered in a non obvious place, or that the previous code was non obvious.

As far as I see DrawText is the only place where text is rendered, and that is only called from IGUIObject classes (the leaf classes).

Marked as TODO in rP18419.

This commit now has outstanding concerns.Aug 23 2019, 4:29 PM
elexis accepted this commit.Sep 21 2019, 5:49 AM

Rest of the text code removed in rP22952.
Not sure if it wouldnt be better if the class supports rendering text (most other GUIs do?), also the implementation didnt duplicate the text rendering like other classes do (CInput).
But given that now the entire GUI uses its own labels, one would have to rewrite most checkboxes to make use of that feature if it was implemented, so good enough for me until someone wants to implement it back.

All concerns with this commit have now been addressed.Sep 21 2019, 5:49 AM