Spell list not focused when opening spellbook

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Spell list not focused when opening spellbook

Post by Ralzar »

I just watched a strea, where this was pointed out:

If you open the spellbook, the arrow keys do nothing.

However, if you left-click once on a spell, the spell list gets focused. Now up/down arrows moves your selction in the spell list.

Maybe have the game auto-focus on the spell list when you open the spell book?

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Spell list not focused when opening spellbook

Post by Interkarma »

List focus depends on mouse position. No need to click on a spell, just the mouse just has to be over the list you want to scroll with keyboard. Better using mouse wheel instead of arrow keys anyway.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Spell list not focused when opening spellbook

Post by King of Worms »

Well that sounds like a explanation of bad feature - with all respects IK ๐Ÿ˜Š

Why the mouse must be over the spells so you can scroll with keyboard? ๐Ÿ˜‰

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Spell list not focused when opening spellbook

Post by Interkarma »

That's how focus works in DFU. It's consistent across all UIs and is really designed for mousewheel operation. Works great when you have multiple lists to operate in same UI.

As a point of interest, mousing over list controls in classic has the opposite effect. It actually breaks keyboard scrolling on the control you have mouse over (instead list only selects item under mouse). In that context, I actually thought I was fixing this in DFU. No pleasing everyone, I guess. :)

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Spell list not focused when opening spellbook

Post by Ralzar »

Haha, well yeah. Compared to that, this is a fix :D

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Spell list not focused when opening spellbook

Post by Interkarma »

I agree this should be polished later though. Have thought of a way to improve this while typing out above response. I need more hours in the day, you guys. :(

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Spell list not focused when opening spellbook

Post by King of Worms »

No worries and I can deffo live with this feature if its not changed in a future.
I know how time consuming it is, when you try to fit RL in the DFU... oh I mean the other way!! :lol:

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Spell list not focused when opening spellbook

Post by Interkarma »

I added a flag to ListBox that allows it to accept keyboard input when mouse not over control, and enabled this for spellbook. This change will allow keyboard scrolling and selecting spells in spellbook even when mouse not over control.

https://github.com/Interkarma/daggerfal ... aac4b4ddec

This isn't the same thing as proper focused controls like you see in Windows, for example. There's no real concept of focused controls in DagUI. But this change will allow single-list UIs to always accept keyboard input for that list. This flag will only be enabled in cases where there's a single list that can't overlap with any other control inputs.

Post Reply