Sample Magic Combat Gui Launcher
Class that, when added to engine via e.g. addPlugin
, will open/close GUI when specified hotkey is pressed. Extend this class by overriding constructGui to construct a GuiObject that extends MagicCombatGuiBase. This class is mainly intended as an example or to quickly get started. In the long term, you probably want to implement your own GUI launching logic in order to be able to customize things.
Example:
public class ExampleCombatGuiLauncher extends SampleMagicCombatGuiLauncher{
public ExampleCombatGuiLauncher(){
super('+'); // use + as hotkey to open/close GUI
}
@Override
public @NotNull MagicCombatGuiBase constructGui(){
return new ExampleCombatGui(); // construct and return class that extends [GuiBase]
}
}
Content copied to clipboard
Author
Jannes
Since
1.3.0
Parameters
hotkey
lowercase char representation of hotkey to press to open/close the GUI. Make sure that key is not being used by Starsector!