mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
fmt: fix alignment of struct init fields (#22025)
This commit is contained in:
parent
99da5726db
commit
c51d30bf53
671 changed files with 18817 additions and 18787 deletions
|
@ -14,11 +14,11 @@ const timer_period = 40 * time.millisecond // defaulted at 25 fps
|
|||
|
||||
const font_small = gx.TextCfg{
|
||||
color: gx.black
|
||||
size: 20
|
||||
size: 20
|
||||
}
|
||||
const font_large = gx.TextCfg{
|
||||
color: gx.black
|
||||
size: 40
|
||||
size: 40
|
||||
}
|
||||
|
||||
struct App {
|
||||
|
@ -96,9 +96,9 @@ fn (mut app App) insert_particles() {
|
|||
mut x := rand_minmax(0, gridh) * grid
|
||||
mut y := rand_minmax(0, gridv) * grid
|
||||
mut random_particle := datatypes.AABB{
|
||||
x: x
|
||||
y: y
|
||||
width: rand_minmax(1, 4) * grid
|
||||
x: x
|
||||
y: y
|
||||
width: rand_minmax(1, 4) * grid
|
||||
height: rand_minmax(1, 4) * grid
|
||||
}
|
||||
app.particles << Particle{random_particle, 0.0, 0.0}
|
||||
|
@ -115,15 +115,15 @@ fn main() {
|
|||
gg: unsafe { nil }
|
||||
}
|
||||
app.gg = gg.new_context(
|
||||
bg_color: gx.white
|
||||
width: win_width
|
||||
height: win_height
|
||||
bg_color: gx.white
|
||||
width: win_width
|
||||
height: win_height
|
||||
create_window: true
|
||||
window_title: 'Quadtree Demo'
|
||||
frame_fn: frame
|
||||
event_fn: on_event
|
||||
user_data: app
|
||||
font_path: os.resource_abs_path('../assets/fonts/RobotoMono-Regular.ttf')
|
||||
window_title: 'Quadtree Demo'
|
||||
frame_fn: frame
|
||||
event_fn: on_event
|
||||
user_data: app
|
||||
font_path: os.resource_abs_path('../assets/fonts/RobotoMono-Regular.ttf')
|
||||
)
|
||||
app.qt = app.qt.create(0, 0, 1340, 640, 8, 4, 0)
|
||||
app.start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue