#import "Basic"; #import "kscurses"; main :: () { // use_ks_curses(); // run_singlethread_ui(); pos: ivec2 = .{}; ks_init(); key: Key = 0; mode := make_graphics_mode(); while(key != .CTRL_C && key != #char "q") { // ks_print :: inline (coord : ivec2, mode : Graphics_Mode, fmt : string, args : ..Any) { mode.attr_flags |= .F_BOLD; ks_print(pos, mode, " wow % wow", 333); mode.attr_flags &= ~.F_BOLD; new_pos := pos; new_pos.x += 6; ks_print(new_pos, mode, "∞"); // print("BAZINGA\n"); key = ks_getch(); if key == { case .UP; pos.y -= 1; case .DOWN; pos.y += 1; case .LEFT; pos.x -= 1; case .RIGHT; pos.x += 1; } if pos.y < 0 then pos.y = 0; if pos.x < 0 then pos.x = 0; ks_move_cursor(pos); ks_clear_screen(); _x := 80; _y := 24; box: Ibox2 = .{}; box.width = xx _x; box.height = xx _y; box.size = .{x = xx _x, y = xx _y}; box.corner = .{x=0, y=0}; ks_box(box); } ks_terminate(); if key == .CTRL_C then print("WOWOWOWOWOWO\n"); // TODO CTRL_C exits without passing here. }