mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sokol: type alias all sapp
structs (#12962)
This commit is contained in:
@ -16,7 +16,7 @@ fn main() {
|
||||
pass_action: gfx.create_clear_pass(0.1, 0.1, 0.1, 1.0)
|
||||
}
|
||||
title := 'Sokol Drawing Template'
|
||||
desc := C.sapp_desc{
|
||||
desc := sapp.Desc{
|
||||
user_data: state
|
||||
init_userdata_cb: init
|
||||
frame_userdata_cb: frame
|
||||
|
@ -31,7 +31,7 @@ fn main() {
|
||||
fons: voidptr(0) // &fontstash.Context(0)
|
||||
}
|
||||
title := 'V Metal/GL Text Rendering'
|
||||
desc := C.sapp_desc{
|
||||
desc := sapp.Desc{
|
||||
user_data: state
|
||||
init_userdata_cb: init
|
||||
frame_userdata_cb: frame
|
||||
|
@ -79,7 +79,7 @@ fn main() {
|
||||
fons: voidptr(0) // &fontstash.Context(0)
|
||||
}
|
||||
title := 'V Metal/GL Text Rendering'
|
||||
desc := C.sapp_desc{
|
||||
desc := sapp.Desc{
|
||||
user_data: state
|
||||
init_userdata_cb: init
|
||||
frame_userdata_cb: frame
|
||||
|
@ -52,7 +52,7 @@ fn (mut a App) cleanup() {
|
||||
|
||||
fn (mut a App) run() {
|
||||
title := 'V Particle Example'
|
||||
desc := C.sapp_desc{
|
||||
desc := sapp.Desc{
|
||||
width: a.width
|
||||
height: a.height
|
||||
user_data: a
|
||||
@ -117,7 +117,7 @@ fn frame(user_data voidptr) {
|
||||
app.last = t
|
||||
}
|
||||
|
||||
fn event(ev &C.sapp_event, mut app App) {
|
||||
fn event(ev &sapp.Event, mut app App) {
|
||||
if ev.@type == .mouse_move {
|
||||
app.ps.explode(ev.mouse_x, ev.mouse_y)
|
||||
}
|
||||
|
Reference in New Issue
Block a user