Exemplo n.º 1
0
        /// <summary>
        /// Initializes the GUI elements for the entry.
        /// </summary>
        /// <param name="parent">Scroll area into whose layout to insert the GUI elements.</param>
        internal void Initialize(GUIListViewBase <TData> parent)
        {
            this.parent = parent;

            GUIScrollArea scrollArea  = parent.ScrollArea;
            int           numElements = scrollArea.Layout.ChildCount;

            // Last panel is always the padding panel, so keep it there
            panel  = scrollArea.Layout.InsertPanel(numElements - 1);
            layout = panel.AddLayoutY();

            BuildGUI();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new empty list view.
        /// </summary>
        /// <param name="width">Width of the list view, in pixels.</param>
        /// <param name="height">Height of the list view, in pixels.</param>
        /// <param name="entryHeight">Height of a single element in the list, in pixels.</param>
        /// <param name="layout">GUI layout into which the list view will be placed into.</param>
        protected GUIListViewBase(int width, int height, int entryHeight, GUILayout layout)
        {
            scrollArea = new GUIScrollArea(ScrollBarType.ShowIfDoesntFit, ScrollBarType.NeverShow,
                                           GUIOption.FixedWidth(width), GUIOption.FixedHeight(height));
            layout.AddElement(scrollArea);

            topPadding    = new GUILabel(new LocString());
            bottomPadding = new GUILabel(new LocString());

            scrollArea.Layout.AddElement(topPadding);
            scrollArea.Layout.AddElement(bottomPadding);

            this.width       = width;
            this.height      = height;
            this.entryHeight = entryHeight;
        }
Exemplo n.º 3
0
 private static extern void Internal_CreateInstance(GUIScrollArea instance, ScrollBarType vertBarType, ScrollBarType horzBarType,
                                                    string scrollBarStyle, string scrollAreaStyle, params GUIOption[] options);
Exemplo n.º 4
0
 /// <summary>
 /// Internal method used by the runtime. Initializes a managed version of the vertical layout that is referenced
 /// by a native GUI scroll area element.
 /// </summary>
 /// <param name="parentArea">Scroll area of which we want to reference the layout of.</param>
 internal GUILayoutY(GUIScrollArea parentArea)
 {
     Internal_CreateInstanceYFromScrollArea(this, parentArea);
 }
Exemplo n.º 5
0
 protected static extern void Internal_CreateInstanceYFromScrollArea(GUILayout instance, GUIScrollArea parentArea);