1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-24 21:48:35 +01:00

Fixed TextInputs behaving incorrectly when switching between multiline and single-line modes

This commit is contained in:
Ell 2023-02-17 13:16:49 +01:00
parent f6beaff43a
commit a47d3f50cb
2 changed files with 3 additions and 0 deletions

View file

@ -15,6 +15,7 @@ Jump to version:
### MLEM
Fixes
- Fixed control characters being included in TextInput
- Fixed TextInputs behaving incorrectly when switching between multiline and single-line modes
### MLEM.Ui
Fixes

View file

@ -485,6 +485,8 @@ namespace MLEM.Input {
this.textOffset = 0;
}
} else {
this.splitText = null;
this.lineOffset = 0;
// not multiline, so scroll horizontally based on caret position
if (this.Font.MeasureString(this.text).X * this.TextScale > this.Size.X) {
if (this.textOffset > this.CaretPos) {