Package cs.eng1.piazzapanic.ui
Class StationUIController
- java.lang.Object
-
- cs.eng1.piazzapanic.ui.StationUIController
-
public class StationUIController extends java.lang.Object
The controller of all UI relating to all stations. It enables showing and hiding action buttons and displaying progress bars (WIP).
-
-
Constructor Summary
Constructors Constructor Description StationUIController(com.badlogic.gdx.scenes.scene2d.Stage uiStage, PiazzaPanicGame game)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStation(Station station)
Keep track of another station and initialize UI for that station.void
hideActions(Station station)
Hide any actions that may be visible for a given station.void
hideProgressBar(Station station)
Hide any actions that may be visible for a given station.void
showActions(Station station, java.util.List<StationAction.ActionType> actions)
Display a set of actions for a given station.void
showProgressBar(Station station)
Display a progress bar for a station.void
updateProgressValue(Station station, float value)
Update progress bar for a station.
-
-
-
Constructor Detail
-
StationUIController
public StationUIController(com.badlogic.gdx.scenes.scene2d.Stage uiStage, PiazzaPanicGame game)
-
-
Method Detail
-
addStation
public void addStation(Station station)
Keep track of another station and initialize UI for that station.- Parameters:
station
- the station to keep track of.
-
showActions
public void showActions(Station station, java.util.List<StationAction.ActionType> actions)
Display a set of actions for a given station. If the station is not one that this class knows, then it will initialize the UI for it and then show the actions.- Parameters:
station
- The station for which the UI should be displayed.actions
- The list of actions to show.
-
hideActions
public void hideActions(Station station)
Hide any actions that may be visible for a given station.- Parameters:
station
- The station for which action should be hidden.
-
showProgressBar
public void showProgressBar(Station station)
Display a progress bar for a station. If the station is not one that this class knows, then it will initialize the UI for it and then show the actions.- Parameters:
station
- The station for which the UI should be displayed.
-
updateProgressValue
public void updateProgressValue(Station station, float value)
Update progress bar for a station. If the station is not one that this class knows, then it will initialize the UI for it and then show the actions.- Parameters:
station
- The station for which the progress should be updated.value
- The value to be shown on the progress bar.
-
hideProgressBar
public void hideProgressBar(Station station)
Hide any actions that may be visible for a given station.- Parameters:
station
- The station for which action should be hidden.
-
-