VN Textbox Scroll initial version

This commit is contained in:
2023-05-20 22:13:22 -07:00
parent 8df72dace1
commit c69352cf9c
17 changed files with 351 additions and 73 deletions

View File

@ -19,7 +19,7 @@ int32_t FontMeasure::getQuadCount() {
return this->realLength;
}
float_t FontMeasure::getHeightOfLineCount(int32_t lineCount) {
float_t FontMeasure::getHeightOfLineCount(size_t lineCount) {
assertTrue(lineCount > 0);
return this->lineHeight * lineCount;
}
@ -28,13 +28,13 @@ size_t FontMeasure::getLineCount() {
return this->lines.size();
}
int32_t FontMeasure::getQuadsOnLine(int32_t line) {
int32_t FontMeasure::getQuadsOnLine(size_t line) {
assertTrue(line >= 0);
assertTrue(line < this->lines.size());
return this->lines[line].length;
}
int32_t FontMeasure::getQuadIndexOnLine(int32_t line) {
int32_t FontMeasure::getQuadIndexOnLine(size_t line) {
assertTrue(line >= 0);
assertTrue(line < this->lines.size());
return this->lines[line].start;

View File

@ -60,7 +60,7 @@ namespace Dawn {
* @param line Which line to get the count of quads for.
* @return Count of quads on that line.
*/
int32_t getQuadsOnLine(int32_t line);
int32_t getQuadsOnLine(size_t line);
/**
* Returns the index, of which quad is the first quad on the given line.
@ -68,7 +68,7 @@ namespace Dawn {
* @param line Line to get the quad index of.
* @return The quad index of that line.
*/
int32_t getQuadIndexOnLine(int32_t line);
int32_t getQuadIndexOnLine(size_t line);
/**
* Returns the height of the count of lines provided.
@ -76,7 +76,7 @@ namespace Dawn {
* @param lineCount Count of lines to get the height of.
* @return Height of the given count of lines.
*/
float_t getHeightOfLineCount(int32_t lineCount);
float_t getHeightOfLineCount(size_t lineCount);
/**
* Returns the count of lines in this string.