automated snapshot
This commit is contained in:
9
main.go
9
main.go
@@ -111,18 +111,17 @@ func main() {
|
|||||||
|
|
||||||
sketch.Draw(renderCtx)
|
sketch.Draw(renderCtx)
|
||||||
|
|
||||||
|
rl.DrawText("Mouse right button drag to move, mouse wheel to zoom", 10, 10, 20, rl.White)
|
||||||
|
|
||||||
|
rl.EndDrawing()
|
||||||
|
|
||||||
if rl.IsKeyDown(rl.KeySpace) {
|
if rl.IsKeyDown(rl.KeySpace) {
|
||||||
capture := sketch.Capture()
|
capture := sketch.Capture()
|
||||||
|
|
||||||
if _, err := storage.Save(capture); err != nil {
|
if _, err := storage.Save(capture); err != nil {
|
||||||
log.Printf("Error saving snapshot: %v\n", err)
|
log.Printf("Error saving snapshot: %v\n", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rl.DrawText("Mouse right button drag to move, mouse wheel to zoom", 10, 10, 20, rl.White)
|
|
||||||
|
|
||||||
rl.EndDrawing()
|
|
||||||
|
|
||||||
for ch := rl.GetCharPressed(); ch != 0; ch = rl.GetCharPressed() {
|
for ch := rl.GetCharPressed(); ch != 0; ch = rl.GetCharPressed() {
|
||||||
c := rune(ch)
|
c := rune(ch)
|
||||||
if c == 'c' {
|
if c == 'c' {
|
||||||
|
|||||||
Reference in New Issue
Block a user