Got the first 'input box' to work. Did some changes to keyboard input

Renamed KeyboardKey to KeyCode, redid the encoding layout (preemtively getting ready for SDL later as well)

I got the input box working but it has no constraints and needs to be lifted. The scroll box construction does as well.
This commit is contained in:
2024-05-19 11:06:09 -04:00
parent b137bc542c
commit 275ffcf143
13 changed files with 782 additions and 500 deletions

View File

@ -75,6 +75,10 @@ import "core:os"
file_write :: os.write
import "core:path/filepath"
file_name_from_path :: filepath.short_stem
import "core:strconv"
parse_f32 :: strconv.parse_f32
parse_u64 :: strconv.parse_u64
parse_uint :: strconv.parse_uint
import str "core:strings"
StringBuilder :: str.Builder
str_builder_from_bytes :: str.builder_from_bytes
@ -261,6 +265,11 @@ to_string :: proc {
str_builder_to_string,
}
to_str_runes_pair :: proc {
to_str_runes_pair_via_runes,
to_str_runes_pair_via_string,
}
vec3 :: proc {
vec3_via_f32s,
bivec3_to_vec3,
@ -283,7 +292,6 @@ to_ui_layout_side :: proc {
}
ui_compute_layout :: proc {
ui_core_compute_layout,
ui_box_compute_layout,
}

View File

@ -23,9 +23,8 @@ StrRunesPair :: struct {
str : string,
runes : []rune,
}
to_str_runes_pair :: proc ( content : string ) -> StrRunesPair {
return { content, to_runes(content) }
}
to_str_runes_pair_via_string :: #force_inline proc ( content : string ) -> StrRunesPair { return { content, to_runes(content) } }
to_str_runes_pair_via_runes :: #force_inline proc ( content : []rune ) -> StrRunesPair { return { to_string(content), content } }
StringCache :: struct {
slab : Slab,