comparison semiconginev2/text/textbox.nim @ 1238:03634915bbdb

add: tests for updating texts, does not pass validation atm
author sam <sam@basx.dev>
date Sun, 21 Jul 2024 11:31:11 +0700
parents 176383220123
children 69489a678141
comparison
equal deleted inserted replaced
1237:97813ac43cfb 1238:03634915bbdb
95 else: 95 else:
96 textbox.position.data[vertexOffset + 0] = NewVec3f() 96 textbox.position.data[vertexOffset + 0] = NewVec3f()
97 textbox.position.data[vertexOffset + 1] = NewVec3f() 97 textbox.position.data[vertexOffset + 1] = NewVec3f()
98 textbox.position.data[vertexOffset + 2] = NewVec3f() 98 textbox.position.data[vertexOffset + 2] = NewVec3f()
99 textbox.position.data[vertexOffset + 3] = NewVec3f() 99 textbox.position.data[vertexOffset + 3] = NewVec3f()
100 UpdateGPUBuffer(textbox.position, flush = true)
101 UpdateGPUBuffer(textbox.uv, flush = true)
100 textbox.lastRenderedText = textbox.processedText 102 textbox.lastRenderedText = textbox.processedText
101 103
102 func text*(textbox: Textbox): seq[Rune] = 104 func text*(textbox: Textbox): seq[Rune] =
103 textbox.text 105 textbox.text
104 106