Render focused button's focus image in the menu

Buttons with a focus image now swap to it while selected, giving visible
feedback when navigating with the arrow keys.
This commit is contained in:
2026-09-15 23:35:40 -04:00
parent 663c70dd7b
commit d38d7f59aa
3 changed files with 16 additions and 1 deletions
@@ -8,6 +8,11 @@ public interface IDisplay {
Object getAnimImage();
/** The image shown while this object has input focus, or {@code null}. */
default Object getFocusImage() {
return null;
}
int getX();
int getY();
@@ -29,6 +29,11 @@ public class ButtonObject extends BasePositionObject {
return image.getImage();
}
@Override
public Object getFocusImage() {
return focus.getImage();
}
@Override
public void setFocus() {
trigger(onFocusIn);