mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tetris: it now works with v2 (on linux) :-)
This commit is contained in:
@@ -55,6 +55,7 @@ pub:
|
||||
scale int
|
||||
}
|
||||
|
||||
pub type RenderFn fn()
|
||||
pub struct GG {
|
||||
shader gl.Shader
|
||||
// use_ortho bool
|
||||
@@ -70,7 +71,7 @@ pub mut:
|
||||
width int
|
||||
height int
|
||||
window &glfw.Window
|
||||
render_fn fn()
|
||||
render_fn RenderFn
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,16 +39,14 @@ pub const (
|
||||
)
|
||||
|
||||
pub const (
|
||||
KEY_ESCAPE = 256
|
||||
key_escape = 256
|
||||
key_space = 32
|
||||
KEY_LEFT_SUPER = 343
|
||||
)
|
||||
key_left_super = 343
|
||||
|
||||
pub const (
|
||||
KeyUp = 265
|
||||
KeyLeft = 263
|
||||
KeyRight = 262
|
||||
KeyDown = 264
|
||||
key_up = 265
|
||||
key_left = 263
|
||||
key_right = 262
|
||||
key_down = 264
|
||||
)
|
||||
|
||||
fn C.glfwGetWindowUserPointer() voidptr
|
||||
@@ -373,4 +371,3 @@ pub fn (size Size) str() string {
|
||||
pub fn get_window_user_pointer(gwnd voidptr) voidptr {
|
||||
return C.glfwGetWindowUserPointer(gwnd)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user