mirror of
https://github.com/vlang/v.git
synced 2025-09-16 16:02:29 +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
|
@ -184,13 +184,13 @@ fn (mut ctx Context) parse_events() {
|
|||
}
|
||||
|
||||
mut event := &Event{
|
||||
typ: .key_down
|
||||
typ: .key_down
|
||||
modifiers: modifiers
|
||||
code: code
|
||||
ascii: ascii
|
||||
width: int(e.dwControlKeyState)
|
||||
height: int(e.wVirtualKeyCode)
|
||||
utf8: unsafe { e.uChar.UnicodeChar.str() }
|
||||
code: code
|
||||
ascii: ascii
|
||||
width: int(e.dwControlKeyState)
|
||||
height: int(e.wVirtualKeyCode)
|
||||
utf8: unsafe { e.uChar.UnicodeChar.str() }
|
||||
}
|
||||
ctx.event(event)
|
||||
}
|
||||
|
@ -233,36 +233,36 @@ fn (mut ctx Context) parse_events() {
|
|||
EventType.mouse_drag
|
||||
}
|
||||
ctx.event(&Event{
|
||||
typ: typ
|
||||
x: x
|
||||
y: y
|
||||
button: button
|
||||
typ: typ
|
||||
x: x
|
||||
y: y
|
||||
button: button
|
||||
modifiers: modifiers
|
||||
})
|
||||
}
|
||||
C.MOUSE_WHEELED {
|
||||
ctx.event(&Event{
|
||||
typ: .mouse_scroll
|
||||
typ: .mouse_scroll
|
||||
direction: if i16(e.dwButtonState >> 16) < 0 {
|
||||
Direction.up
|
||||
} else {
|
||||
Direction.down
|
||||
}
|
||||
x: x
|
||||
y: y
|
||||
x: x
|
||||
y: y
|
||||
modifiers: modifiers
|
||||
})
|
||||
}
|
||||
0x0008 { // C.MOUSE_HWHEELED
|
||||
ctx.event(&Event{
|
||||
typ: .mouse_scroll
|
||||
typ: .mouse_scroll
|
||||
direction: if i16(e.dwButtonState >> 16) < 0 {
|
||||
Direction.right
|
||||
} else {
|
||||
Direction.left
|
||||
}
|
||||
x: x
|
||||
y: y
|
||||
x: x
|
||||
y: y
|
||||
modifiers: modifiers
|
||||
})
|
||||
}
|
||||
|
@ -275,10 +275,10 @@ fn (mut ctx Context) parse_events() {
|
|||
}
|
||||
ctx.mouse_down = button
|
||||
ctx.event(&Event{
|
||||
typ: .mouse_down
|
||||
x: x
|
||||
y: y
|
||||
button: button
|
||||
typ: .mouse_down
|
||||
x: x
|
||||
y: y
|
||||
button: button
|
||||
modifiers: modifiers
|
||||
})
|
||||
}
|
||||
|
@ -297,10 +297,10 @@ fn (mut ctx Context) parse_events() {
|
|||
if w != ctx.window_width || h != ctx.window_height {
|
||||
ctx.window_width, ctx.window_height = w, h
|
||||
mut event := &Event{
|
||||
typ: .resized
|
||||
width: ctx.window_width
|
||||
typ: .resized
|
||||
width: ctx.window_width
|
||||
height: ctx.window_height
|
||||
utf8: utf8
|
||||
utf8: utf8
|
||||
}
|
||||
ctx.event(event)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue