Reese's Sodium Options

Reese's Sodium Options

33M Downloads

[GUI Basic] Focus implementation in AbstractFrame does not handle previous focused widget.

LitnhJacuzzi opened this issue ยท 1 comments

commented

The focused state of a widget will not be removed after focusing another widget, makes the visual effect of this widget be inconsistent with what is expected. For example, first click the search bar to make it gain the focus and click any option tab to steal its focus, the caret of the search bar should disappear but doesn't currently.

Related code: me.flashyreese.mods.reeses_sodium_options.client.gui.frame.AbstractFrame::setFocused, the focus of the previous focused widget should be removed properly here.

commented

It's recommended to surround functional codes with if(this.focused != focused) check to prevent invalid focus requests, or if a focused widget requests its focus again it will lose its focus instead.