コード例 #1
0
 /// <summary>
 /// Creates RectI from string
 /// </summary>
 /// <param name="recti"></param>
 public RectI(string recti)
 {
     string[] vals = recti.Split(' ');
     _mPoint  = new Point2I(vals[0].AsInt(), vals[1].AsInt());
     _mExtent = new Point2I(vals[2].AsInt(), vals[3].AsInt());
     _mPoint.OnChangeNotification  += __OnChangeNotification;
     _mExtent.OnChangeNotification += __OnChangeNotification;
 }
コード例 #2
0
 /// <summary>
 /// Creates RectI
 /// </summary>
 /// <param name="point"></param>
 /// <param name="extent"></param>
 public RectI(Point2I point, Point2I extent)
 {
     _mPoint = point;
     _mPoint.DetachAllEvents();
     _mExtent = extent;
     _mExtent.DetachAllEvents();
     _mPoint.OnChangeNotification  += __OnChangeNotification;
     _mExtent.OnChangeNotification += __OnChangeNotification;
 }
コード例 #3
0
        public void MessageHudOpen(coGuiControl thisobj)
            {
            const int offset = 6;

            if (thisobj.isVisible())
                return;


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

            coGuiTextCtrl MessageHud_Text = "MessageHud_Text";

            MessageHud_Text.setValue(text);

            coGuiBitmapBorderCtrl outerChatHud = "outerChatHud";
            coGuiBitmapBorderCtrl MessageHud_Frame = "MessageHud_Frame";

            //string windowPos = "0 " + outerChatHud["position"].Split(' ')[1] + (outerChatHud["extent"].Split(' ')[1].AsInt() + 1);
            Point2I windowPos = new Point2I(0, (outerChatHud.position.y + outerChatHud.extent.y + 1));

            //            string windowExt = outerChatHud["extent"].Split(' ')[0] + " " + MessageHud_Frame["extent"].Split(' ')[1];
            Point2I windowExt = new Point2I(outerChatHud.extent.x, MessageHud_Frame.extent.y);


            //int textExtent = MessageHud_Text["extent"].Split(' ')[0].AsInt() + 14;
            int textExtent = MessageHud_Text.extent.x + 14;
            //int ctrlExtent = MessageHud_Frame["extent"].Split(' ')[0].AsInt();
            int ctrlExtent = MessageHud_Frame.extent.x;

            ((coGuiCanvas)"Canvas").pushDialog(thisobj);

            MessageHud_Frame.position = windowPos;
            MessageHud_Frame.extent = windowExt;

            coGuiTextEditCtrl MessageHud_Edit = "MessageHud_Edit";

            MessageHud_Edit.position.x = textExtent + offset;


            MessageHud_Edit.extent.x = (ctrlExtent - textExtent - (2*offset));

            thisobj.setVisible(true);

            console.Call("deactivateKeyboard");

            MessageHud_Edit.makeFirstResponder(true.AsString());
            }
コード例 #4
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());
}
コード例 #5
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()));
}
コード例 #6
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()));
}
コード例 #7
0
/// <summary>
/// THEORA, 30.0f, Point2I( 0, 0 ) ),
///    Begins a video capture session.
///    @see stopVideoCapture
///    @ingroup Rendering )
/// 
/// </summary>
public  void startVideoCapture(string canvas, string filename, string encoder, float framerate, Point2I resolution){
m_ts.fn_startVideoCapture(canvas, filename, encoder, framerate, resolution.AsString());
}
コード例 #8
0
/// <summary>
/// THEORA, 30.0f, Point2I( 0, 0 ) ),
///    Load a journal file and capture it video.
///    @ingroup Rendering )
/// 
/// </summary>
public  void playJournalToVideo(string journalFile, string videoFile, string encoder, float framerate, Point2I resolution){
m_ts.fn_playJournalToVideo(journalFile, videoFile, encoder, framerate, resolution.AsString());
}
コード例 #9
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(Point2I position)
     {
     TorqueScriptTemplate.m_ts.fnGuiCanvas_setWindowPosition(_mSimObjectId, position.AsString());
     }
コード例 #10
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(Point2I coordinate)
     {
     return new Point2I(TorqueScriptTemplate.m_ts.fnGuiCanvas_screenToClient(_mSimObjectId, coordinate.AsString()));
     }
コード例 #11
0
 /// <summary>
 /// Creates RectI
 /// </summary>
 /// <param name="point"></param>
 /// <param name="extent"></param>
 public RectI(Point2I point, Point2I extent)
     {
     _mPoint = point;
     _mPoint.DetachAllEvents();
     _mExtent = extent;
     _mExtent.DetachAllEvents();
     _mPoint.OnChangeNotification += __OnChangeNotification;
     _mExtent.OnChangeNotification += __OnChangeNotification;
     }
コード例 #12
0
 /// <summary>
 /// Creates RectI from string
 /// </summary>
 /// <param name="recti"></param>
 public RectI(string recti)
     {
     string[] vals = recti.Split(' ');
     _mPoint = new Point2I(vals[0].AsInt(), vals[1].AsInt());
     _mExtent = new Point2I(vals[2].AsInt(), vals[3].AsInt());
     _mPoint.OnChangeNotification += __OnChangeNotification;
     _mExtent.OnChangeNotification += __OnChangeNotification;
     }
コード例 #13
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()));
     }