mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +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
|
@ -103,14 +103,14 @@ fn main() {
|
|||
app.ui = objects.get_params()
|
||||
|
||||
app.gg = gg.new_context(
|
||||
width: app.ui.width
|
||||
height: app.ui.height
|
||||
width: app.ui.width
|
||||
height: app.ui.height
|
||||
window_title: 'Fireworks!'
|
||||
bg_color: gx.black
|
||||
user_data: app
|
||||
frame_fn: on_frame
|
||||
event_fn: on_event
|
||||
font_path: font_path
|
||||
bg_color: gx.black
|
||||
user_data: app
|
||||
frame_fn: on_frame
|
||||
event_fn: on_event
|
||||
font_path: font_path
|
||||
)
|
||||
|
||||
app.gg.run()
|
||||
|
|
|
@ -50,7 +50,7 @@ pub fn (mut rocket Rocket) tick(mut ctx gg.Context) {
|
|||
pub fn new_rocket() Rocket {
|
||||
return Rocket{
|
||||
color: random_color()
|
||||
pos: Vector{
|
||||
pos: Vector{
|
||||
x: rand.f32_in_range(50, get_params().width - 50) or { 50 }
|
||||
}
|
||||
vel: Vector{
|
||||
|
@ -63,7 +63,7 @@ pub fn new_rocket() Rocket {
|
|||
pub fn (mut rocket Rocket) spawn_particle() {
|
||||
rocket.particles << Particle{
|
||||
color: rocket.color
|
||||
pos: rocket.pos
|
||||
pos: rocket.pos
|
||||
accel: random_vector_in_circle().mult(2)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue