Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package mightypork.gamecore.gui.components;
|
|
|
|
|
|
|
|
|
|
|
|
import mightypork.gamecore.eventbus.clients.ToggleableClient;
|
|
|
|
import mightypork.gamecore.gui.Enableable;
|
|
|
|
|
|
|
|
|
|
|
|
public abstract class InputComponent extends VisualComponent implements Enableable, ToggleableClient {
|
|
|
|
|
|
|
|
private boolean enabled = true;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void enable(boolean yes)
|
|
|
|
{
|
|
|
|
this.enabled = yes;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isEnabled()
|
|
|
|
{
|
|
|
|
return enabled && isVisible();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isListening()
|
|
|
|
{
|
|
|
|
return isEnabled();
|
|
|
|
}
|
|
|
|
}
|