Fixed VN Scrolling bug
This commit is contained in:
src/dawn
@ -89,7 +89,7 @@ int32_t VNTextboxScroller::getTotalQuadsToBeRevealed() {
|
|||||||
) {
|
) {
|
||||||
quadsTotal += this->label->lines[i].quadCount;
|
quadsTotal += this->label->lines[i].quadCount;
|
||||||
}
|
}
|
||||||
return quadsTotal;
|
return quadsTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool_t VNTextboxScroller::hasRevealedAllCurrentCharacters() {
|
bool_t VNTextboxScroller::hasRevealedAllCurrentCharacters() {
|
||||||
|
@ -116,6 +116,7 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
|
|||||||
std::vector<std::pair<glm::vec4, glm::vec4>> vertices;
|
std::vector<std::pair<glm::vec4, glm::vec4>> vertices;
|
||||||
struct FontShaderBufferData fontData;
|
struct FontShaderBufferData fontData;
|
||||||
quadCountTotal = 0;
|
quadCountTotal = 0;
|
||||||
|
quadCount = -1;
|
||||||
std::vector<struct UILabelText> realNewTexts;
|
std::vector<struct UILabelText> realNewTexts;
|
||||||
|
|
||||||
float_t maxWidth = this->width;
|
float_t maxWidth = this->width;
|
||||||
@ -302,7 +303,8 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
|
|||||||
|
|
||||||
// Now we insert a line. We do this because there is no newline at the end
|
// Now we insert a line. We do this because there is no newline at the end
|
||||||
// of the text, so we need to insert the last line manually.
|
// of the text, so we need to insert the last line manually.
|
||||||
fnInsertNewline(len);
|
bool_t isLast = itText == (newTexts.end() - 1);
|
||||||
|
if(isLast) fnInsertNewline(len);
|
||||||
|
|
||||||
// Next
|
// Next
|
||||||
++partIndex;
|
++partIndex;
|
||||||
|
Reference in New Issue
Block a user