Example #1
0
 //        -----------------------------------------------------------------------------
 //		| Internal method - cleans up an expanded menu.
 //		-----------------------------------------------------------------------------
 protected void retract()
 {
     isDragging = false;
     isExpanded = false;
     expandedBoxElement.Hide();
     textAreaElement.Show();
     smallBoxElement.Show();
     smallBoxElement.MaterialName       = ("SdkTrays/MiniTextBox");
     smallBoxElement.BorderMaterialName = ("SdkTrays/MiniTextBox");
 }
        public Text(string name, Vector3 dimensions, QGuiMetricsMode positionMode, QGuiMetricsMode sizeMode, OverlayContainer overlayContainer, Widget ParentWidget) : base(name, new Vector4(dimensions.x, dimensions.y, 0, dimensions.z), positionMode, sizeMode, "", overlayContainer, ParentWidget)
        {
            mTextCursorHidden = true;
            mCursorIndex      = 0;
            mCursorOffset     = -3;

            mWidgetType     = Widget.WidgetType.QGUI_TYPE_TEXT;
            mTruncateMode   = TruncateMode.RIGHT;
            mFeedbackString = "...";
            mCursorPositions.Add(-5);

            mTextAreaOverlayElement = createTextAreaOverlayElement(mInstanceName + ".Caption", mPixelDimensions, "");
            mOverlayElement         = mTextAreaOverlayElement;
            mOverlayContainer.AddChild(mOverlayElement);
            mTextAreaOverlayElement.Show();
            mTextAreaOverlayElement.FontName   = mFont;
            mTextAreaOverlayElement.CharHeight = mPixelDimensions.w;

            string tcMaterial = getSheet().getDefaultSkin() + ".textcursor";

            mTextCursor = new TextCursor(mInstanceName + ".TextCursor", new Vector4(0, 0, 0, 1), QGuiMetricsMode.QGUI_GMM_RELATIVE, QGuiMetricsMode.QGUI_GMM_RELATIVE, tcMaterial, mChildrenContainer, this);
            mTextCursor.setZOrderOffset(1, false);
            mTextCursor.hide();
        }
Example #3
0
 public void Show()
 {
     _TextArea.Show();
 }