mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: GG => Context
This commit is contained in:
@ -10,7 +10,7 @@ const (
|
||||
filled_color = gx.blue
|
||||
)
|
||||
|
||||
fn new_graphics() &gg.GG {
|
||||
fn new_graphics() &gg.Context {
|
||||
glfw.init_glfw()
|
||||
return gg.new_context(gg.Cfg{
|
||||
width: screen_width
|
||||
|
@ -11,7 +11,7 @@ const (
|
||||
|
||||
struct App {
|
||||
mut:
|
||||
gg &gg.GG
|
||||
gg &gg.Context
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -61,7 +61,7 @@ lines = text.split('\n')
|
||||
|
||||
struct App {
|
||||
mut:
|
||||
gg &gg.GG
|
||||
gg &gg.Context
|
||||
ft &ft.FT
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import time
|
||||
|
||||
struct Game {
|
||||
mut:
|
||||
gg &gg.GG
|
||||
gg &gg.Context
|
||||
x int
|
||||
y int
|
||||
dy int
|
||||
|
@ -13,7 +13,7 @@ const (
|
||||
)
|
||||
|
||||
struct Context {
|
||||
gg &gg.GG
|
||||
gg &gg.Context
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -126,7 +126,7 @@ struct Game {
|
||||
// Index of the rotation (0-3)
|
||||
rotation_idx int
|
||||
// gg context for drawing
|
||||
gg &gg.GG = voidptr(0)
|
||||
gg &gg.Context = voidptr(0)
|
||||
// ft context for font drawing
|
||||
ft &ft.FT = voidptr(0)
|
||||
font_loaded bool
|
||||
|
Reference in New Issue
Block a user