Improve edit screen
This commit is contained in:
parent
52770d7eb2
commit
826986cdbf
12 changed files with 235 additions and 40 deletions
21
js/gui/text.mjs
Normal file
21
js/gui/text.mjs
Normal file
|
@ -0,0 +1,21 @@
|
|||
import * as gui from './index.mjs';
|
||||
import GuiElement from './element.mjs';
|
||||
|
||||
export default class GuiText extends GuiElement {
|
||||
constructor(text = '', x, y, w, h, {
|
||||
size = 10,
|
||||
align = 'left',
|
||||
valign = 'top',
|
||||
color = '#fff'
|
||||
} = {}) {
|
||||
w = w;
|
||||
h = h;
|
||||
super(x, y, w, h);
|
||||
this.type = 'text';
|
||||
this.color = color;
|
||||
this.text = text;
|
||||
this.font = size + 'pt Consolas';
|
||||
this.align = align;
|
||||
this.valign = valign;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue