sweetgiorni / AnyPortal

A Valheim mod for more flexible portals
Do What The F*ck You Want To Public License
17 stars 11 forks source link

Portal existing name protection #4

Closed BurroTile closed 3 years ago

BurroTile commented 3 years ago

Feature request. Please add some sort of portal name protection after a portal has been named. It is really easy to accidentally wipe out the portal name when trying to select a destination as the name is auto selected on interaction. This is an awesome mod, thank you for your work on this!

sweetgiorni commented 3 years ago

Sure, could you describe exactly what sequence of inputs causes this? I don't think I've run into this problem yet.

BurroTile commented 3 years ago

Pressing e to interact with portal opens the dialog with your injected ui elements with the portal name box in focus and all text is selected as is the vanilla behavior. Any keyboard input other than esc completely wipes out the existing portal name. Thanks.

sweetgiorni commented 3 years ago

I think that's actually the vanilla behavior, which makes sense. I guess I haven't run into this issue because after I interact with a portal, I don't start typing on my keyboard... why are you doing that? :)

BurroTile commented 3 years ago

Mostly expecting e to close the dialog as in interactions with containers. It's not intentional I assure you :). In vanilla once a portal is established there is usually no more interactions but with your awesome mod interactions are common if not standard. Maybe a "set" or "close" button to simply close the dialog to help avoid keyboard interactions. Just a thought but thanks for the replies and the mod.

sweetgiorni commented 3 years ago

I still want to take a look at this

sweetgiorni commented 3 years ago

So I thought it would be easy to just deselect the text input after opening the portal GUI, but it's actually kind of annoying to change. It's on a loop that constantly sets focus on the text box as long as it remains open. It could be patched, but I don't think it's worth the trouble.

However, 1.0.4 adds an "OK" button that closes the portal GUI. Hopefully this will abate your urge to start smashing your keyboard.