void createDialog() { ResourceComponent rc = editor.engine.resourceComponent; toolDialog = new GUIControl(editor.editorGui); GUILabel background = new GUILabel(editor.editorGui, editor.editorGui.leftBG, "Treequake options"); background.size = new Vector2((editor.editorGui.graphics.width - EditorGUI.RIGHTBOUNDARY) - EditorGUI.LEFTBOUNDARY - 10, EditorGUI.BOTTOMBOUNDARY); toolDialog.pos = new Vector2(toolButton.pos.x + 20, editor.editorGui.graphics.height - EditorGUI.BOTTOMBOUNDARY); toolDialog.add(background); minusButton = new GUIButton(editor.editorGui, rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/029_minus.png"))), rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/030_minusPressed.png")))); minusButton.pos = new Vector2(5, 40); toolDialog.add(minusButton); defaultButton = new GUIButton(editor.editorGui, rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/025_radio.png"))), rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/024_radio.png")))); defaultButton.pos = defaultButton.pos = new Vector2(20, 40); toolDialog.add(defaultButton); plusButton = new GUIButton(editor.editorGui, rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/027_plus.png"))), rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/028_plusPressed.png")))); plusButton.pos = plusButton.pos = new Vector2(35, 40); toolDialog.add(plusButton); GUILabel zoomLabel = new GUILabel(editor.editorGui, text: "Enhance"); zoomLabel.pos = new Vector2(55, 40); toolDialog.add(zoomLabel); centerButton = new GUIButton(editor.editorGui, rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/025_radio.png"))), rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/024_radio.png")))); centerButton.pos = new Vector2(5, 60); toolDialog.add(centerButton); GUILabel centerLabel = new GUILabel(editor.editorGui, text: "Center"); centerLabel.pos = new Vector2(25, 60); toolDialog.add(centerLabel); pauseCheckBox = new GUICheckBox(editor.editorGui, editor.pauseEngine, "Pause Engine"); pauseCheckBox.pos = new Vector2(5, 20); toolDialog.add(pauseCheckBox); gridCheckBox = new GUICheckBox(editor.editorGui, editor.showGrid, "Show Grid"); gridCheckBox.pos = new Vector2(105, 20); toolDialog.add(gridCheckBox); overlayCheckBox = new GUICheckBox(editor.editorGui, editor.showOverlay, "Show Overlay"); overlayCheckBox.pos = new Vector2(205, 20); toolDialog.add(overlayCheckBox); ambienceCheckBox = new GUICheckBox(editor.editorGui, editor.fullAmbient, "Extra Light"); ambienceCheckBox.pos = new Vector2(105, 40); toolDialog.add(ambienceCheckBox); closeButton = new GUIButton(editor.editorGui, rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/000_solid.png"))), rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/000_solid.png")))); closeButton.pos = new Vector2(background.size.x - 12, 4); closeButton.size = new Vector2(8, 8); toolDialog.add(closeButton); }
void createDialog() { toolDialog = new GUIControl(editor.editorGui); //Right menu GUILabel background = new GUILabel(editor.editorGui, editor.editorGui.leftBG, text: "Fill Tool"); background.size = new Vector2(EditorGUI.RIGHTBOUNDARY, editor.engine.graphicsComponent.height - EditorGUI.BOTTOMBOUNDARY); toolDialog.pos = new Vector2(editor.engine.graphicsComponent.width - EditorGUI.RIGHTBOUNDARY, 0); toolDialog.add(background); GUILabel critLabel = new GUILabel(editor.editorGui, text: "Criteria:"); critLabel.pos = new Vector2(0, 25); toolDialog.add(critLabel); textureCritBox = new GUICheckBox(editor.editorGui, true, "Same texture"); textureCritBox.pos = new Vector2(0, 45); toolDialog.add(textureCritBox); solidityCritBox = new GUICheckBox(editor.editorGui, false, "Same solidity"); solidityCritBox.pos = new Vector2(0, 65); toolDialog.add(solidityCritBox); opacityCritBox = new GUICheckBox(editor.editorGui, false, "Same opacityFlip"); opacityCritBox.pos = new Vector2(0, 85); toolDialog.add(opacityCritBox); GUILabel opLabel = new GUILabel(editor.editorGui, text: "Operator:"); opLabel.pos = new Vector2(0, 110); toolDialog.add(opLabel); opControl = new GUIRadioControl(editor.editorGui, (int)Operator.AND); opControl.addRadioButton(null, "AND"); opControl.addRadioButton(null, "OR"); opControl.pos = new Vector2(0, 130); toolDialog.add(opControl); GUILabel selectionLabel = new GUILabel(editor.editorGui, text: "Selection:"); selectionLabel.pos = new Vector2(0, opControl.pos.y + opControl.size.y + 35); toolDialog.add(selectionLabel); selectionBox = new GUICheckBox(editor.editorGui, true, "Ignore"); selectionBox.pos = new Vector2(0, selectionLabel.pos.y + 15); toolDialog.add(selectionBox); }
void createDialog() { ResourceComponent rc = editor.engine.resourceComponent; toolDialog = new GUIControl(editor.editorGui); //Right menu GUILabel background = new GUILabel(editor.editorGui, editor.editorGui.leftBG, text: "Pencil Tool"); background.size = new Vector2(EditorGUI.RIGHTBOUNDARY, editor.engine.graphicsComponent.height - EditorGUI.BOTTOMBOUNDARY); toolDialog.pos = new Vector2(editor.engine.graphicsComponent.width - EditorGUI.RIGHTBOUNDARY, 0); toolDialog.add(background); GUILabel textureLabel = new GUILabel(editor.editorGui, text: "Texture"); textureLabel.pos = new Vector2(0, 25); toolDialog.add(textureLabel); textureOverwriteBox = new GUICheckBox(editor.editorGui, editor.currentTile.texture != Mapfile.TileData.IGNORESTRING, "Overwrite"); textureOverwriteBox.pos = new Vector2(0, 40); toolDialog.add(textureOverwriteBox); int numCols = EditorGUI.RIGHTBOUNDARY / Tile.size; int numRows = (editor.engine.graphicsComponent.height / Tile.size) / 3; thumbs = new ScrollingImageTable(editor.editorGui, numRows, numCols, Tile.size, Tile.size, ScrollingImageTable.ScrollDirection.VERTICAL, new Vector2(0, 55)); thumbs.padding = 2; toolDialog.add(thumbs); GUILabel solidityLabel = new GUILabel(editor.editorGui, text: "Solidity"); solidityLabel.pos = new Vector2(0, thumbs.size.y); toolDialog.add(solidityLabel); solidityOverwriteBox = new GUICheckBox(editor.editorGui, editor.currentTile.solidity != Mapfile.TileData.IGNOREBYTE, "Overwrite"); solidityOverwriteBox.pos = new Vector2(0, thumbs.size.y + 15); toolDialog.add(solidityOverwriteBox); solidityCheckBox = new GUICheckBox(editor.editorGui, editor.currentValues.solidity == 1, "Is solid"); solidityCheckBox.pos = new Vector2(0, thumbs.size.y + 30); toolDialog.add(solidityCheckBox); GUILabel opacityLabel = new GUILabel(editor.editorGui, text: "Opacity"); opacityLabel.pos = new Vector2(0, thumbs.size.y + 50); toolDialog.add(opacityLabel); opacityOverwriteBox = new GUICheckBox(editor.editorGui, editor.currentTile.opacityFlip != Mapfile.TileData.IGNOREBYTE, "Overwrite"); opacityOverwriteBox.pos = new Vector2(0, thumbs.size.y + 65); toolDialog.add(opacityOverwriteBox); opacityFlipCheckBox = new GUICheckBox(editor.editorGui, editor.currentValues.opacityFlip == 1, "Is inverted"); opacityFlipCheckBox.pos = new Vector2(0, thumbs.size.y + 80); toolDialog.add(opacityFlipCheckBox); GUILabel behaviorLabel = new GUILabel(editor.editorGui, text: "Behavior"); behaviorLabel.pos = new Vector2(0, thumbs.size.y + 100); toolDialog.add(behaviorLabel); behaviorOverwriteBox = new GUICheckBox(editor.editorGui, editor.currentTile.behavior != Mapfile.TileData.IGNORESTRING, "Overwrite"); behaviorOverwriteBox.pos = new Vector2(0, thumbs.size.y + 115); toolDialog.add(behaviorOverwriteBox); behaviorSetButton = new GUIButton(editor.editorGui, rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/019_buttBack.png"))), rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/018_buttBack.png"))), "Set"); behaviorSetButton.pos = new Vector2(0, thumbs.size.y + 135); toolDialog.add(behaviorSetButton); behaviorRemoveButton = new GUIButton(editor.editorGui, rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/019_buttBack.png"))), rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/018_buttBack.png"))), "Remove"); behaviorRemoveButton.pos = new Vector2(25, thumbs.size.y + 135); toolDialog.add(behaviorRemoveButton); addButton = new GUIButton(editor.editorGui, rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/019_buttBack.png"))), rc.get(Path.GetFullPath(Path.Combine(editor.editorGui.rootDirectory, "GUI/000_EngineGUI/018_buttBack.png"))), "Add custom tile"); addButton.pos = new Vector2(0, background.size.y - 25); toolDialog.add(addButton); }