Improve implementation of drawing the noodles
This commit is contained in:
@@ -76,6 +76,11 @@ i32 run_main_loop(void) {
|
||||
|
||||
i32 toolbox_button_x = (toolbox->width - BUTTON_WIDTH) / 2;
|
||||
|
||||
line ln = (line){
|
||||
(point){20, 40},
|
||||
(point){60, 200},
|
||||
};
|
||||
|
||||
while (comp.running) {
|
||||
while (SDL_PollEvent(&(comp.event))) {
|
||||
handle_ui_events(&(comp.windows[comp.active_window - 1]), &(comp.ctx),
|
||||
@@ -152,6 +157,8 @@ i32 run_main_loop(void) {
|
||||
comp.nodes[i].colours);
|
||||
}
|
||||
|
||||
ln = ui_noodle(main_window, &(comp.ctx), ln, op_node_colours);
|
||||
|
||||
for (u64 i = 0; i < MAX_WINDOWS; ++i) {
|
||||
swap_buffers(&(comp.windows[i]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user