private void setup() { Window_Minimap.clear(); if (Data == null) { if (Global.game_map.width > 0) { setup_minimap(); } else { return; } } setup_units(); Map_Offset = (new Vector2(Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT) - new Vector2(Global.game_map.width, Global.game_map.height) * MINIMAP_TILE_SIZE) / 2; View_Area = (new Vector2(Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT) * MINIMAP_TILE_SIZE) / Constants.Map.TILE_SIZE - new Vector2(8) + new Vector2(2); Minimap_Texture = Global.Content.Load <Texture2D>(@"Graphics/Pictures/Minimap_Tiles"); Sprite_Texture = Global.Content.Load <Texture2D>(@"Graphics/Pictures/Minimap_Sprites"); Grey_Fill = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/White_Square")); Grey_Fill.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT); Grey_Fill.tint = new Color(0, 0, 0, 0); }
protected void update_minimap() { if (Minimap.active) { if (Minimap.closing) { Minimap = null; // Clear menu call flag Global.game_temp.minimap_call = false; Global.game_map.highlight_test(); return; } else if (Global.Input.triggered(Inputs.B) || Global.Input.triggered(Inputs.Start) || Global.Input.mouse_click(MouseButtons.Right) || Global.Input.gesture_triggered(TouchGestures.PinchOut)) { Global.game_system.play_se(System_Sounds.Minimap_Close); Minimap.close(); } } }
protected void open_minimap_menu() { Global.game_system.play_se(System_Sounds.Minimap_Open); info_windows_offscreen(); Minimap = new Window_Minimap(); }