private void OnSpawnEntitiesButtonClicked(BaseButton.ButtonEventArgs args) { var window = new EntitySpawnWindow(); window.AddToScreen(); window.OpenToLeft(); }
private void button_entity_Clicked(Button sender) { UiManager.DisposeAllComponents <EntitySpawnWindow>(); //Remove old ones. var entitySpawnWindow = new EntitySpawnWindow(new Vector2i(350, 410)); UiManager.AddComponent(entitySpawnWindow); entitySpawnWindow.DoLayout(); //Create a new one. Visible = !Visible; UiManager.RemoveFocus(this); }