updates widget positions

This commit is contained in:
2025-12-02 17:11:27 +02:00
parent afbce332b3
commit 32b9628ff2
14 changed files with 108 additions and 48 deletions
+13
View File
@@ -4,6 +4,19 @@
#include <stdint.h>
#include <string.h>
extern uint32_t m_id;
void init_widget(widget_t *w, WINDOW **win, char *title, uint32_t parent_id) {
w->id = m_id++;
w->x = 0;
w->y = 0;
w->m_x = 0;
w->m_y = 0;
w->parent_win = win;
w->parent_id = parent_id;
strcpy(w->title, title);
}
int32_t get_max_line_len(const char *text) {
uint32_t nl_pos = 0; // new line position
uint32_t c_start = 0; // current line start position