Ejemplo n.º 1
0
 /// <summary>
 /// Creates RectI
 /// </summary>
 /// <param name="point"></param>
 /// <param name="extent"></param>
 public RectI(Point2I point, Point2I extent)
 {
     _mPoint_x  = point.x;
     _mPoint_y  = point.y;
     _mExtent_x = extent.x;
     _mExtent_y = extent.y;
     //_mPoint = point;
     //_mPoint.DetachAllEvents();
     //_mExtent = extent;
     //_mExtent.DetachAllEvents();
     //_mPoint.OnChangeNotification += __OnChangeNotification;
     //_mExtent.OnChangeNotification += __OnChangeNotification;
 }
Ejemplo n.º 2
0
        public void open()
        {
            const int offset = 6;

            if (isVisible())
                return;

            string text = this[this + ".isTeamMsg"].AsBool() ? "TEAM:" : "GLOBAL:";

            GuiTextCtrl MessageHud_Text = "MessageHud_Text";

            MessageHud_Text.setValue(text);

            GuiBitmapBorderCtrl outerChatHud = "outerChatHud";
            GuiBitmapBorderCtrl MessageHud_Frame = "MessageHud_Frame";

            Point2I windowPos = new Point2I(0, (outerChatHud.position.y + outerChatHud.extent.y + 1));

            Point2I windowExt = new Point2I(outerChatHud.extent.x, MessageHud_Frame.extent.y);

            int textExtent = MessageHud_Text.extent.x + 14;

            int ctrlExtent = MessageHud_Frame.extent.x;

            ((GuiCanvas) "Canvas").pushDialog(this);

            MessageHud_Frame.position = windowPos;

            MessageHud_Frame.extent = windowExt;

            GuiTextEditCtrl MessageHud_Edit = "MessageHud_Edit";

            MessageHud_Edit.position = new Point2I(textExtent + offset, MessageHud_Edit.position.y);

            MessageHud_Edit.extent = new Point2I(ctrlExtent - textExtent - (2*offset), MessageHud_Edit.extent.y);

            setVisible(true);

            MessageHud_Edit.makeFirstResponder(true);
        }
Ejemplo n.º 3
0
public  string getClickVector(Point2I mousePoint){

return pInvokes.m_ts.fnGuiTSCtrl_getClickVector(_ID, mousePoint.AsString());
}
Ejemplo n.º 4
0
public  Point2I screenToClient(Point2I coordinate){

return new Point2I ( pInvokes.m_ts.fnGuiCanvas_screenToClient(_ID, coordinate.AsString()));
}
Ejemplo n.º 5
0
public  void setCursorPos(Point2I pos){

pInvokes.m_ts.fn_GuiCanvas_setCursorPos(_ID, pos.AsString());
}
Ejemplo n.º 6
0
        public static void MBOKCancelDetailsToggleInfoFrame()
        {
            GuiScrollCtrl MBOKCancelDetailsScroll = "MBOKCancelDetailsScroll";
            if (!MBOKCancelDetailsScroll.isVisible())
                {
                MBOKCancelDetailsScroll.setVisible(true);
                GuiMLTextCtrl MBOKCancelDetailsText = "MBOKCancelDetailsText";
                Point2I textExtent = MBOKCancelDetailsText.getExtent();
                int textExtentY = textExtent.y;
                Point2I textPos = MBOKCancelDetailsText.getPosition();
                int textPosY = textPos.y;

                int verticalStretch = textExtentY;

                if (verticalStretch > 260 || verticalStretch < 0)
                    verticalStretch = 260;

                Point2I extent = new Point2I(((GuiWindowCtrl) "MBOKCancelDetailsFrame")["defaultExtent"]);
                int height = extent.y;

                int posY = textPosY + textExtentY + 10;

                int posX = MBOKCancelDetailsScroll.getPosition().x;

                MBOKCancelDetailsScroll.setPosition(posX, posY);
                MBOKCancelDetailsScroll.setExtent(new Point2F(MBOKCancelDetailsScroll.extent.x, verticalStretch));
                ((GuiWindowCtrl) "MBOKCancelDetailsFrame").setExtent(new Point2F(300, (height + verticalStretch + 10)));
                }
            else
                {
                Point2I extent = new Point2I(((GuiWindowCtrl) "MBOKCancelDetailsFrame")["defaultExtent"]);
                int width = extent.x;
                int height = extent.y;
                ((GuiWindowCtrl) "MBOKCancelDetailsFrame").setExtent(new Point2F(width, height));
                MBOKCancelDetailsScroll.setVisible(false);
                }
        }
Ejemplo n.º 7
0
/// <summary>
/// Sets the current position of the selector)
/// </summary>
public  void GuiColorPickerCtrl_setSelectorPos(string guicolorpickerctrl, Point2I newPos){


m_ts.fn_GuiColorPickerCtrl_setSelectorPos(guicolorpickerctrl, newPos.AsString());
}
Ejemplo n.º 8
0
/// <summary>
/// Translate a coordinate from screen-space to canvas window-space.   @param coordinate The coordinate in screen-space.   @return The given coordinate translated to window-space. )
/// </summary>
public  Point2I screenToClient(string guicanvas, Point2I coordinate){


return new Point2I ( m_ts.fnGuiCanvas_screenToClient(guicanvas, coordinate.AsString()));
}
Ejemplo n.º 9
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.º 10
0
 /// <summary>
 /// Creates RectI
 /// </summary>
 /// <param name="point"></param>
 /// <param name="extent"></param>
 public RectI(Point2I point, Point2I extent)
 {
     _mPoint_x = point.x;
     _mPoint_y = point.y;
     _mExtent_x = extent.x;
     _mExtent_y = extent.y;
     //_mPoint = point;
     //_mPoint.DetachAllEvents();
     //_mExtent = extent;
     //_mExtent.DetachAllEvents();
     //_mPoint.OnChangeNotification += __OnChangeNotification;
     //_mExtent.OnChangeNotification += __OnChangeNotification;
 }
Ejemplo n.º 11
0
 public static void setVideoModeForOculusVRDisplay(string fullscreen)
 {
     if (!omni.Util.isFunction("isOculusVRDeviceActive"))
         return;
     Point2I res = new Point2I(omni.Util._call("getOVRHMDResolution", "0"));
     ((GuiCanvas) "canvas").setVideoMode((uint) res.x, (uint) res.y, fullscreen.AsBool(), 32, 4);
 }
public virtual  void onRightMouseDragged(byte modifier, Point2I mousePoint, byte mouseClickCount){}
public virtual  void onMouseLeave(byte modifier, Point2I mousePoint, byte mouseClickCount){}
Ejemplo n.º 14
0
        public void next()
        {
            // Set us to a blank screen while we load the next one
            GuiCanvas Canvas = "Canvas";
            Canvas.setContent("BlankGui");
            // Set our bitmap and reset the done variable

            this.setBitmapX(this["bitmap" + mStartupIdx]);
            done = false;

            // If we have a logo then set it
            GuiBitmapButtonCtrl StartupLogo = findObjectByInternalName("StartupLogo", false);

            if (StartupLogo.isObject())
                {
                if (this["logo" + mStartupIdx] != "")
                    {
                    StartupLogo.setBitmap(this["logo" + mStartupIdx]);
                    if (this["logoPos" + mStartupIdx] != "")
                        {
                        Point2I logoPos = new Point2I(this["logoPos" + mStartupIdx]);
                        StartupLogo.setPosition(logoPos.x, logoPos.y);
                        }
                    if (this["logoExtent" + mStartupIdx] != "")
                        StartupLogo.setExtent(new Point2F(this["logoExtent" + mStartupIdx]));

                    StartupLogo.setVisible(true);
                    }
                else
                    StartupLogo.setVisible(false);
                }

            GuiBitmapButtonCtrl StartupLogoSecondary = findObjectByInternalName("StartupLogoSecondary", false);
            if (StartupLogoSecondary.isObject())
                {
                if (this["seclogo" + mStartupIdx] != "")
                    {
                    StartupLogoSecondary.setBitmap(this["seclogo" + mStartupIdx]);
                    if (this["seclogoPos" + mStartupIdx] != "")
                        {
                        Point2I logoPos = new Point2I(this["seclogoPos" + mStartupIdx]);
                        StartupLogoSecondary.setPosition(logoPos.x, logoPos.y);
                        }
                    if (this["seclogoExtent" + mStartupIdx] != "")
                        StartupLogoSecondary.setExtent(new Point2F(this["seclogoExtent" + mStartupIdx]));

                    StartupLogoSecondary.setVisible(true);
                    }
                else
                    StartupLogoSecondary.setVisible(false);
                }

            mStartupIdx++;

            ((GuiCanvas) "Canvas").setContent(this);
        }
Ejemplo n.º 15
0
/// <summary>
/// Move all controls in the selection by (dx,dy) pixels.)
/// </summary>
public  void GuiEditCtrl_moveSelection(string guieditctrl, Point2I pos){


m_ts.fn_GuiEditCtrl_moveSelection(guieditctrl, pos.AsString());
}
Ejemplo n.º 16
0
/// <summary>
/// Translate a coordinate from canvas window-space to screen-space.   @param coordinate The coordinate in window-space.   @return The given coordinate translated to screen-space. )
/// </summary>
public  Point2I clientToScreen(string guicanvas, Point2I coordinate){


return new Point2I ( m_ts.fnGuiCanvas_clientToScreen(guicanvas, coordinate.AsString()));
}
Ejemplo n.º 17
0
/// <summary>
/// )
/// </summary>
public  string getClickVector(string guitsctrl, Point2I mousePoint){


return m_ts.fnGuiTSCtrl_getClickVector(guitsctrl, mousePoint.AsString());
}
Ejemplo n.º 18
0
/// <summary>
/// Set the position of the platform window associated with the canvas.   @param position The new position of the window in screen-space. )
/// </summary>
public  void setWindowPosition(string guicanvas, Point2I position){


m_ts.fnGuiCanvas_setWindowPosition(guicanvas, position.AsString());
}
Ejemplo n.º 19
0
/// <summary>
/// )
/// </summary>
public  string getWorldPosition(string guitsctrl, Point2I mousePoint){


return m_ts.fnGuiTSCtrl_getWorldPosition(guitsctrl, mousePoint.AsString());
}
public  void setSelectorPos(Point2I newPos){

pInvokes.m_ts.fn_GuiColorPickerCtrl_setSelectorPos(_ID, newPos.AsString());
}
Ejemplo n.º 21
0
/// <summary>
/// Location)
/// </summary>
public  void TerrainEditor_setBrushPos(string terraineditor, Point2I pos){


m_ts.fn_TerrainEditor_setBrushPos(terraineditor, pos.AsString());
}
Ejemplo n.º 22
0
public  void setBrushPos(Point2I pos){

pInvokes.m_ts.fn_TerrainEditor_setBrushPos(_ID, pos.AsString());
}
Ejemplo n.º 23
0
/// <summary>
/// Return the integer character code value corresponding to the first character in the given string.
/// )
/// 
/// </summary>
public  Point2I dnt_testcase_8(Point2I chr){


return new Point2I ( m_ts.fn_dnt_testcase_8(chr.AsString()));
}
Ejemplo n.º 24
0
public  Point2I clientToScreen(Point2I coordinate){

return new Point2I ( pInvokes.m_ts.fnGuiCanvas_clientToScreen(_ID, coordinate.AsString()));
}
Ejemplo n.º 25
0
/// <summary>
/// THEORA, 30.0f, Point2I::Zero ),   Load a journal file and capture it video.   @ingroup Rendering )
/// </summary>
public  void playJournalToVideo(string journalFile, string videoFile = null , string encoder = "THEORA", float framerate = 30.0f, Point2I resolution = null ){
if (videoFile== null) {videoFile = null;}
if (resolution== null) {resolution = new Point2I(0,0);}


m_ts.fn_playJournalToVideo(journalFile, videoFile, encoder, framerate, resolution.AsString());
}
Ejemplo n.º 26
0
public  void setWindowPosition(Point2I position){

pInvokes.m_ts.fnGuiCanvas_setWindowPosition(_ID, position.AsString());
}
Ejemplo n.º 27
0
/// <summary>
/// THEORA, 30.0f, Point2I::Zero ),   Begins a video capture session.   @see stopVideoCapture   @ingroup Rendering )
/// </summary>
public  void startVideoCapture(string canvas, string filename, string encoder = "THEORA", float framerate = 30.0f, Point2I resolution = null ){
if (resolution== null) {resolution = new Point2I(0,0);}


m_ts.fn_startVideoCapture(canvas, filename, encoder, framerate, resolution.AsString());
}
Ejemplo n.º 28
0
public  string getWorldPosition(Point2I mousePoint){

return pInvokes.m_ts.fnGuiTSCtrl_getWorldPosition(_ID, mousePoint.AsString());
}
Ejemplo n.º 29
0
/// <summary>
/// (Point2I pos)			  @hide)
/// </summary>
public  void GuiCanvas_setCursorPos(string guicanvas, Point2I pos){


m_ts.fn_GuiCanvas_setCursorPos(guicanvas, pos.AsString());
}
Ejemplo n.º 30
0
public  void moveSelection(Point2I pos){

pInvokes.m_ts.fn_GuiEditCtrl_moveSelection(_ID, pos.AsString());
}
Ejemplo n.º 31
0
 public override void onResize(string width, string maxY)
 {
     position = new Point2I(0, 0);
 }