diff options
| author | Riley Beckett <rbeckettvt@gmail.com> | 2025-10-27 19:40:08 -0400 |
|---|---|---|
| committer | Riley Beckett <rbeckettvt@gmail.com> | 2025-10-27 19:40:08 -0400 |
| commit | e42d9bb1834678fb0275dbcdfc84bc80b1ca27a8 (patch) | |
| tree | 206311382255c1bb04169b08aea9839fb95dc7f4 /main.c | |
| parent | 2033b55f91876c8fc0d4cd3cdf9c67972ad5490c (diff) | |
add prompt
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -52,6 +52,8 @@ 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)) { @@ -88,6 +90,10 @@ int main(int argc, char* argv[]) { // create font altas textures atlas_create_texture(&state); + 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) { |
