[bindings/odin] allows clay to statically dispatch based on const

This commit is contained in:
A1029384756 2025-10-03 14:58:31 -04:00
parent 588b93196c
commit 3c2082e309

View file

@ -439,7 +439,12 @@ UI_AutoId :: proc() -> proc (config: ElementDeclaration) -> bool {
UI :: proc{UI_WithId, UI_AutoId};
Text :: proc($text: string, config: ^TextElementConfig) {
Text :: proc {
TextStatic,
TextDynamic,
}
TextStatic :: proc($text: string, config: ^TextElementConfig) {
wrapped := MakeString(text)
wrapped.isStaticallyAllocated = true
_OpenTextElement(wrapped, config)