framer
Slide-show application for nerds ☝️🤓
Name | Size | Mode |
.. | ||
src/plug.c | 1K | -rw-r--r-- |
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#include "raylib.h" #define FRAMES_IMPLEMENTATION #include "frames.h" #define UIX_IMPLEMENTATION #include "uix.h" #define BACKGROUND BLACK #define FOREGROUND WHITE #define ACCENT (Color){ 0x00, 0xcc, 0x46, 0xff } void title_frame(float time, float scale) { (void)time; int title_size = (int)(50.0 * scale); int subtitle_size = (int)(30.0 * scale); int title_spacing = (int)(10.0 * scale); frame_begin(BACKGROUND); line("introdução a assemply", title_size, FOREGROUND); hspan(title_spacing); line("cripto goma 2020", subtitle_size, ACCENT); frame_end(); } void oq_frame(float time, float scale) { int font_size = (int)(50.0 * scale); const float animation_speed = .5; Color color = FOREGROUND; if ((int)(time / animation_speed) % 2 == 0) color = BACKGROUND; frame_begin(BACKGROUND); line_begin(font_size); line_add("o quê é ", FOREGROUND); line_add("assembly", ACCENT); line_add(" ?", color); line_end(); frame_end(); } void plug_load_frames(Frames* fs) { fs->title = "introdução à assembly"; frames_append(fs, title_frame, FRAMES_EMPTY_TICK, FRAMES_EMPTY_STATE); frames_append(fs, oq_frame, FRAMES_EMPTY_TICK, FRAMES_EMPTY_STATE); }