Ejemplo n.º 1
0
        public override void syncBrushToolbar()
        {
            ForestEditorGui.ForestBrushSizeSliderCtrlContainer ForestBrushSizeSliderCtrlContainer = "ForestBrushSizeSliderCtrlContainer";
            GuiControl        ForestBrushSizeTextEditContainer       = "ForestBrushSizeTextEditContainer";
            GuiControl        ForestBrushPressureTextEditContainer   = "ForestBrushPressureTextEditContainer";
            GuiControl        ForestBrushHardnessTextEditContainer   = "ForestBrushHardnessTextEditContainer";
            GuiMouseEventCtrl ForestBrushPressureSliderCtrlContainer = "ForestBrushPressureSliderCtrlContainer";
            GuiMouseEventCtrl ForestBrushHardnessSliderCtrlContainer = "ForestBrushHardnessSliderCtrlContainer";

            GuiSliderCtrl   ForestBrushSizeSliderCtrlContainerslider     = ForestBrushSizeSliderCtrlContainer.FOT("slider");
            GuiSliderCtrl   ForestBrushPressureSliderCtrlContainerslider = ForestBrushPressureSliderCtrlContainer.FOT("slider");
            GuiSliderCtrl   ForestBrushHardnessSliderCtrlContainerslider = ForestBrushHardnessSliderCtrlContainer.FOT("slider");
            GuiTextEditCtrl ForestBrushSizeTextEditContainertextEdit     = ForestBrushSizeTextEditContainer.FOT("textEdit");
            GuiTextEditCtrl ForestBrushPressureTextEditContainertextEdit = ForestBrushPressureTextEditContainer.FOT("textEdit");
            GuiTextEditCtrl ForestBrushHardnessTextEditContainertextEdit = ForestBrushHardnessTextEditContainer.FOT("textEdit");

            string size = this["size"];

            ForestBrushSizeSliderCtrlContainerslider.setValue(size);
            ForestBrushSizeTextEditContainertextEdit.setValue(size);

            string pres = this["pressure"];

            ForestBrushPressureSliderCtrlContainerslider.setValue(pres);
            ForestBrushPressureTextEditContainertextEdit.setValue(Util.mCeil(100 * pres.AsFloat()) + "%");

            string hard = this["hardness"];

            ForestBrushHardnessSliderCtrlContainerslider.setValue(hard);
            ForestBrushHardnessTextEditContainertextEdit.setValue(Util.mCeil(100 * hard.AsFloat()) + "%");
        }
Ejemplo n.º 2
0
        public override void onRightMouseUp(GuiControl ctrl)
        {
            int fontColorPos, backgroundColorPos, fillColorPos, fontSizePos, lockPos, winSettingsPos, setTitlePos, bitmapPos;
            GuiCanvas Canvas = "Canvas";

            ObjectCreator popupCreator = new ObjectCreator("PopupMenu", "", typeof (MenuBuilder));

            popupCreator["isPopup"] = true.AsString();

            popupCreator["object"] = "-1";

            MenuBuilder popup = popupCreator.Create();

            popup.removeAllItems();
            popup["object"] = ctrl;

            if (ctrl.getName() != "")
                popup.appendItem(ctrl.getName() + '\t' + "" + '\t' + "");
            else
                popup.appendItem(ctrl.getClassName() + '\t' + "" + '\t' + "");

            popup.enableItem(0, false);

            if (ctrl.lockControl)
                {
                lockPos = popup.appendItem("Locked" + '\t' + "" + '\t' + ctrl + ".setControlLock(!" + ctrl + ".getControlLock());");
                popup.checkItem(lockPos, ctrl.getControlLock());
                }

            if (ctrl.contextFontColor)
                fontColorPos = popup.appendItem("Font Color..." + '\t' + "" + '\t' + "getColorI(\"" + ctrl.controlFontColor.AsString() + "\", \"" + ctrl + ".setControlFontColor\", " + ctrl.getRoot() + ", \"" + ctrl + ".setControlFontColor\", \"" + ctrl + ".setControlFontColor\" );");

            if (ctrl.contextBackColor)
                backgroundColorPos = popup.appendItem("Background Color..." + '\t' + "" + '\t' + "IngameContext.transparentCheck(" + ctrl + ", \"backColor\");");

            if (ctrl.contextFillColor)
                fillColorPos = popup.appendItem("Fill Color..." + '\t' + "" + '\t' + "IngameContext.transparentCheck(" + ctrl + ", \"fillColor\");");

            if (ctrl.contextFontSize)
                fontSizePos = popup.appendItem("Font Size..." + '\t' + "" + '\t' + "ChangeFontSize.loadDialog(" + ctrl + ");");

            if (ctrl.windowSettings)
                winSettingsPos = popup.appendItem("Window Settings" + '\t' + "" + '\t' + "WindowSettings.loadDialog(" + ctrl + ");");

            if (ctrl.isMemberOfClass("GuiBitmapCtrl"))
                {
                if (((GuiControl) popup["object"])["setBitmap"].AsBool())
                    bitmapPos = popup.appendItem("Set Bitmap..." + '\t' + "" + '\t' + "getLoadFilename( \"All Image Files|*.png;*.jpeg;*.jpg;*.tga;*.jng;*.mng;*.gif;*.bmp;*.dds|png|*.png|jpeg|*.jpeg|jpg|*.jpg|tga|*.tga|jng|*.jng|mng|*.mng|gif|*.gif|bmp|*.bmp|dds|*.dds\"," + ctrl + "\".setBitmap\", \"\" );");
                }

            if (ctrl.isMemberOfClass("GuiWindowCtrl"))
                {
                if (((GuiControl) popup["object"])["setTitle"].AsBool())
                    setTitlePos = popup.appendItem("Set Title..." + '\t' + "" + '\t' + "SetTitle.loadDialog(" + ctrl + ");");
                }

            popup.showPopup(Canvas);
        }
 public virtual void updateFromChild(GuiControl ctrl)
 {
     if (ctrl.internalName == "PopupMenu")
         ((GuiControl) this.FOF("TextEdit")).call("setText", ctrl.call("getText"));
     else if (ctrl.internalName == "textEdit")
         {
         GuiPopUpMenuCtrl popup = this.FOF("PopupMenu");
         popup.changeTextById(popup.getSelected(), ctrl.call("getText"));
         onRenameItem();
         }
 }
 public void LoadControls(GuiControl obj, int paletteGroup)
 {
     GuiDynamicCtrlArrayControl ToolsPaletteArray = "ToolsPaletteArray";
     for (int i = obj.getCount(); i != 0; i--)
         {
         ((GuiControl) obj.getObject(0)).visible = false;
         ((GuiControl) obj.getObject(0))["groupNum"] = paletteGroup.AsString();
         ((GuiControl) obj.getObject(0))["paletteName"] = obj.getName();
         ToolsPaletteArray.addGuiControl(obj.getObject(0));
         }
 }
Ejemplo n.º 5
0
        public void onSelect(SimObject obj)
        {
            EditorTree EditorTree = "EditorTree";

            EditorTree.addSelection(obj, true);
            Util.setShadowVizLight(obj);
            if (obj.isObject() && obj.isMethod("onEditorSelect"))
            {
                obj.call("onEditorSelect", getSelectionSize().AsString());
            }


            EditorGui EditorGui = "EditorGui";

            EditorGui.currentEditor.onObjectSelected(obj);

            // Inform the camera

            console.commandToServer("EditorOrbitCameraSelectChange",
                                    new string[] { getSelectionSize().AsString(), getSelectionCentroid().AsString() });

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString());

            // Update the materialEditorList

            iGlobal["$Tools::materialEditorList"] = obj.getId();

            // Used to help the Material Editor( the M.E doesn't utilize its own TS control )
            // so this dirty extension is used to fake it, just like the women I use to date...
            GuiWindowCollapseCtrl womanIUseToDate = "MaterialEditorPreviewWindow";
            GuiControl            theOtherTramp   = "MaterialEditorGui";

            if (womanIUseToDate.isVisible())
            {
                theOtherTramp.call("prepareActiveObject");
            }


            // Update the Transform Selection window

            ETransformSelection ETransformSelection = "ETransformSelection";

            ETransformSelection.onSelectionChanged();
        }
Ejemplo n.º 6
0
 public void checkCursor()
 {
     for (uint i = 0; i < getCount(); i++)
     {
         GuiControl control = getObject(i);
         if (control["noCursor"] == "")
         {
             showCursor();
             return;
         }
         if (control["noCursor"] != "0" && control["noCursor"].ToLower() != "false")
         {
             continue;
         }
         showCursor();
         return;
     }
     // If we get here, every control requested a hidden cursor, so we oblige.
     hideCursor();
 }
Ejemplo n.º 7
0
        public override void onControlDropped(GuiControl payload, string position)
        {
            if (!payload.parentGroup.isInNamespaceHierarchy("GuiDragAndDropControlType_ColorSwatch"))
            {
                return;
            }

            // If dropped on same button whence we came from,
            // do nothing.

            if (payload["dragSourceControl"] == this)
            {
                return;
            }

            // If a swatch button control is dropped onto this control,
            // copy it's color.

            if (payload.isMemberOfClass("GuiSwatchButtonCtrl"))
            {
                // If the swatch button is part of a color-type inspector field,
                // remember the inspector field so we can later set the color
                // through it.

                if (this.parentGroup.isMemberOfClass("GuiInspectorTypeColorI"))
                {
                    ((GuiInspectorTypeColorI)this.parentGroup).apply(ColorPickerDlg.ColorFloatToInt(payload["color"]));
                }
                else if (this.parentGroup.isMemberOfClass("GuiInspectorTypeColorF"))
                {
                    ((GuiInspectorTypeColorF)this.parentGroup).apply(payload["color"]);
                }
                else
                {
                    this.setColor(payload["color"]);
                }
            }
        }
Ejemplo n.º 8
0
 public override void onControlDragged(GuiControl control, string dropPoint)
 {
     ((GuiControl) control.getParent()).position = this.getGlobalPosition();
 }
Ejemplo n.º 9
0
        public void transparentCheck(GuiControl ctrl, string colorName)
        {
            bool transparent = ctrl.transparentControlCheck();
            if (transparent)
                return;

            if (colorName == "fillColor")
                ColorPickerDlg.GetColorI(ctrl.controlFillColor.AsString(), ctrl + ".setControlFillColor", ctrl.getRoot(), ctrl + ".setControlFillColor", ctrl + ".setControlFillColor");
            else if (colorName == "backColor")
                ColorPickerDlg.GetColorI(ctrl.backgroundColor.AsString(), ctrl + ".setControlBackgroundColor", ctrl.getRoot(), ctrl + ".setControlBackgroundColor", ctrl + ".setControlBackgroundColor");
        }
Ejemplo n.º 10
0
 public void xmlOutput(GuiControl ctrl)
 {
     GuiControl currentObject = ctrl.getRootControl();
     bool saved = currentObject.saveToXML(sGlobal["$XMLOutput"], sGlobal["$XMLOutput"] + ".xml");
     if (saved)
         Util._echo(" Saved " + sGlobal["$XMLOutput"] + ".xml");
     else
         Util._echo("Saved failed");
 }
Ejemplo n.º 11
0
 public override void onControlInspectPreApply(GuiControl control)
 {
     SimSet set = new ObjectCreator("SimSet").Create();
     set.add(control);
     this.onPreEdit(set);
     this.pendingGenericUndoAction.actionName = "Change Properties";
     set.delete();
 }
Ejemplo n.º 12
0
public virtual  void onSelectionResized(GuiControl control){}
Ejemplo n.º 13
0
public virtual  void onControlDragExit(GuiControl control, string dropPoint){}
Ejemplo n.º 14
0
public virtual  void onRightMouseUp(GuiControl control){}
Ejemplo n.º 15
0
            public override void onControlInspectPostApply(GuiControl control)
            {
                GuiEditorTreeView GuiEditorTreeView = "GuiEditorTreeView";

                SimSet set = new ObjectCreator("SimSet").Create();
                set.add(control);
                this.onPostEdit(set);
                set.delete();
                GuiEditorTreeView.update();
            }
Ejemplo n.º 16
0
        public void close(GuiControl gui)
        {
            EditorGui EditorGui = "EditorGui";
            GuiCanvas Canvas = "Canvas";
            GuiEditorGui GuiEditorGui = "GuiEditorGui";
            EWTreeWindow EWTreeWindow = "EWTreeWindow";
            TerrainPainter TerrainPainter = "TerrainPainter";
            GuiWindowCollapseCtrl TerrainPainterPreview = "TerrainPainterPreview";
            EWInspectorWindow EWInspectorWindow = "EWInspectorWindow";
            MaterialEditorPreviewWindow MaterialEditorPreviewWindow = "MaterialEditorPreviewWindow";
            MaterialEditorPropertiesWindow MaterialEditorPropertiesWindow = "MaterialEditorPropertiesWindow";
            DatablockEditorTreeWindow DatablockEditorTreeWindow = "DatablockEditorTreeWindow";
            DatablockEditorInspectorWindow DatablockEditorInspectorWindow = "DatablockEditorInspectorWindow";
            DecalEditorGui.DecalEditorWindow DecalEditorWindow = "DecalEditorWindow";
            DecalEditorGui.DecalPreviewWindow DecalPreviewWindow = "DecalPreviewWindow";
            ForestEditorGui.ForestEditorPalleteWindow ForestEditorPalleteWindow = "ForestEditorPalleteWindow";
            ForestEditorGui.ForestEditorPropertiesWindow ForestEditorPropertiesWindow = "ForestEditorPropertiesWindow";
            MeshRoadEditorGui.MeshRoadEditorTreeWindow MeshRoadEditorTreeWindow = "MeshRoadEditorTreeWindow";
            MeshRoadEditorGui.MeshRoadEditorOptionsWindow MeshRoadEditorOptionsWindow = "MeshRoadEditorOptionsWindow";
            GuiWindowCollapseCtrl MissionAreaEditorTerrainWindow = "MissionAreaEditorTerrainWindow";
            GuiWindowCollapseCtrl MissionAreaEditorPropertiesWindow = "MissionAreaEditorPropertiesWindow";
            ParticleEditor.gui.ParticleEditor.PE_Window PE_Window = "PE_Window";
            RiverEditorGui.RiverEditorTreeWindow RiverEditorTreeWindow = "RiverEditorTreeWindow";
            RiverEditorGui.RiverEditorOptionsWindow RiverEditorOptionsWindow = "RiverEditorOptionsWindow";
            RoadEditorGui.RoadEditorTreeWindow RoadEditorTreeWindow = "RoadEditorTreeWindow";
            RoadEditorGui.RoadEditorOptionsWindow RoadEditorOptionsWindow = "RoadEditorOptionsWindow";
            ShapeEdAdvancedWindow ShapeEdAdvancedWindow = "ShapeEdAdvancedWindow";
            ShapeEdSelectWindow ShapeEdSelectWindow = "ShapeEdSelectWindow";
            ShapeEdPropWindow ShapeEdPropWindow = "ShapeEdPropWindow";
            MessageHud MessageHud = "MessageHud";

            EWTreeWindow["wasOpen"] = EWTreeWindow["isInPopup"];
            EWInspectorWindow["wasOpen"] = EWInspectorWindow["isInPopup"];
            TerrainPainter["wasOpen"] = TerrainPainter["isInPopup"];
            TerrainPainterPreview["wasOpen"] = TerrainPainterPreview["isInPopup"];
            MaterialEditorPreviewWindow["wasOpen"] = MaterialEditorPreviewWindow["isInPopup"];
            MaterialEditorPropertiesWindow["wasOpen"] = MaterialEditorPropertiesWindow["isInPopup"];
            DatablockEditorTreeWindow["wasOpen"] = DatablockEditorTreeWindow["isInPopup"];
            DatablockEditorInspectorWindow["wasOpen"] = DatablockEditorInspectorWindow["isInPopup"];
            DecalEditorWindow["wasOpen"] = DecalEditorWindow["isInPopup"];
            DecalPreviewWindow["wasOpen"] = DecalPreviewWindow["isInPopup"];
            ForestEditorPalleteWindow["wasOpen"] = ForestEditorPalleteWindow["isInPopup"];
            ForestEditorPropertiesWindow["wasOpen"] = ForestEditorPropertiesWindow["isInPopup"];
            MeshRoadEditorTreeWindow["wasOpen"] = MeshRoadEditorTreeWindow["isInPopup"];
            MeshRoadEditorOptionsWindow["wasOpen"] = MeshRoadEditorOptionsWindow["isInPopup"];
            MissionAreaEditorTerrainWindow["wasOpen"] = MissionAreaEditorTerrainWindow["isInPopup"];
            MissionAreaEditorPropertiesWindow["wasOpen"] = MissionAreaEditorPropertiesWindow["isInPopup"];
            PE_Window["wasOpen"] = PE_Window["isInPopup"];
            RiverEditorTreeWindow["wasOpen"] = RiverEditorTreeWindow["isInPopup"];
            RiverEditorOptionsWindow["wasOpen"] = RiverEditorOptionsWindow["isInPopup"];
            RoadEditorTreeWindow["wasOpen"] = RoadEditorTreeWindow["isInPopup"];
            RoadEditorOptionsWindow["wasOpen"] = RoadEditorOptionsWindow["isInPopup"];
            ShapeEdAdvancedWindow["wasOpen"] = ShapeEdAdvancedWindow["isInPopup"];
            ShapeEdSelectWindow["wasOpen"] = ShapeEdSelectWindow["isInPopup"];
            ShapeEdPropWindow["wasOpen"] = ShapeEdPropWindow["isInPopup"];

            EWTreeWindow.ClosePopOut();
            EWInspectorWindow.ClosePopOut();
            TerrainPainter.ClosePopOut();
            TerrainPainterPreview.ClosePopOut();
            MaterialEditorPreviewWindow.ClosePopOut();
            MaterialEditorPropertiesWindow.ClosePopOut();
            DatablockEditorTreeWindow.ClosePopOut();
            DatablockEditorInspectorWindow.ClosePopOut();
            DecalEditorWindow.ClosePopOut();
            DecalPreviewWindow.ClosePopOut();
            ForestEditorPalleteWindow.ClosePopOut();
            ForestEditorPropertiesWindow.ClosePopOut();
            MeshRoadEditorTreeWindow.ClosePopOut();
            MeshRoadEditorOptionsWindow.ClosePopOut();
            MissionAreaEditorTerrainWindow.ClosePopOut();
            MissionAreaEditorPropertiesWindow.ClosePopOut();
            PE_Window.ClosePopOut();
            RiverEditorTreeWindow.ClosePopOut();
            RiverEditorOptionsWindow.ClosePopOut();
            RoadEditorTreeWindow.ClosePopOut();
            RoadEditorOptionsWindow.ClosePopOut();
            ShapeEdAdvancedWindow.ClosePopOut();
            ShapeEdSelectWindow.ClosePopOut();
            ShapeEdPropWindow.ClosePopOut();

            this.editorDisabled();
            Canvas.setContent(gui);
            if (MessageHud.isObject())
                MessageHud.close();
            EditorGui.writeCameraSettings();

            Util._schedule("1000", "0", "checkCursor");
            checkCursor();
        }
Ejemplo n.º 17
0
        public static void disableLinkData(GuiControl control)
        {
            GuiCheckBoxCtrl LinkWalkFlag = control.FOT("LinkWalkFlag");
            GuiCheckBoxCtrl LinkJumpFlag = control.FOT("LinkJumpFlag");
            GuiCheckBoxCtrl LinkDropFlag = control.FOT("LinkDropFlag");
            GuiCheckBoxCtrl LinkLedgeFlag = control.FOT("LinkLedgeFlag");
            GuiCheckBoxCtrl LinkClimbFlag = control.FOT("LinkClimbFlag");
            GuiCheckBoxCtrl LinkTeleportFlag = control.FOT("LinkTeleportFlag");

            LinkWalkFlag.setActive(false);
            LinkJumpFlag.setActive(false);
            LinkDropFlag.setActive(false);
            LinkLedgeFlag.setActive(false);
            LinkClimbFlag.setActive(false);
            LinkTeleportFlag.setActive(false);
        }
Ejemplo n.º 18
0
        public static int getLinkFlags(GuiControl control)
        {
            GuiCheckBoxCtrl LinkWalkFlag = control.FOT("LinkWalkFlag");
            GuiCheckBoxCtrl LinkJumpFlag = control.FOT("LinkJumpFlag");
            GuiCheckBoxCtrl LinkDropFlag = control.FOT("LinkDropFlag");
            GuiCheckBoxCtrl LinkLedgeFlag = control.FOT("LinkLedgeFlag");
            GuiCheckBoxCtrl LinkClimbFlag = control.FOT("LinkClimbFlag");
            GuiCheckBoxCtrl LinkTeleportFlag = control.FOT("LinkTeleportFlag");

            return (LinkWalkFlag.isStateOn() ? omni.iGlobal["$Nav::WalkFlag"] : 0) | (LinkJumpFlag.isStateOn() ? omni.iGlobal["$Nav::JumpFlag"] : 0) | (LinkDropFlag.isStateOn() ? omni.iGlobal["$Nav::DropFlag"] : 0) | (LinkLedgeFlag.isStateOn() ? omni.iGlobal["$Nav::LedgeFlag"] : 0) | (LinkClimbFlag.isStateOn() ? omni.iGlobal["$Nav::ClimbFlag"] : 0) | (LinkTeleportFlag.isStateOn() ? omni.iGlobal["$Nav::TeleportFlag"] : 0);
        }
Ejemplo n.º 19
0
        public static void updateLinkData(GuiControl control, int flags)
        {
            GuiCheckBoxCtrl LinkWalkFlag = control.FOT("LinkWalkFlag");
            GuiCheckBoxCtrl LinkJumpFlag = control.FOT("LinkJumpFlag");
            GuiCheckBoxCtrl LinkDropFlag = control.FOT("LinkDropFlag");
            GuiCheckBoxCtrl LinkLedgeFlag = control.FOT("LinkLedgeFlag");
            GuiCheckBoxCtrl LinkClimbFlag = control.FOT("LinkClimbFlag");
            GuiCheckBoxCtrl LinkTeleportFlag = control.FOT("LinkTeleportFlag");
            LinkWalkFlag.setActive(true);
            LinkJumpFlag.setActive(true);
            LinkDropFlag.setActive(true);
            LinkLedgeFlag.setActive(true);
            LinkClimbFlag.setActive(true);
            LinkTeleportFlag.setActive(true);

            LinkWalkFlag.setStateOn(flags == omni.iGlobal["$Nav::WalkFlag"]);
            LinkJumpFlag.setStateOn(flags == omni.iGlobal["$Nav::JumpFlag"]);
            LinkDropFlag.setStateOn(flags == omni.iGlobal["$Nav::DropFlag"]);
            LinkLedgeFlag.setStateOn(flags == omni.iGlobal["$Nav::LedgeFlag"]);
            LinkClimbFlag.setStateOn(flags == omni.iGlobal["$Nav::ClimbFlag"]);
            LinkTeleportFlag.setStateOn(flags == omni.iGlobal["$Nav::TeleportFlag"]);
        }
Ejemplo n.º 20
0
        public void createMainControl()
        {
            GuiContainer profileControlContainer = "profileControlContainer";

            profileControlContainer.clear();

            Point2I position = new Point2I(profileControlContainer.getExtent().x/2 - 15, profileControlContainer.getExtent().y/2 - 15);

            if (externalControl == "")
                {
                if (controlProfile["controlBound"] != "All")
                    mainGuiControl = Util.eval("return %temp = new " + controlProfile["controlBound"] + "() { HorizSizing = \"center\"; text= \"TEXT\"; VertSizing = \"center\"; Extent = \"130 30\"; internalName = \"tempGuiControl\"; Position =\"" + position.x + " " + position.y + "\"; };");
                else
                    mainGuiControl = Util.eval("return %temp = new GuiControl() { HorizSizing = \"center\"; VertSizing = \"center\"; Extent = \"130 30\"; internalName = \"tempGuiControl\"; Position =\"" + position.x + " " + position.y + "\"; };");
                }
            else
                mainGuiControl = Util.eval("return %temp = new " + externalControl + "() { HorizSizing = \"center\"; text= \"TEXT\"; VertSizing = \"center\"; Extent = \"130 30\"; internalName = \"tempGuiControl\"; Position =\"" + position.x + " " + position.y + "\"; };");

            mainGuiControl.setProfile(controlProfile);
            profileControlContainer.addGuiControl(mainGuiControl);
        }
Ejemplo n.º 21
0
 public static void SetToggleButtonValue(GuiControl ctrl, string value)
 {
     if (ctrl.getValue() != value)
         ctrl.call("performClick");
 }
Ejemplo n.º 22
0
 public void setContent(GuiControl ctrl)
 {
     base.setContent(ctrl);
     this.checkCursor();
 }
Ejemplo n.º 23
0
public virtual  void onControlDropped(GuiControl control, string dropPoint){}
Ejemplo n.º 24
0
        public void loadDialog(GuiControl ctrl)
        {
            GuiCanvas Canvas = "Canvas";
            GuiTextEditCtrl fontSizeText = "fontSizeText";

            this["ctrl"] = ctrl;
            this["oldFontSize"] = ctrl.getControlFontSize().AsString();
            Canvas.pushDialog(this);
            fontSizeText.text = this["oldFontSize"];
        }
Ejemplo n.º 25
0
public virtual  void onAddSelected(GuiControl control){}
Ejemplo n.º 26
0
public virtual  void onSelectionMoved(GuiControl control){}
Ejemplo n.º 27
0
        public override void onControlDropped(GuiControl control, string dropPoint)
        {
            TerrainEditor ETerrainEditor = "ETerrainEditor";

            string srcBtn = control["dragSourceControl"];
            GuiControl dstBtn = this;
            GuiControl stack = this.getParent();
            // Not dropped on a valid Button.
            // Really this shouldnt happen since we are in a callback on our specialized
            // EPainterIconBtn namespace.

            if (stack != dstBtn.getParent() || stack != "EPainterStack".getID())
                {
                console.print("Not dropped on valid control");
                return;
                }
            // Dropped on the original control, no order change.
            // Simulate a click on the control, instead of a drag/drop.
            if (srcBtn == dstBtn)
                {
                dstBtn.call("performClick");
                return;
                }

            int dstIndex = stack.getObjectIndex(dstBtn);

            ETerrainEditor.reorderMaterial(stack.getObjectIndex(srcBtn), dstIndex);

            // select the button/material we just reordered.

            stack.getObject((uint) dstIndex).call("performClick");
        }
Ejemplo n.º 28
0
 public void setContent(GuiControl ctrl)
 {
     base.setContent(ctrl);
     this.checkCursor();
 }
Ejemplo n.º 29
0
 public static void messageCallback(GuiControl dlg, string callback)
 {
     ((GuiCanvas) "Canvas").popDialog(dlg);
     if (callback.Trim() != "")
         omni.Util.eval(callback);
     //omni.console.Eval(callback);
 }
Ejemplo n.º 30
0
public virtual  void onRemoveSelected(GuiControl control){}
Ejemplo n.º 31
0
 public static void IOCallback(GuiControl dlg, string callback)
 {
     GuiPopUpMenuCtrl IODropdownMenu = "IODropdownMenu";
     int id = IODropdownMenu.getSelected();
     string text = IODropdownMenu.getTextById(id);
     callback = callback.Replace("#", text);
     omni.console.Eval(callback);
     ((GuiCanvas) "Canvas").popDialog(dlg);
 }
Ejemplo n.º 32
0
public virtual  void onAddNewCtrl(GuiControl control){}
Ejemplo n.º 33
0
 public bool getEnableResultFromControl(GuiControl control)
 {
     return (control.getValue().AsInt() == 1);
 }
Ejemplo n.º 34
0
public virtual  void onControlInspectPostApply(GuiControl control){}
Ejemplo n.º 35
0
        public void loadDialog(GuiControl ctrl)
        {
            GuiCanvas Canvas = "Canvas";
            GuiSliderCtrl AlphaLevelSlider = "AlphaLevelSlider";
            GuiSliderCtrl MouseOverAlphaLevelSlider = "MouseOverAlphaLevelSlider";
            GuiTextEditCtrl AlphaLevelText = "AlphaLevelText";
            GuiTextEditCtrl MouseOverAlphaLevelText = "MouseOverAlphaLevelText";
            GuiTextEditCtrl AlphaFadeTimeText = "AlphaFadeTimeText";

            this["ctrl"] = ctrl;
            this.checkAllowedDialogs();
            Canvas.pushDialog(this);

            if (this.ctrl["alpha"].AsBool())
                {
                this["oldAlphaValue"] = ctrl.getAlphaValue().AsString();
                AlphaLevelSlider["value"] = this["oldAlphaValue"];
                AlphaLevelText["text"] = this["oldAlphaValue"];
                }
            if (this.ctrl.mouseOverAlpha)
                {
                this["oldMouseOverAlphaValue"] = ctrl.getMouseOverAlphaValue().AsString();
                MouseOverAlphaLevelSlider["value"] = this["oldMouseOverAlphaValue"];
                MouseOverAlphaLevelText["text"] = this["oldMouseOverAlphaValue"];
                }
            if (this.ctrl.alphaFade)
                {
                this["oldAlphaFadeTime"] = ctrl.getAlphaFadeTime().AsString();
                AlphaFadeTimeText["text"] = this["oldAlphaFadeTime"];
                }
        }