Last active
August 29, 2015 14:04
-
-
Save FlyingJester/675b58454e8738c0527c to your computer and use it in GitHub Desktop.
Moving Cursor with (BM Galileo) Sapphire
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PointerImage = new Image("pointer.png"); | |
var DefaultShader = GetDefaultShaderProgram(); | |
var CursorShape = new Shape( | |
[new Vertex(0, 0), new Vertex(64, 0), new Vertex(64, 64), new Vertex(0, 64) ], | |
PointerImage); | |
var Cursor = new Group(CursorShape, DefaultShader); | |
function game(){ | |
while(!IsKeyPressed(KEY_Q)){ | |
Cursor.setPosition(GetMouseX(), GetMouseY()); | |
Cursor.Draw(); | |
FlipScreen(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment