Esempio n. 1
0
        public ParamsPanel(string name, float width, int lines)
        {
            OverlayElement = OverlayManager.Singleton.CreateOverlayElementFromTemplate("SdkTrays/ParamsPanel", "BorderPanel", name);
            OverlayContainer c = (OverlayContainer)OverlayElement;

            _namesArea            = (TextAreaOverlayElement)c.GetChild(Name + "/ParamsPanelNames");
            _valuesArea           = (TextAreaOverlayElement)c.GetChild(Name + "/ParamsPanelValues");
            OverlayElement.Width  = width;
            OverlayElement.Height = _namesArea.Top * 2 + lines * _namesArea.CharHeight;
        }
Esempio n. 2
0
        // Do not instantiate any widgets directly. Use SdkTrayManager.
        public ParamsPanelWidget(string name, float width, uint lines)
        {
            element = OverlayManager.Singleton.CreateOverlayElementFromTemplate("SdkTrays/ParamsPanel", "BorderPanel", name);
            OverlayContainer c = (OverlayContainer)element;

            namesAreaElement  = (TextAreaOverlayElement)c.GetChild(Name + "/ParamsPanelNames");
            valuesAreaElement = (TextAreaOverlayElement)c.GetChild(Name + "/ParamsPanelValues");

            element.Width  = (width);
            element.Height = (namesAreaElement.Top * 2f + lines * namesAreaElement.CharHeight);
        }
Esempio n. 3
0
        //private bool dragging;
        public ListView(string name, float left, float top, float height, float width, List <string> columnNames)
        {
            listview        = OverlayManager.Singleton.CreateOverlayElementFromTemplate("AMGE/UI/ListView", "BorderPanel", name) as OverlayContainer;
            scroll          = listview.GetChild(name + "/ListViewScroll") as BorderPanelOverlayElement;
            drag            = scroll.GetChild(name + "/ListViewScroll" + "/ListViewDrag") as OverlayElement;
            this.name       = name;
            this.top        = top;
            this.height     = height;
            this.width      = width;
            this.left       = left;
            listview.Top    = top;
            listview.Left   = left;
            listview.Height = height;
            listview.Width  = width;
            scroll.Height   = height - 0.016f;
            drag.Hide();

            //remove column's height
            maxShowItem     = System.Math.Floor(Convert.ToDouble(float.Parse((height - 0.04f).ToString("0.00")) / 0.045f));
            columns         = new List <ListViewColumn>();
            items           = new List <ListViewItem>();
            visibleItems    = new List <ListViewItem>();
            allUsedElements = new List <OverlayElement>();

            mElement = listview;

            LoadColumns(columnNames);
        }
Esempio n. 4
0
        public StaticMultiLineTextBoxWidget(string name, string caption, float width, float height)
        {
            element        = OverlayManager.Singleton.CreateOverlayElementFromTemplate("SdkTrays/TextBox", "BorderPanel", name);
            element.Width  = (width);
            element.Height = (height);
            OverlayContainer container = (OverlayContainer)element;

            textArea         = (TextAreaOverlayElement)container.GetChild(Name + "/TextBoxText");
            captionBar       = (BorderPanelOverlayElement)container.GetChild(Name + "/TextBoxCaptionBar");
            captionBar.Width = (width - 4f);
            captionTextArea  = (TextAreaOverlayElement)captionBar.GetChild(captionBar.Name + "/TextBoxCaption");
            setCaption(caption);
            scrollTrack  = (BorderPanelOverlayElement)container.GetChild(Name + "/TextBoxScrollTrack");
            scrollHandle = (PanelOverlayElement)scrollTrack.GetChild(scrollTrack.Name + "/TextBoxScrollHandle");
            scrollHandle.Hide();
            dragging         = false;
            scrollPercentage = 0f;
            startingLine     = 0;
            contentPadding   = 15f;
            originalText     = "";

            refitContents();
        }
Esempio n. 5
0
 public Mogre.OverlayElement GetCursorImage()
 {
     return(cursor.GetChild(cursor.Name + "/CursorImage"));
 }
Esempio n. 6
0
 public OverlayElement GetCursorImage()
 {
     return(_cursor.GetChild(_cursor.Name + "/CursorImage"));
 }