Exemplo n.º 1
0
            public override void onClick(string SelectedidString)
            {
                EditorGui EditorGui = "EditorGui";

                SimObject mark = ((SimObject) this.getParent())["Bookmark"];
                EditorGui.jumpToBookmark(mark.getInternalName());
            }
Exemplo n.º 2
0
        public static void Inspect(SimObject obj)
        {
            GuiInspector    InspectFields             = "InspectFields";
            GuiTextEditCtrl InspectObjectName         = "InspectObjectName";
            GuiTextEditCtrl InspectObjectInternalName = "InspectObjectInternalName";
            GuiTextCtrl     InspectObjectSimID        = "InspectObjectSimID";

            // Don't inspect the root group.
            if (obj == -1)
            {
                return;
            }

            InspectFields.inspect(obj);

            // Update selected object properties
            InspectObjectName.setValue(obj.getName());
            InspectObjectInternalName.setValue(obj.getInternalName());
            InspectObjectSimID.setValue(obj.getId().AsString());

            // Store Object Reference
            InspectObjectName["refObj"] = obj;
        }
Exemplo n.º 3
0
        public void addBookmark(SimObject mark, int index)
        {
            ObjectCreator oc = new ObjectCreator("GuiControl");
            oc["internalName"] = mark.getInternalName();
            oc["Enabled"] = "1";
            oc["Profile"] = "ToolsGuiDefaultProfile";
            oc["HorizSizing"] = "right";
            oc["VertSizing"] = "bottom";
            oc["Position"] = "0 0";
            oc["Extent"] = "300 20";
            oc["MinExtent"] = "78 20";
            oc["Visible"] = "1";
            oc["Bookmark"] = mark;

            ObjectCreator oc1 = new ObjectCreator("GuiBitmapButtonCtrl", "", typeof (EManageBookmarksGoToButton));
            oc1["class"] = "EManageBookmarksGoToButton";
            oc1["bitmap"] = "tools/gui/images/camera-btn";
            oc1["groupNum"] = "-1";
            oc1["buttonType"] = "PushButton";
            oc1["useMouseEvents"] = "0";
            oc1["isContainer"] = "0";
            oc1["Profile"] = "ToolsGuiButtonProfile";
            oc1["HorizSizing"] = "right";
            oc1["VertSizing"] = "bottom";
            oc1["position"] = "2 2";
            oc1["Extent"] = "17 17";
            oc1["MinExtent"] = "8 2";
            oc1["canSave"] = "1";
            oc1["Visible"] = "1";
            oc1["Command"] = "";
            oc1["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc1["ToolTip"] = "Go to bookmark";
            oc1["hovertime"] = "1000";
            oc1["internalName"] = "goToBookmark";
            oc1["canSaveDynamicFields"] = "0";

            oc["#1"] = oc1;

            ObjectCreator oc2 = new ObjectCreator("GuiTextEditCtrl", "", typeof (EManageBookmarksTextEdit));
            oc2["class"] = "EManageBookmarksTextEdit";
            oc2["internalName"] = "BookmarkName";
            oc2["profile"] = "ToolsGuiTextEditProfile";
            oc2["HorizSizing"] = "width";
            oc2["VertSizing"] = "bottom";
            oc2["position"] = "22 2";
            oc2["Extent"] = "260 18";
            oc2["text"] = mark.getInternalName();
            oc2["maxLength"] = "1024";
            oc2["AltCommand"] = "";
            oc["#2"] = oc2;

            ObjectCreator oc3 = new ObjectCreator("GuiBitmapButtonCtrl", "", typeof (EManageBookmarksDeleteButton));
            oc3["class"] = "EManageBookmarksDeleteButton";
            oc3["bitmap"] = "tools/gui/images/delete";
            oc3["groupNum"] = "-1";
            oc3["buttonType"] = "PushButton";
            oc3["useMouseEvents"] = "0";
            oc3["isContainer"] = "0";
            oc3["Profile"] = "ToolsGuiButtonProfile";
            oc3["HorizSizing"] = "left";
            oc3["VertSizing"] = "bottom";
            oc3["position"] = "284 3";
            oc3["Extent"] = "16 16";
            oc3["MinExtent"] = "8 2";
            oc3["canSave"] = "1";
            oc3["Visible"] = "1";
            oc3["Command"] = "";
            oc3["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc3["ToolTip"] = "Delete camera bookmark";
            oc3["hovertime"] = "1000";
            oc3["internalName"] = "deleteBookmark";
            oc3["canSaveDynamicFields"] = "0";
            oc["#3"] = oc3;

            GuiControl gui = oc.Create();

            ((GuiStackControl) ((EManageBookmarks) "EManageBookmarks").findObjectByInternalName("ManageBookmarksWindowStack", true)).addGuiControl(gui);
        }
Exemplo n.º 4
0
 public override void onClick(string SelectedidString)
 {
     SimObject mark = ((SimObject) this.getParent())["Bookmark"];
     ((EditorGui) "EditorGui").schedule("0", "removeCameraBookmark", mark.getInternalName());
 }