edited grapher implementation

- fixed grapher implementation with new gui
- fixed a bug in CgLineEdit where pressing backspace on an empty input would cause a crash
This commit is contained in:
FantasyPvP
2023-11-24 21:53:41 +00:00
parent 24d231585d
commit b28b53418a
4 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ impl CgTextEdit for CgLineEdit {
self.ptr += 1;
}
fn backspace(&mut self) {
if self.ptr >= 0 {
if self.ptr > 0 {
self.ptr -= 1;
self.text.remove(self.ptr);
}