void OnShowHotbar() { if (HotbarIsActive) { _hotbar.Hide(); HotbarIsActive = false; } else { _hotbar.Show(); HotbarIsActive = true; } }
public MainWindowViewModel() { _energyTimer = new EnergyTimer(); MessageLog.GetLog().MessageAdded += (s, e) => SystemMessage = MessageLog.GetLog().MostRecentMessage; _itemScreen = new ItemScreenViewModel(); _shoppingListScreen = new ShoppingListScreenViewModel(); ActiveViewModel = _itemScreen; _hotbar = new HotBarWindow(); _hotbar.DataContext = this; _hotbar.Show(); _hotbarIsActive = true; }