mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 05:58: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
|
### MLEM
|
||||||
Fixes
|
Fixes
|
||||||
- Fixed control characters being included in TextInput
|
- Fixed control characters being included in TextInput
|
||||||
|
- Fixed TextInputs behaving incorrectly when switching between multiline and single-line modes
|
||||||
|
|
||||||
### MLEM.Ui
|
### MLEM.Ui
|
||||||
Fixes
|
Fixes
|
||||||
|
|
|
@ -485,6 +485,8 @@ namespace MLEM.Input {
|
||||||
this.textOffset = 0;
|
this.textOffset = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
this.splitText = null;
|
||||||
|
this.lineOffset = 0;
|
||||||
// not multiline, so scroll horizontally based on caret position
|
// not multiline, so scroll horizontally based on caret position
|
||||||
if (this.Font.MeasureString(this.text).X * this.TextScale > this.Size.X) {
|
if (this.Font.MeasureString(this.text).X * this.TextScale > this.Size.X) {
|
||||||
if (this.textOffset > this.CaretPos) {
|
if (this.textOffset > this.CaretPos) {
|
||||||
|
|
Loading…
Reference in a new issue