Package rope.gui

Class R_Dropdown

All Implemented Interfaces:
R_Constants, R_Constants_Colour, R_GUI

public class R_Dropdown extends Crope implements R_GUI
  • Constructor Details

    • R_Dropdown

      public R_Dropdown()
      CONSTRUCTOR
    • R_Dropdown

      public R_Dropdown(vec2 pos, vec2 size)
  • Method Details

    • set_header_text_pos

      public R_Dropdown set_header_text_pos(vec2 pos)
    • set_header_text_pos

      public R_Dropdown set_header_text_pos(float x, float y)
    • set_box_text_pos

      public R_Dropdown set_box_text_pos(vec2 pos)
    • set_box_text_pos

      public R_Dropdown set_box_text_pos(float x, float y)
    • set_colour

      public R_Dropdown set_colour(R_Colour rc)
    • set_box

      public R_Dropdown set_box(int num_box)
    • set_box

      public R_Dropdown set_box(int num_box, int rank)
    • set_box_rank

      public R_Dropdown set_box_rank(int rank)
    • set_box_height

      public R_Dropdown set_box_height(float h)
    • set_box_width

      public R_Dropdown set_box_width(int w)
    • set_box_font

      public R_Dropdown set_box_font(String font_name, int size)
    • set_box_font

      public R_Dropdown set_box_font(processing.core.PFont font)
    • set_value

      @Deprecated public R_Dropdown set_value(int index)
      Deprecated.
      the function set_value(int index) is replaced by select_value(int index)
    • select_value

      public R_Dropdown select_value(int index)
      Set value for the menu. Useful to set a starting value or to set from an external method.
      Parameters:
      index - select element from content
      Returns:
    • set_name

      public R_Dropdown set_name(String name)
      Overrides:
      set_name in class Crope
    • get_selection

      public int get_selection()
      return which line of dropdown is selected
      Returns:
      int
    • get

      public float get()
      return which line of dropdown is selected, is not like get_selection this return is a float.
      Overrides:
      get in class Crope
      Returns:
      float
    • get_highlight

      public int get_highlight()
    • get_value

      public String get_value()
      return the String content of the line if it's possible, return null in the other case
      Returns:
      String
    • get_key

      public int get_key()
    • get_key_set

      public int[] get_key_set()
    • get_content

      public String[] get_content()
      return all the content array of the dropdown
      Returns:
      String array
    • get_content

      public String get_content(int index)
      return the String content of the index asking if it's possible. If it's not return the first element of the array content
      Returns:
      String
    • get_content_size

      public int get_content_size()
      the quantity of elements in the dropdown
      Returns:
      int number of elements
    • get_content_text_pos

      public vec2 get_content_text_pos()
    • clear

      public void clear()
      clear content of dropdown menu
    • set_content

      public R_Dropdown set_content(String... content)
      Set a new content element for the dropdown, the list is clear before.
      Parameters:
      content - String array
      Returns:
      this
    • set_content

      public R_Dropdown set_content(HashMap<Integer,String> content)
      Set a new content element for the dropdown, the list is clear before.
      Parameters:
      content - add an Hashmap where the first argument is an Integer and the second is a String.
      Returns:
      this
    • add_content

      public void add_content(String... content)
      add a String list of elements to the list
      Parameters:
      content - String array or list
    • get_num_box

      public int get_num_box()
    • get_font_box

      public processing.core.PFont get_font_box()
    • get_header_text_pos

      public vec2 get_header_text_pos()
    • locked_is

      public boolean locked_is()
    • show_struc

      public void show_struc()
      Specified by:
      show_struc in interface R_GUI
      Overrides:
      show_struc in class Crope
    • show_value

      public void show_value()
      Specified by:
      show_value in interface R_GUI
      Overrides:
      show_value in class Crope
    • show_header

      public void show_header()
    • show_label

      public void show_label(String label)
      Overwrite method Crope
    • show_label

      public void show_label()
      Overwrite method Crope
      Overrides:
      show_label in class Crope
    • show_box

      public void show_box()
    • is_active

      public boolean is_active()
      Overwrite the Crope function is_active()
      Returns:
      true when the gui is active
    • is_done

      public boolean is_done()
      Overwrite the Crope function is_done()
      Overrides:
      is_done in class Crope
      Returns:
      true when the action gui is done
    • update

      public void update()
      Specified by:
      update in interface R_GUI
      Overrides:
      update in class Crope
    • update

      public void update(float x, float y)
    • wheel

      public void wheel(boolean wheel_is)
    • offset

      public void offset(int x, int y)
    • offset

      public void offset(ivec2 offset)