C# Class Content.Client.Actions.UI.ActionsUI

The action hotbar on the left side of the screen.
Inheritance: Container
Afficher le fichier Open project: space-wizards/space-station-14 Class Usage Examples

Méthodes publiques

Свойство Type Description
Component ActionsComponent

Méthodes publiques

Méthode Description
ActionsUI ( ActionsSystem system, ActionsComponent component ) : Content.Client.DragDrop
HandleChangeHotbarKeybind ( byte hotbar, PointerInputCmdHandler.PointerInputCmdArgs args ) : void

Handle hotbar change.

HandleHotbarKeybind ( byte slot, PointerInputCmdHandler.PointerInputCmdArgs args ) : void

Handle keydown / keyup for one of the slots via a keybinding, simulates mousedown/mouseup on it.

StopTargeting ( bool updating = false ) : void

Switch out of targeting mode if currently selecting target for an action

ToggleActionsMenu ( ) : void
ToggleTargeting ( Content.Client.Actions.UI.ActionSlot slot ) : void

If currently targeting with this slot, stops targeting. If currently targeting with no slot or a different slot, switches to targeting with the specified slot.

UpdateUI ( ) : void

Refresh the display of all the slots in the currently displayed hotbar, to reflect the current component state and assignments of actions component.

Méthodes protégées

Méthode Description
EnteredTree ( ) : void
ExitedTree ( ) : void
FrameUpdate ( FrameEventArgs args ) : void
Resized ( ) : void
UIScaleChanged ( ) : void

Private Methods

Méthode Description
CalcMaxHeight ( ) : float
ChangeHotbar ( byte hotbar ) : void
OnBeginActionDrag ( ) : bool
OnContinueActionDrag ( float frameTime ) : bool
OnEndActionDrag ( ) : void
OnHotbarPaginate ( GUIBoundKeyEventArgs args ) : void
OnLockPressed ( BaseButton.ButtonEventArgs obj ) : void
OnToggleActionsMenu ( BaseButton.ButtonEventArgs args ) : void
OnToggleActionsMenuTopButton ( bool open ) : void
StartTargeting ( Content.Client.Actions.UI.ActionSlot actionSlot ) : void

Puts us in targeting mode, where we need to pick either a target point or entity

UpdateActionSlot ( ActionType action, Content.Client.Actions.UI.ActionSlot actionSlot ) : void

Method Details

ActionsUI() public méthode

public ActionsUI ( ActionsSystem system, ActionsComponent component ) : Content.Client.DragDrop
system ActionsSystem
component ActionsComponent
Résultat Content.Client.DragDrop

EnteredTree() protected méthode

protected EnteredTree ( ) : void
Résultat void

ExitedTree() protected méthode

protected ExitedTree ( ) : void
Résultat void

FrameUpdate() protected méthode

protected FrameUpdate ( FrameEventArgs args ) : void
args FrameEventArgs
Résultat void

HandleChangeHotbarKeybind() public méthode

Handle hotbar change.
public HandleChangeHotbarKeybind ( byte hotbar, PointerInputCmdHandler.PointerInputCmdArgs args ) : void
hotbar byte hotbar index to switch to
args PointerInputCmdHandler.PointerInputCmdArgs
Résultat void

HandleHotbarKeybind() public méthode

Handle keydown / keyup for one of the slots via a keybinding, simulates mousedown/mouseup on it.
public HandleHotbarKeybind ( byte slot, PointerInputCmdHandler.PointerInputCmdArgs args ) : void
slot byte slot index to to receive the press (0 corresponds to the one labeled 1, 9 corresponds to the one labeled 0)
args PointerInputCmdHandler.PointerInputCmdArgs
Résultat void

Resized() protected méthode

protected Resized ( ) : void
Résultat void

StopTargeting() public méthode

Switch out of targeting mode if currently selecting target for an action
public StopTargeting ( bool updating = false ) : void
updating bool
Résultat void

ToggleActionsMenu() public méthode

public ToggleActionsMenu ( ) : void
Résultat void

ToggleTargeting() public méthode

If currently targeting with this slot, stops targeting. If currently targeting with no slot or a different slot, switches to targeting with the specified slot.
public ToggleTargeting ( Content.Client.Actions.UI.ActionSlot slot ) : void
slot Content.Client.Actions.UI.ActionSlot
Résultat void

UIScaleChanged() protected méthode

protected UIScaleChanged ( ) : void
Résultat void

UpdateUI() public méthode

Refresh the display of all the slots in the currently displayed hotbar, to reflect the current component state and assignments of actions component.
public UpdateUI ( ) : void
Résultat void

Property Details

Component public_oe property

The action component of the currently attached entity.
public ActionsComponent Component
Résultat ActionsComponent