private UIDrawing() { Tiles = new ItemsHolder(new RectangleF(80 * 7 + 64, 640 + 121, 1024 + 128 - 16, 128 + 64), 14, 40); _transaprencyForeground = new Graber(new Vector2(512 - 96, 128 + 128), 255, null, TransparencyForeground, GrabShow.percentage, "Foreground transparency"); _transaprencyBackground = new Graber(new Vector2(512 - 96, 128 + 64), 255, null, TransparencyBackground, GrabShow.percentage, "Background transparency"); _transaprencyPhysics = new Graber(new Vector2(512 - 96, 128 + 64 + 128), 255, null, null, GrabShow.percentage, "Physics transparency"); _radio1 = new Radio(null, new Vector2(1024 - 64 - 96, 128 + 64), RadioType.classic); _radio2 = new Radio(null, new Vector2(1024 - 64 - 96, 256), RadioType.classic); _radio3 = new Radio(null, new Vector2(1024 - 64 - 96, 256 + 64), RadioType.classic); _radios = new GroupRadios(0, _radio1, _radio2, _radio3); ForegroundVisibility = new CheckBox(null, new Vector2(1024 - 128 - 96, 128 + 128), CheckBoxType.visibility, true, null, null); BackgroundVisibility = new CheckBox(null, new Vector2(1024 - 128 - 96, 128 + 64), CheckBoxType.visibility, false, null, null); PhysicsVisibility = new CheckBox(null, new Vector2(1024 - 128 - 96, 128 + 64 + 128), CheckBoxType.visibility, false, null, null); TilesPhysics = new ItemsHolder(new RectangleF(80 * 7 + 64, 640 + 121, 1024 + 128 - 16, 128 + 64), 14, 40); for (int x = 0; x < Game1.Tiles.Count; x++) { int y = (int)Math.Floor(x / 14f); Tiles.Items.Add(new ListItemTile(Tiles.Items.Count, Tiles.Boundary, Game1.Tiles[x])); } for (int x = 0; x < Game1.TilesPhysics.Count; x++) { int y = (int)Math.Floor(x / 14f); TilesPhysics.Items.Add(new ListItemTile(TilesPhysics.Items.Count, Tiles.Boundary, Game1.TilesPhysics[x])); } Tiles.Update(); TilesPhysics.Update(); }
static EditorMenu() { _windows = new Dictionary <string, IWindow>(); _windows.Add("settings", UISettings.Instance); _windows.Add("draw", UIDrawing.Instance); _windows.Add("save", UISave.Instance); _windows.Add("entities", UIEntities.Instance); _actualWin = "settings"; _offsetX = (Globals.WinRenderSize.X - (256 * 5 + 64 * 4)) / 2; _r1 = new Radio("Map settings", new Vector2(_offsetX, 64), RadioType.big, null, null, "settings"); _r2 = new Radio("Draw tiles", new Vector2(_offsetX + 64 + 256 * 1, 64), RadioType.big, null, null, "draw"); _r3 = new Radio("Entities", new Vector2(_offsetX + 64 * 2 + 256 * 2, 64), RadioType.big, null, null, "entities"); _r4 = new Radio("Insert", new Vector2(_offsetX + 64 * 3 + 256 * 3, 64), RadioType.big, null, null, "four"); _r5 = new Radio("Save \\ Open", new Vector2(_offsetX + 64 * 4 + 256 * 4, 64), RadioType.big, null, null, "save"); Radios = new GroupRadios(0, _r1, _r2, _r3, _r4, _r5); }