Interface Toolbar
-
public interface ToolbarThe toolbar used by aGameWindowto handle the toolbar.- Version:
- 1.0
- Author:
- Tim Neumann, Tobias Wältken
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classToolbar.ClockButtonStateThe clock button state represents the states of the clock buttons in the uistatic classToolbar.ControlButtonStateThe control button state represents the status of the control buttons in the ui
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEntity(String displayName, String textureID)Append the list of entities with the given entryvoiddisableEntitySelector()Disable the entity selectorvoidenableEntitySelector()Enable the entity selectorStringgetCurrentlySelectedEntity()Get the entity currently selected in the entity selection dropdown.intgetSpeedSliderPosition()Get the current position of the speed slider.voidsetClockButtonState(Toolbar.ClockButtonState clockButtonState)Set the state of the clock buttons.voidsetControlButtonState(Toolbar.ControlButtonState controlButtonState)Set the state of the control buttons.voidsetCurrentlySelectedEntity(String entity)Set the entity selected in the entity selection dropdown.voidsetSpeedSliderPosition(int position)Set the position of the speed slider.
-
-
-
Method Detail
-
addEntity
void addEntity(String displayName, String textureID)
Append the list of entities with the given entry- Parameters:
displayName- the name which is displayed for the usertextureID- the texture which is rendert infront of the display name- See Also:
DropdownSelector
-
setControlButtonState
void setControlButtonState(Toolbar.ControlButtonState controlButtonState)
Set the state of the control buttons.- Parameters:
controlButtonState- The new state
-
setClockButtonState
void setClockButtonState(Toolbar.ClockButtonState clockButtonState)
Set the state of the clock buttons.- Parameters:
clockButtonState- The new state
-
getSpeedSliderPosition
int getSpeedSliderPosition()
Get the current position of the speed slider.- Returns:
- The position from 0 to 10 (both inclusive)
-
setSpeedSliderPosition
void setSpeedSliderPosition(int position)
Set the position of the speed slider.- Parameters:
position- The new position; can be from 0 to 10 (both inclusive)
-
getCurrentlySelectedEntity
String getCurrentlySelectedEntity()
Get the entity currently selected in the entity selection dropdown.- Returns:
- The name of the currently selected entity
-
setCurrentlySelectedEntity
void setCurrentlySelectedEntity(String entity)
Set the entity selected in the entity selection dropdown.- Parameters:
entity- The name of the entity to select
-
enableEntitySelector
void enableEntitySelector()
Enable the entity selector
-
disableEntitySelector
void disableEntitySelector()
Disable the entity selector
-
-