public void PressedAction(EntityHUDAction action, string arg = null) { EntityHUD.Button btn = new EntityHUD.Button(new EntityHUDData.Button { buttonAction = action }); this.PressedButton(btn, arg); }
public Button(EntityHUDData.Button button) { this.hotkey = button.hotkey; if (button.buttonPrefab != null) { this.button = OverlayWindow.GetPooledWindow <OverlayWindow>(button.buttonPrefab); } this.action = button.buttonAction; this.toggle = button.toggle; }