Fixed one frame flash on textbox
This commit is contained in:
@ -28,10 +28,9 @@ queueaction_t * vnConversationAdd(vnconversation_t *conversation) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void vnConversationUpdate(vnconversation_t *convo, engine_t *engine) {
|
void vnConversationUpdate(vnconversation_t *convo, engine_t *engine) {
|
||||||
queueUpdate(&convo->actionQueue, engine);
|
|
||||||
|
|
||||||
convo->textbox.y = engine->render.height - convo->textbox.height;
|
convo->textbox.y = engine->render.height - convo->textbox.height;
|
||||||
vnTextBoxUpdate(&convo->textbox, engine);
|
vnTextBoxUpdate(&convo->textbox, engine);
|
||||||
|
queueUpdate(&convo->actionQueue, engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vnConversationRender(vnconversation_t *convo, shader_t *shader) {
|
void vnConversationRender(vnconversation_t *convo, shader_t *shader) {
|
||||||
|
@ -81,7 +81,12 @@ void vnTextBoxUpdate(vntextbox_t *box, engine_t *engine) {
|
|||||||
void vnTextBoxRender(vntextbox_t *box, shader_t *shader) {
|
void vnTextBoxRender(vntextbox_t *box, shader_t *shader) {
|
||||||
int32_t charStart, charCount;
|
int32_t charStart, charCount;
|
||||||
float yOffset;
|
float yOffset;
|
||||||
if(box->text == NULL || box->state & VN_TEXTBOX_STATE_CLOSED > 0) return;
|
if(box->text == NULL || box->state & VN_TEXTBOX_STATE_CLOSED) return;
|
||||||
|
|
||||||
|
// Render the debug box.
|
||||||
|
box->frame.x = box->x;
|
||||||
|
box->frame.y = box->y;
|
||||||
|
frameRender(&box->frame, shader);
|
||||||
|
|
||||||
// Determine where we're rendering the indices up to.
|
// Determine where we're rendering the indices up to.
|
||||||
charCount = box->textScroll;
|
charCount = box->textScroll;
|
||||||
@ -108,11 +113,6 @@ void vnTextBoxRender(vntextbox_t *box, shader_t *shader) {
|
|||||||
box->primitive.indiceCount - charStart
|
box->primitive.indiceCount - charStart
|
||||||
);
|
);
|
||||||
if(charCount < 1) return;
|
if(charCount < 1) return;
|
||||||
|
|
||||||
// Render the debug box.
|
|
||||||
box->frame.x = box->x;
|
|
||||||
box->frame.y = box->y - yOffset;
|
|
||||||
frameRender(&box->frame, shader);
|
|
||||||
|
|
||||||
// Render the Text Box
|
// Render the Text Box
|
||||||
shaderUsePosition(shader,
|
shaderUsePosition(shader,
|
||||||
|
Reference in New Issue
Block a user