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() { toolDialog = new GUIControl(editor.editorGui); ResourceComponent rc = editor.engine.resourceComponent; //Right menu GUILabel background = new GUILabel(editor.editorGui, editor.editorGui.leftBG, text: "Selection 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 modeLabel = new GUILabel(editor.editorGui, text: "Mode:"); modeLabel.pos = new Vector2(0, 25); toolDialog.add(modeLabel); modeControl = new GUIRadioControl(editor.editorGui); modeControl.addRadioButton((isdown) => { if (isdown) { mode = Mode.select; } }, "Select"); modeControl.addRadioButton((isdown) => { if (isdown) { //Update mode if (copiedTiles == null) { modeControl.pressed = (int)mode; } else { mode = Mode.paste; //Update selection for copying isDragging = true; Vector2 pos = editor.engine.graphicsComponent.camera.world2Screen(selection.topLeft * Tile.size); moveAction(pos); isDragging = false; } } }, "Paste"); modeControl.pos = new Vector2(0, 45); toolDialog.add(modeControl); clearButton = 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"))), "Erase"); clearButton.pos = new Vector2(0, 105); toolDialog.add(clearButton); GUILabel selectLabel = new GUILabel(editor.editorGui, text: "Select Mode:"); selectLabel.pos = new Vector2(0, 145); toolDialog.add(selectLabel); copyButton = 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"))), "Copy"); copyButton.pos = new Vector2(0, 165); toolDialog.add(copyButton); GUILabel pasteLabel = new GUILabel(editor.editorGui, text: "Paste Mode:"); pasteLabel.pos = new Vector2(0, 205); toolDialog.add(pasteLabel); pasteButton = 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"))), "Paste"); pasteButton.pos = new Vector2(0, 225); toolDialog.add(pasteButton); }