summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2020-12-28 22:10:25 -0800
committerGitHub <noreply@github.com>2020-12-28 22:10:25 -0800
commit77475adee52b799290f72f9d65c8ca42821059bb (patch)
tree14de6a00283fc1377525ba8472de48dee26b8b90
parent5fea821f05512e000773796fec1f2bec113e8f0f (diff)
parent6d97a02aed2847cbf4b3996ac86c31d5bc52e8c4 (diff)
Merge pull request #29 from Pheenoh/scrolling_bug0.1
Fix Scrolling Bug
-rw-r--r--src/lib.cpp2
-rw-r--r--src/utils/lines.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib.cpp b/src/lib.cpp
index dc2b1a4..9b3035c 100644
--- a/src/lib.cpp
+++ b/src/lib.cpp
@@ -95,7 +95,7 @@ void draw() {
setupRendering();
// Consolas.setupRendering();
if (MenuRendering::is_menu_open()) {
- Font::gz_renderChars("tpgz v0.1a", sprite_offsets[MENU_INDEX].x + 35.0f, 25.0f, cursor_rgba,
+ Font::gz_renderChars("tpgz v0.1", sprite_offsets[MENU_INDEX].x + 35.0f, 25.0f, cursor_rgba,
g_drop_shadows);
if (gzIconTex.loadCode == TexCode::TEX_UNLOADED) {
diff --git a/src/utils/lines.cpp b/src/utils/lines.cpp
index 484a9de..bae291f 100644
--- a/src/utils/lines.cpp
+++ b/src/utils/lines.cpp
@@ -24,6 +24,11 @@ void render_lines(Line input_lines[], int cursor, int LINES) {
max_line_width = max_value_f(max_line_width, Font::get_chars_width(input_lines[i].line));
}
+ if (LINES <= 15) {
+ min_line = 0;
+ max_line = 15;
+ }
+
for (int i = 0; i < LINES; i++) {
if (cursor > max_line) {
max_line = cursor;