示例#1
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);
        }
示例#2
0
        private void button_tile_Clicked(Button sender)
        {
            UiManager.DisposeAllComponents <TileSpawnWindow>(); //Remove old ones.

            var tileSpawnPanel = new TileSpawnWindow(new Vector2i(350, 410));

            UiManager.AddComponent(tileSpawnPanel);
            tileSpawnPanel.DoLayout();

            // hide me
            Visible = !Visible;
            UiManager.RemoveFocus(this);
        }