/// <summary> /// Initializes a new instance of the <see cref="KBSGame.EditorGui"/> class. /// </summary> /// <param name="ID">I.</param> /// <param name="screenResX">Screen res x.</param> /// <param name="screenResY">Screen res y.</param> /// <param name="drawRatio">Draw ratio.</param> /// <param name="world">World.</param> public EditorGui(int ID, int screenResX, int screenResY, float drawRatio, World world) : base(ID, screenResX, screenResY, drawRatio) { this.world = world; width = Math.Min (StaticVariables.dpi * 2, screenResX / 2); tabWidth = width - tabbarWidth - margin*2; rowLength = (width - margin * 2 - tabbarWidth) / StaticVariables.tileSize; currentHover = new Point (0, 0); worldSize = world.getSize (); terrainTiles = world.getTileTypes (); loadEntities (); }
public void reset(int screenResX, int screenResY, float drawRatio, World world) { this.world = world; base.resize (screenResX, screenResY, drawRatio); width = Math.Min (StaticVariables.dpi * 2, screenResX / 2); tabWidth = width - tabbarWidth - margin*2; rowLength = (width - margin * 2 - tabbarWidth) / StaticVariables.tileSize; currentHover = new Point (0, 0); worldSize = world.getSize (); terrainTiles = world.getTileTypes (); loadEntities (); selectedTab = 0; selected = -1; }