public override void Initialize() { _mapMenu = new MapMenu(GuiServices); _mapMenu.StartClicked += OnStartClicked; _mapMenu.OptionsClicked += OnOptionsClicked; AddElement(_mapMenu); }
void Awake() { if(master == null){ // DontDestroyOnLoad(gameObject); master = this; } else if( master != this){ Destroy(gameObject); } }
void Awake() { if (mapMenu == null) { DontDestroyOnLoad(gameObject); mapMenu = this; } else if (mapMenu != this) { Destroy(gameObject); } }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }
protected override bool update_menu_map() { if (MapMenu != null) { MapMenu.Update(); if (MapMenu != null && MapMenu.Finished) { MapMenu = null; } return(true); } return(false); }
private void ShowContextMenu(TreeNode selectedNode, Point mouseLocation) { switch (selectedNode.Name.ToLower()) { case "projectnode": { ProjectMenu.Show(mouseLocation); break; } case "mapsnode": { MapsMenu.Show(mouseLocation); break; } case "mapnode": { MapMenu.Show(mouseLocation); break; } case "tilesnode": { TilesMenu.Show(mouseLocation); break; } case "layernode": { if (selectedNode.Tag is TileLayer <Tile> ) { TileLayer <Tile> layer = (TileLayer <Tile>)selectedNode.Tag; visibleToolStripMenuItem.Checked = layer.Visible; LayerMenu.Show(mouseLocation); } break; } case "tilefilternode": { TilesMenu.Show(mouseLocation); break; } } }
/// <summary> /// Updates preparations menus. Returns true if an active menu was processed, so no other menus should be updated. /// </summary> protected bool update_preparations() { //@Debug: I think this is redundant with update_menu_map(), other than // the outermost if statement if (Global.game_system.preparations) { if (MapMenu != null) { MapMenu.Update(); if (MapMenu != null && MapMenu.Finished) { MapMenu = null; } return(true); } } return(false); }
public void OnMapButtonClicked() { MapMenu.Show(); }
public void ShowContextMenu(GameSpawn context, Point location) { m_contextspawn = context; MapMenu.Show(this, location); }
private void Start() { MapMenu.Show(); }
void Start() { mMenu = MapMenu.mapMenu; }