calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
173 stars 42 forks source link

Keys 1, 2, 3, 4, 5, 6 should switch active character in the party but only 1, 2 and 6 work #217

Closed x-qq closed 4 years ago

x-qq commented 4 years ago

Tested on 64bit linux.

Additionally, it was reported on IRC that on Windows, key "5" also works (but 3 and 4 still don't).

clort81 commented 4 years ago

Confirmed on aarch64.

clort81 commented 4 years ago

The keyboard event handler simulates a mouseclick over the Party Stats window to switch characters.

gamewin

In game/boe.actions.cpp: ~1726, increasing offsets into the box works for me

// Clort the pass points needed to be shifted further into the party stat box, for some reason +20,4 worksforme
                case '1': case '2': case '3': case '4': case '5': case '6':
                        pass_point = pc_buttons[((short) chr) - 49][PCBTN_NAME].topLeft();
                        pass_point.x += 20 + win_to_rects[WINRECT_PCSTATS].left;
                        pass_point.y += 4 + win_to_rects[WINRECT_PCSTATS].top;

These offsets are prior to scaled window translation by mainPtr.mapCoordsToPixel(pass_point, mainView); so they should work with any scale factor. (tested with 1.000, 2.000, 2.420, 3.000)

retropipes commented 4 years ago

Could anything be altering the width of the PC status area, causing the simulated clicks to go to the wrong place? For instance, a status effect changes the name of your character in such a way as to cause the status line to wrap?

CelticMinstrel commented 4 years ago

Pretty sure the status line does not wrap… it would be cut off if there are too many, I believe.