- Fonts are now handled in real time for resing, and not from CSS.
@@ -30,7 +30,7 @@ class Button extends UIObject
this.P5Element.html(label);
this.P5Element.position(0, 0);
- this.setStyle(DEFAULT_STYLE);
+ this.setStyle(STYLE.DEFAULT_STYLE);
this.connectCallbacks();
}
@@ -29,7 +29,7 @@ class CheckBox extends UIObject
this.P5Element = createCheckbox(label, val);
this.P5Element.changed(this.onChanged);
@@ -27,7 +27,7 @@ class ColorPicker extends UIObject
this.P5Element = createColorPicker(color);
this.setPosition(0, 0);
@@ -27,7 +27,8 @@ class Input extends UIObject
this.P5Element = createInput(value, type);
+ this.size = new Vector2(200, 30);
this.P5Element.input(this.onInput);
@@ -26,9 +26,9 @@ class Label extends UIObject
super(name);
this.text = text;
this.P5Element = createDiv(text);
- this.P5Element.position(0, 0);
+ this.size = new Vector2(200, 50);
@@ -27,7 +27,7 @@ class Radio extends UIObject
this.P5Element = createRadio();
this.setPosition(10, 10);
this.multiLine = false;
@@ -28,7 +28,7 @@ class Select extends UIObject
this.P5Element = createSelect();
this.setSize(100, 20);
@@ -27,7 +27,7 @@ class Slider extends UIObject
this.P5Element = createSlider(min, max, value, step);
this.setSize(200, 25);
@@ -55,7 +55,11 @@ const RENDER_MODES = {
WEBGL: 2,
};
-const DEFAULT_STYLE = {
+const STYLE = {
- "font-family": "Lato",
+ DEFAULT_FONT_SIZE: 20,
- "font-size": "12px",
+
-};
+ DEFAULT_STYLE:
+ {
+ "font-family": "Lato",
+ },
+}