[1.1.5] Textbox cursor
Posted: Tue Mar 25, 2014 4:26 pm
Not a bug exactly, but the cursor on textboxes and numberboxes can hide when they are aligned with letter stems, like with "p" or "b". It's not an issue when just typing, but it shows up when you use the back arrow. This change will align the cursor between the two characters rather than being offset to the right.
engine/ui/Textbox.lua line 186
engine/ui/Numberbox.lua line 171
Change
self.texcursor.t:toScreenFull(x + self.text_x + (self.cursor-self.scroll) * self.font_mono_w, y + self.cursor_y, self.texcursor.w, self.texcursor.h, self.texcursor.tw, self.texcursor.th)
to
self.texcursor.t:toScreenFull(x + self.text_x + (self.cursor-self.scroll) * self.font_mono_w - (self.texcursor.w / 2), y + self.cursor_y, self.texcursor.w, self.texcursor.h, self.texcursor.tw, self.texcursor.th)
engine/ui/Textbox.lua line 186
engine/ui/Numberbox.lua line 171
Change
self.texcursor.t:toScreenFull(x + self.text_x + (self.cursor-self.scroll) * self.font_mono_w, y + self.cursor_y, self.texcursor.w, self.texcursor.h, self.texcursor.tw, self.texcursor.th)
to
self.texcursor.t:toScreenFull(x + self.text_x + (self.cursor-self.scroll) * self.font_mono_w - (self.texcursor.w / 2), y + self.cursor_y, self.texcursor.w, self.texcursor.h, self.texcursor.tw, self.texcursor.th)