Skip to content

Components Frame

ImOverlord edited this page Jan 23, 2019 · 1 revision

Frame

Frame Struct

typedef struct bs_frame_s
{
    int height;
    int width;
    sfEvent event;
    sfRenderWindow *window;
    sfClock *clock;
    char *current_scene;
    char *last_scene;
    bs_list_t *scenes;
    int components_volume_level;
    int max_tick;
    struct bs_sprite_s *cursor;
    void *data;
} bs_frame_t;

height: Height of the window.
width: Width of the window.
event: SFML event.
window: SFML Window.
clock: SFML Clock.
current_scene: Scene name currently loaded.
last_scene: Previous scene loaded.
scenes: List of scenes attached to the Frame struct.
components_volume_level: Volument level for components on Frame.
max_tick: ?.
cursor: Sprite to represent user cursor.
data: Variable where you attach your information to the scene.

Frame Functions

bs_frame_t *bs_frame_create(void)
Create frame structure.

void bs_frame_destroy(bs_frame_t *frame)
Free the frame structure.
frame: Frame struct to destroy.

bool bs_frame_set_cursor(bs_frame_t *frame, char *path)
Sets the new frame cursor.
frame: frame struct to set cursor.
path: path of the Cursor texture.

Clone this wiki locally