예제 #1
0
        private void OnSpawnEntitiesButtonClicked(BaseButton.ButtonEventArgs args)
        {
            var window = new EntitySpawnWindow();

            window.AddToScreen();
            window.OpenToLeft();
        }
예제 #2
0
        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);
        }