Esempio n. 1
0
 /// <description>
 /// Add a new row.
 /// </description>
 public void AddRow()
 {
     InternalUnsafeMethods.AddRow__Args _args = new InternalUnsafeMethods.AddRow__Args()
     {
     };
     InternalUnsafeMethods.AddRow()(ObjectPtr, _args);
 }
        /// <summary>Adds a new row at end of the list with the defined id and text.</summary>
        /// <description>
        /// If index is used, then the new row is inserted at the row location of 'index'.
        /// </description>
        /// <param name="id">Id of the new row.</param>
        /// <param name="text">Text to display at the new row.</param>
        /// <param name="index">Index to insert the new row at. If not used, new row will be placed at the end of the list.</param>
        /// <code>
        /// // Define the id
        /// %id = "4";
        ///
        /// // Define the text to display
        /// %text = "Display Text"
        ///
        /// // Define the index (optional)
        /// %index = "2"
        ///
        /// // Inform the GuiTextListCtrl control to add the new row with the defined information.
        /// %rowIndex = %thisGuiTextListCtrl.addRow(%id,%text,%index);
        /// </code>
        /// <returns>Returns the row index of the new row. If 'index' was defined, then this just returns the number of rows in the list.</returns>
        /// <see cref="References" />
        public int AddRow(int id = 0, string text = "", int index = -1)
        {
            InternalUnsafeMethods.AddRow__Args _args = new InternalUnsafeMethods.AddRow__Args()
            {
                id    = id,
                text  = text,
                index = index,
            };
            int _engineResult = InternalUnsafeMethods.AddRow()(ObjectPtr, _args);

            return(_engineResult);
        }
 /// <description>
 /// Add a row to the list control.
 /// </description>
 /// <param name="label">The text to display on the row as a label.</param>
 /// <param name="callback">Name of a script function to use as a callback when this row is activated.</param>
 /// <param name="icon">[optional] Index of the icon to use as a marker.</param>
 /// <param name="yPad">[optional] An extra amount of height padding before the row. Does nothing on the first row.</param>
 /// <param name="useHighlightIcon">[optional] Does this row use the highlight icon?.</param>
 /// <param name="enabled">[optional] If this row is initially enabled.</param>
 public void AddRow(string label, string callback, int icon = -1, int yPad = 0, bool useHighlightIcon = true, bool enabled = true)
 {
     InternalUnsafeMethods.AddRow__Args _args = new InternalUnsafeMethods.AddRow__Args()
     {
         label            = label,
         callback         = callback,
         icon             = icon,
         yPad             = yPad,
         useHighlightIcon = useHighlightIcon,
         enabled          = enabled,
     };
     InternalUnsafeMethods.AddRow()(ObjectPtr, _args);
 }
Esempio n. 4
0
 /// <description>
 /// Add a row to the list control.
 /// </description>
 /// <param name="label">The text to display on the row as a label.</param>
 /// <param name="options">A tab separated list of options.</param>
 /// <param name="wrapOptions">Specify true to allow options to wrap at each end or false to prevent wrapping.</param>
 /// <param name="callback">Name of a script function to use as a callback when this row is activated.</param>
 /// <param name="icon">[optional] Index of the icon to use as a marker.</param>
 /// <param name="yPad">[optional] An extra amount of height padding before the row. Does nothing on the first row.</param>
 /// <param name="enabled">[optional] If this row is initially enabled.</param>
 public void AddRow(string label, string options, bool wrapOptions, string callback, int icon = -1, int yPad = 0, bool enabled = true)
 {
     InternalUnsafeMethods.AddRow__Args _args = new InternalUnsafeMethods.AddRow__Args()
     {
         label       = label,
         options     = options,
         wrapOptions = wrapOptions,
         callback    = callback,
         icon        = icon,
         yPad        = yPad,
         enabled     = enabled,
     };
     InternalUnsafeMethods.AddRow()(ObjectPtr, _args);
 }