Interface Toolbar
-
public interface Toolbar
The toolbar used by aGameWindow
to handle the toolbar.- Version:
- 1.0
- Author:
- Tim Neumann, Tobias Wältken
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Toolbar.ClockButtonState
The clock button state represents the states of the clock buttons in the uistatic class
Toolbar.ControlButtonState
The 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 void
addEntity(String displayName, String textureID)
Append the list of entities with the given entryvoid
disableEntitySelector()
Disable the entity selectorvoid
enableEntitySelector()
Enable the entity selectorString
getCurrentlySelectedEntity()
Get the entity currently selected in the entity selection dropdown.int
getSpeedSliderPosition()
Get the current position of the speed slider.void
setClockButtonState(Toolbar.ClockButtonState clockButtonState)
Set the state of the clock buttons.void
setControlButtonState(Toolbar.ControlButtonState controlButtonState)
Set the state of the control buttons.void
setCurrentlySelectedEntity(String entity)
Set the entity selected in the entity selection dropdown.void
setSpeedSliderPosition(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
-
-