Merged latest master with my own .42 build (which has my own modified UI), now tab key won't work as bind.

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
mattwla
Posts: 59
Joined: 17 Jul 2017, 14:45

Merged latest master with my own .42 build (which has my own modified UI), now tab key won't work as bind.

Post by mattwla »

Here is a quick run-down.

I had my own version of .42 that I am tweaking, so far I have modified the dialogue menu and have added a new distant dialogue menu (when an NPC is activated from a distance, player is presented with a menu that lets them wave to the NPC or call NPC over)

I decided to merge with the latest master, and expected some troubles as there has been a rewrite of UI stuff in it.

There were conflicts which I fixed, the game launches and runs fine, my new distant dialogue menu works.... but the tab key doesn't work. For example, if change view is bound to tab it won't work, but if it is bound to "v" it does.

I did some searching and found this?
http://bugs.openmw.org/projects/openmw/ ... 753d806641

I am wondering if my new distant dialogue menu is capturing the tab input even when it is not visible? How might I go about making sure that isn't the case?

Thanks,
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Merged latest master with my own .42 build (which has my own modified UI), now tab key won't work as bind.

Post by scrawl »

That's what happens when you add a widget to the HUD that accepts key focus. But it should only do so if it's also visible.
mattwla
Posts: 59
Joined: 17 Jul 2017, 14:45

Re: Merged latest master with my own .42 build (which has my own modified UI), now tab key won't work as bind.

Post by mattwla »

Thanks for the response. I went ahead and made sure my new windows were not visible, didn't change anything, and I even made it so they were never instantiated in the first place.... still no luck.

Any suggestions how I might track down whatever is intercepting tab?

Thanks
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Merged latest master with my own .42 build (which has my own modified UI), now tab key won't work as bind.

Post by scrawl »

Add a debug output here to print the name of the widget.
mattwla
Posts: 59
Joined: 17 Jul 2017, 14:45

Re: Merged latest master with my own .42 build (which has my own modified UI), now tab key won't work as bind.

Post by mattwla »

Thanks for the tip, after messing around with debugging for while it seems like the program gets stuck in this loop

https://github.com/OpenMW/openmw/blob/m ... n.cpp#L256

After I press tab, and only seems to leave if I enter or leave a cell, then when I press tab we get stuck in the loop again.

My guess is that loops job is to gather all current windows that are able to accept key input? Is it supposed to loop forever or should it terminate when out of menus?

EDIT: Making that selectFirstWidget function just return false fixes the tab issue... so we have narrowed it down. Tab even still works in menus, but e no longer works to loot all (in fact e for loot doesn't work even before the return hack... but does work fine for jumping)

EDIT 2:

So, making a safeguard so the loop cuts out after 10 iterations makes it so tab works... making it so it cuts out after 50 makes tab break again... so I am wondering if one of the things it iterates over breaks it... Maybe the new window I added?

Edit3:

So specifically comenting out getKeyFocusWidget from running in selectFirstWidget fixes the tab issue... but again prevents me from doing neat stuff like looting with e. So I will examine getKeyFocusWidget later today, gotta run now.

My gut feeling is that there is some bit of info I messed with when adding my new distantDialogue menu or when messing with the old dialogue menu, and getKeyFocus widget freaks out when trying to interact with them. Or I messed up something when merging, as git wasn't able to manually merge and I had to go at it with my newbie programming skills.
mattwla
Posts: 59
Joined: 17 Jul 2017, 14:45

Re: Merged latest master with my own .42 build (which has my own modified UI), now tab key won't work as bind.

Post by mattwla »

scrawl wrote: 13 Oct 2017, 20:29 Add a debug output here to print the name of the widget.
Hi,

thanks again for the tip, turns out it was the mini map intercepting tab. And to test I hid the minimap, and tab now works. Now I notice that the mini map just shows black.

I am guessing this is a problem without how I manually merged. I would be curious to hear your thoughts on what might have gone wrong,

thanks,
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Merged latest master with my own .42 build (which has my own modified UI), now tab key won't work as bind.

Post by scrawl »

I would do a compare of your fork against master and check the diff for anything suspicious, particularly in mapwindow.cpp, hud.cpp and openmw_hud.layout I guess.
Post Reply