diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-10-28 01:40:34 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-10-28 01:40:34 -0400 |
| commit | 2b4305b89e0aee24e0f6d5470e4be9abb4854943 (patch) | |
| tree | 5bb9ce45cebad2110a9afbf60395f9df9c53a2d6 /main.c | |
| parent | e42d9bb1834678fb0275dbcdfc84bc80b1ca27a8 (diff) | |
non fancy scroll
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -12,6 +12,7 @@ #include "font.h" #include "array.h" #include "args.h" +#include "layout.h" void poll_events(client_state* state); @@ -39,6 +40,7 @@ int main(int argc, char* argv[]) { state.input_buffer = array_new(char, 0); state.filtered_items = array_new(item_display_t, 0); state.selected_filtered_item = -1; + state.page_indices = array_new(size_t, 0); // check locale setlocale(LC_ALL, ""); @@ -52,8 +54,6 @@ int main(int argc, char* argv[]) { parse_args(&state, argc, argv); read_stdin(&state); - array_dump(state.items, item_t, item, "%s: %lu", item->text, strlen(item->text)); - // find font char* font = get_font("Monospace"); if (!freetype_init(&state, font)) { @@ -90,11 +90,10 @@ int main(int argc, char* argv[]) { // create font altas textures atlas_create_texture(&state); + // create text buffers if (state.prompt && *state.prompt) { init_text_buffer(&state, &state.prompt_text_buffer, state.prompt, strlen(state.prompt)); } - - // create text buffers init_text_buffer(&state, &state.input_buffer_grafix, "", 0); array_for_all(item_t, item, state.items) { init_text_buffer(&state, &item->text_buffer, item->text, strlen(item->text)); |
