mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: change all '$expr' to '${expr}' (#16428)
This commit is contained in:
@@ -52,11 +52,11 @@ fn on_frame(mut app App) {
|
||||
start := math.tau * app.mouse.y / (win_width * app.gg.scale)
|
||||
end := math.tau * app.mouse.x / (win_width * app.gg.scale)
|
||||
|
||||
segs := if app.sel == .segs { '[$app.segs]' } else { '$app.segs' }
|
||||
app.gg.draw_text_def(10, 10, 'Segments: $segs')
|
||||
segs := if app.sel == .segs { '[${app.segs}]' } else { '${app.segs}' }
|
||||
app.gg.draw_text_def(10, 10, 'Segments: ${segs}')
|
||||
app.gg.draw_text_def(250, 10, 'Drawing Angles (radians)')
|
||||
app.gg.draw_text_def(200, 26, 'Start: $start°')
|
||||
app.gg.draw_text_def(350, 26, 'End: $end°')
|
||||
app.gg.draw_text_def(200, 26, 'Start: ${start}°')
|
||||
app.gg.draw_text_def(350, 26, 'End: ${end}°')
|
||||
mut x, mut y := 0, -80
|
||||
|
||||
y += 150
|
||||
|
||||
@@ -7,7 +7,7 @@ import sokol.sapp
|
||||
|
||||
const (
|
||||
max_files = 12
|
||||
text = 'Drag&Drop here max $max_files files.'
|
||||
text = 'Drag&Drop here max ${max_files} files.'
|
||||
text_size = 16
|
||||
)
|
||||
|
||||
@@ -62,7 +62,7 @@ fn frame(mut app App) {
|
||||
|
||||
mut y := 40
|
||||
for c, f in app.dropped_file_list {
|
||||
app.gg.draw_text(12, y, '[$c] $f', txt_conf)
|
||||
app.gg.draw_text(12, y, '[${c}] ${f}', txt_conf)
|
||||
y += text_size
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ fn graphics_keydown(code gg.KeyCode, mod gg.Modifier, mut state AppState) {
|
||||
// movement
|
||||
mut d_x, mut d_y := 0.0, 0.0
|
||||
if code == .enter {
|
||||
println('> ViewRect{$state.view.x_min, $state.view.x_max, $state.view.y_min, $state.view.y_max}')
|
||||
println('> ViewRect{${state.view.x_min}, ${state.view.x_max}, ${state.view.y_min}, ${state.view.y_max}}')
|
||||
}
|
||||
if state.gg.pressed_keys[int(gg.KeyCode.left)] {
|
||||
d_x -= s_x
|
||||
|
||||
@@ -77,7 +77,7 @@ fn frame(mut app App) {
|
||||
app.counter += i64(f64(count) / time.second)
|
||||
}
|
||||
|
||||
label := '$app.counter'
|
||||
label := '${app.counter}'
|
||||
label_width := (f64(label.len * text_cfg.size) / 4.0)
|
||||
label_height := (f64(1 * text_cfg.size) / 2.0)
|
||||
mut x := f32(size.width) * 0.5 - label_width
|
||||
|
||||
Reference in New Issue
Block a user