Skip to content

Instantly share code, notes, and snippets.

@FlyingJester
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FlyingJester/675b58454e8738c0527c to your computer and use it in GitHub Desktop.
Save FlyingJester/675b58454e8738c0527c to your computer and use it in GitHub Desktop.
Moving Cursor with (BM Galileo) Sapphire
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