|
@@ -0,0 +1,57 @@
|
|
|
+class Select extends UIObject
|
|
|
+{
|
|
|
+ constructor(name)
|
|
|
+ {
|
|
|
+ super(name);
|
|
|
+
|
|
|
+ this.P5Element = createSelect();
|
|
|
+ this.setPosition(0, 0);
|
|
|
+ this.setSize(100, 20);
|
|
|
+ this.setStyle(DEFAULT_STYLE);
|
|
|
+
|
|
|
+ this.connectCallbacks();
|
|
|
+ this.P5Element.changed(this.onChanged);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ setSelected(value)
|
|
|
+ {
|
|
|
+ this.P5Element.selected(value);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ getSelected()
|
|
|
+ {
|
|
|
+ return this.P5Element.selected();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ addOption(value)
|
|
|
+ {
|
|
|
+ this.P5Element.option(value);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ _onChanged()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ onChanged()
|
|
|
+ {
|
|
|
+ this.pandoraObject._onChanged();
|
|
|
+ }
|
|
|
+}
|