SampleMagicCombatGuiLauncher

abstract class SampleMagicCombatGuiLauncher(hotkey: Char)

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]
}
}

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!

Constructors

Link copied to clipboard
constructor(hotkey: Char)

Functions

Link copied to clipboard
open fun advance(amount: Float, events: MutableList<<Error class: unknown class>>?)
Link copied to clipboard

Override this to return a new GUI object from this function, e.g. "return new MyGui()"

Link copied to clipboard
open fun renderInUICoords(viewport: <Error class: unknown class>?)