ui
ui copied to clipboard
Multiple compilation errors attempting to pull latest version using vlang 0.2.4
V version: 0.2.4 66a67de UI version: This commit OS: OSX
What did you do?
v install ui
What did you expect to see? Successful compilation
What did you see instead?
Installing module "ui" from https://github.com/vlang/ui to /Users/user/.vmodules/ui ...
user-mac:vui user$ v ./vui_logview.v
/Users/user/.vmodules/ui/ui_interface_drawtext.v:114:18: error: expected 4 arguments, but got 3
112 | pub fn (w DrawTextWidget) draw_text(x int, y int, text string) {
113 | scale := if w.ui.gg.ft.scale == 0 { f32(1) } else { w.ui.gg.ft.scale }
114 | w.ui.gg.ft.fons.draw_text(x * scale, y * scale, text) // TODO: check offsets/alignment
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115 | }
116 |
/Users/user/.vmodules/ui/ui_interface_drawtext.v:120:18: error: expected 4 arguments, but got 3
118 | w.load_style(w.text_style_by_id(text_style_id))
119 | scale := if w.ui.gg.ft.scale == 0 { f32(1) } else { w.ui.gg.ft.scale }
120 | w.ui.gg.ft.fons.draw_text(x * scale, y * scale, text) // TODO: check offsets/alignment
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121 | }
122 |
/Users/user/.vmodules/ui/ui_interface_drawtext.v:134:21: error: expected 5 arguments, but got 4
132 | pub fn (w DrawTextWidget) text_width_additive(text string) f64 {
133 | ctx := w.ui.gg
134 | adv := ctx.ft.fons.text_bounds(0, 0, text, &f32(0))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 | return adv / ctx.scale
136 | }
/Users/user/.vmodules/ui/ui_interface_drawtext.v:196:25: error: expected 4 arguments, but got 3
194 | // mut f := ui.fonts
195 | if bytes.len > 0 {
196 | font := ui.gg.ft.fons.add_font_mem('sans', bytes, false)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
197 | if font >= 0 {
198 | ui.fonts.hash[font_name] = font
Please execute v up and v update ui.
Then try again.
The issue should be resolved.