This commit is contained in:
2023-05-30 18:07:18 +00:00
parent 16f7a28c23
commit 5f3bbbc582
5 changed files with 87 additions and 4 deletions

View File

@@ -138,8 +138,12 @@ var GUI = {
text(str, pos, size, color, wrap) {
size = size ? size : 1;
color = color ? color : [255,255,255,255];
wrap = wrap ? wrap : 500;
var h = ui_text(str, pos, size, color, wrap);
wrap = wrap ? wrap : -1;
var bb = cmd(118, str, size, wrap);
var opos = [bb.r, bb.t];
var h = ui_text(str, pos.sub(opos), size, color, wrap);
return [wrap,h];
},
@@ -147,6 +151,10 @@ var GUI = {
text_cursor(str, pos, size, cursor) {
cursor_text(str,pos,size,[255,255,255],cursor);
},
column(items) {
items.forEach(x => x());
},
};
function listbox(pos, item) {