Simple Game Graphics Library
1.0
|
Data Structures | |
struct | Brush |
struct | MouseState |
Enumerations | |
enum | scale_mode_t |
enum | scancode_t |
Functions | |
void | createWindow (int width, int height, std::string title) |
void | setWindowBackground (Brush style) |
void | destroyWindow () |
void | startMessageLoop () |
void | stopMessageLoop () |
void | setCanvasSize (float w, float h) |
void | setCanvasScaleMode (scale_mode_t sm) |
void | setFullScreen (bool fs) |
float | windowToCanvasX (float x, bool clamped=true) |
float | windowToCanvasY (float y, bool clamped=true) |
void | setUserData (const void *user_data) |
void * | getUserData () |
void | setDrawFunction (std::function< void()> draw) |
void | setUpdateFunction (std::function< void(float)> update) |
void | setResizeFunction (std::function< void(int, int)> resize) |
void | getMouseState (MouseState &ms) |
bool | getKeyState (scancode_t key) |
float | getDeltaTime () |
float | getGlobalTime () |
void | drawRect (float center_x, float center_y, float width, float height, const Brush &brush) |
void | drawLine (float x1, float y1, float x2, float y2, const Brush &brush) |
void | drawDisk (float cx, float cy, float radius, const Brush &brush) |
void | drawSector (float cx, float cy, float radius1, float radius2, float start_angle, float end_angle, const Brush &brush) |
bool | setFont (std::string fontname) |
void | drawText (float pos_x, float pos_y, float size, const std::string &text, const Brush &brush) |
void | setOrientation (float angle) |
void | setScale (float sx, float sy) |
void | resetPose () |
std::vector< std::string > | preloadBitmaps (std::string dir) |
void | playSound (std::string soundfile, float volume, bool looping=false) |
void | playMusic (std::string soundfile, float volume, bool looping=true, int fade_time=0) |
void | stopMusic (int fade_time=0) |
includes all functions of the Simple Game Graphics library.
The available modes for adapting the canvas to the application window.
enum graphics::scancode_t |
The available scancode IDs for the keyboard keys.
For the detailed list of IDs, please see the corresponding header file scancodes.h