Page 1 of 1

Spell list not focused when opening spellbook

Posted: Mon Feb 01, 2021 8:58 am
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?

Re: Spell list not focused when opening spellbook

Posted: Mon Feb 01, 2021 9:28 am
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.

Re: Spell list not focused when opening spellbook

Posted: Mon Feb 01, 2021 10:33 am
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? 😉

Re: Spell list not focused when opening spellbook

Posted: Mon Feb 01, 2021 11:04 am
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. :)

Re: Spell list not focused when opening spellbook

Posted: Mon Feb 01, 2021 11:25 am
by Ralzar
Haha, well yeah. Compared to that, this is a fix :D

Re: Spell list not focused when opening spellbook

Posted: Mon Feb 01, 2021 11:33 am
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. :(

Re: Spell list not focused when opening spellbook

Posted: Mon Feb 01, 2021 11:56 am
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:

Re: Spell list not focused when opening spellbook

Posted: Mon Feb 01, 2021 10:55 pm
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.