⎗ ✓ 1 2 3 4 5 6 7 8 9 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#include "BearLibTerminal.h" int main() { terminal_open(); terminal_set("window.fullscreen=false"); //terminal_set("input.alt-functions=false"); terminal_set("log.level=trace"); int loop = 1, fs = 0, i = 0; while (loop) { terminal_clear(); terminal_printf(1, 1, "%d", i++); terminal_refresh(); int key = terminal_read(); switch(key) { case TK_ESCAPE: loop = 0; break; case TK_ENTER: if (fs) { terminal_set("window.fullscreen=false"); fs = 0; } else { terminal_set("window.fullscreen=true"); fs = 1; } default: break; } } terminal_close(); }
Warning LINK You are about to visit a link which has been flagged with the above content warnings. Do you wish to continue? Continue Cancel