void createDialog() { ResourceComponent rc = editor.engine.resourceComponent; toolDialog = new GUIControl(editor.editorGui); GUILabel background = new GUILabel(editor.editorGui, editor.editorGui.leftBG, "World options"); background.size = new Vector2((editor.editorGui.graphics.width - EditorGUI.RIGHTBOUNDARY) - EditorGUI.LEFTBOUNDARY - 10, EditorGUI.TOPBOUNDARY); toolDialog.pos = new Vector2(toolButton.pos.x + 20, 0); toolDialog.add(background); selectBehaviorButton = 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"))), "Select Behavior"); selectBehaviorButton.pos = new Vector2(5, 20); toolDialog.add(selectBehaviorButton); removeBehaviorButton = 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 Behavior"); removeBehaviorButton.pos = new Vector2(105, 20); toolDialog.add(removeBehaviorButton); GUILabel widthLabel = new GUILabel(editor.editorGui, text: "Width"); widthLabel.pos = new Vector2(4, 50); toolDialog.add(widthLabel); widthBox = new GUITextBox(editor.editorGui, "0"); widthBox.pos = new Vector2(5, 70); widthBox.minWidth = 50; widthBox.onText('\b'); toolDialog.add(widthBox); GUILabel heightLabel = new GUILabel(editor.editorGui, text: "Height"); heightLabel.pos = new Vector2(60, 50); toolDialog.add(heightLabel); heightBox = new GUITextBox(editor.editorGui, "0"); heightBox.pos = new Vector2(60, 70); heightBox.minWidth = 50; heightBox.onText('\b'); toolDialog.add(heightBox); resizeButton = 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"))), "Resize"); resizeButton.pos = new Vector2(115, 70); toolDialog.add(resizeButton); 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() { ResourceComponent rc = editor.engine.resourceComponent; toolDialog = new GUIControl(editor.editorGui); GUILabel background = new GUILabel(editor.editorGui, editor.editorGui.leftBG, "Create a new map"); background.size = new Vector2(editor.editorGui.graphics.width * .40f, editor.editorGui.graphics.height * .20f); toolDialog.pos = new Vector2(toolButton.pos.x + 20, toolButton.pos.y - background.size.y + 12); toolDialog.add(background); GUILabel widthPrompt = new GUILabel(editor.editorGui, text: "Width:"); widthPrompt.pos = new Vector2(5, 20); toolDialog.add(widthPrompt); widthEntry = new GUITextBox(editor.editorGui); widthEntry.minWidth = 40f; widthEntry.maxWidth = 40f; widthEntry.pos = new Vector2(5, 40); widthEntry.size = new Vector2(widthEntry.minWidth, widthEntry.size.y); toolDialog.add(widthEntry); GUILabel heightPrompt = new GUILabel(editor.editorGui, text: "Height:"); heightPrompt.pos = new Vector2(widthEntry.maxWidth + 20, 20); toolDialog.add(heightPrompt); heightEntry = new GUITextBox(editor.editorGui); heightEntry.minWidth = 40f; heightEntry.maxWidth = 40f; heightEntry.size = new Vector2(heightEntry.minWidth, widthEntry.size.y); heightEntry.pos = new Vector2(widthEntry.maxWidth + 20, 40); toolDialog.add(heightEntry); confirmButton = 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"))), "OK"); confirmButton.pos = new Vector2(5, 60); toolDialog.add(confirmButton); cancelButton = 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"))), "CANCEL"); cancelButton.pos = new Vector2(30, 60); toolDialog.add(cancelButton); }