UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

Press enter on string box to apply string change, in addition to clicking away from the box

Open Grossley opened this issue 3 years ago • 12 comments

Press enter on string box to apply string change, in addition to clicking away from the box.

Grossley avatar Feb 16 '22 01:02 Grossley

Since strings can be multiline, this could lead to some weird behaviour.

Miepee avatar Jun 12 '22 17:06 Miepee

It can be applied only to the strings that shouldn't be multiline, so that's not a problem, I guess

VladiStep avatar Jun 12 '22 17:06 VladiStep

That'd be worse, as then you have inconsistent behaviour.

Miepee avatar Jun 12 '22 17:06 Miepee

Even if make a custom property for UndertaleStringReference control - MultiLine (or similar) ?

VladiStep avatar Jun 12 '22 18:06 VladiStep

Personally think that Enter should just enter a newline, while CTRL+Enter should apply the change. Similar to how it is on most text boxes online

Miepee avatar Jun 12 '22 18:06 Miepee

I suggest the following: if it's a single line string, then Enter should accept, and if it's multi-line, then Enter should add a new line and Ctrl+Enter should accept. This behavior will be defined by the custom property.

VladiStep avatar Jun 12 '22 18:06 VladiStep

This is just what I said before: Inconsistency between Strings. What if I want to make a single-line string to a multi-line one? What if i want to make a multi-line string to single-line one? Having different behaviour based on multilines just screams for confusion.

Miepee avatar Jun 12 '22 18:06 Miepee

make a single-line string to a multi-line one

What do you mean by that? I didn't get it.

VladiStep avatar Jun 12 '22 18:06 VladiStep

If it's some name property, its UndertaleStringReference shouldn't accept newlines (MultiLine = false)

VladiStep avatar Jun 12 '22 18:06 VladiStep

That way it's still inconsistent. Forgot about some UTStringReferences. Would probably be better then for Enter to always apply, and "Shift+Enter" adding a new line in multiline textboxes.

Miepee avatar Jun 12 '22 18:06 Miepee

Wait... actually, all UndertaleStringReference don't allow to place newlines. So, why not just to make Enter apply the changes, instead of nothing?

VladiStep avatar Jun 12 '22 19:06 VladiStep

read the last message i posted:

Would probably be better then for Enter to always apply

And IMO string references should allow newline. That's one of the current bugs where editing a shader properly fails.

Miepee avatar Jun 12 '22 19:06 Miepee