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:
parent
f6beaff43a
commit
a47d3f50cb
2 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue