MantisBT - VCMI
View Issue Details
0003039VCMIGUI - Hero screen / Exchange windowpublic2019-02-16 11:542019-02-17 14:53
mpech 
 
normalminoralways
newopen 
Ubuntu 16.04.5 LTS
0.99 
 
0003039: no mouse click action possible when assemling artefacts
hello guys,

when assembling artefacts (like armor of the damned) one cannot click (either yes or no)
however, I can [enter] or [esp] with the keyboard.
Once I (let say [enter]), I cannot click to quit the hero screen, but I can still [enter] to close it.
load map,
pickup artefacts in order
in hero screen,
switch the shield of the damned (equiped) with the shield of the yawning dead(stacked)
popup asking to make the armor of the damened occurs
but only keyboard is available
No tags attached.
? zzz_test_artefacts.vmap (2,737) 2019-02-16 11:54
https://bugs.vcmi.eu/file_download.php?file_id=2987&type=bug
png propersettup_cropped.png (318,708) 2019-02-17 09:46
https://bugs.vcmi.eu/file_download.php?file_id=2988&type=bug
png

png wrongoffset_cropped.png (303,310) 2019-02-17 09:46
https://bugs.vcmi.eu/file_download.php?file_id=2989&type=bug
png
Issue History
2019-02-16 11:54mpechNew Issue
2019-02-16 11:54mpechFile Added: zzz_test_artefacts.vmap
2019-02-17 09:46mpechFile Added: propersettup_cropped.png
2019-02-17 09:46mpechFile Added: wrongoffset_cropped.png
2019-02-17 09:49mpechNote Added: 0007754
2019-02-17 14:53mpechNote Added: 0007755

Notes
(0007754)
mpech   
2019-02-17 09:49   
if this can help..

In capture GUI...
proper_settup image is when: left hand hero is free. I put there the shield of yawning dead.
yesnopopinfo shows.

then I click the validate button (top left corner).
coordinate of the click is 328/412

    void CGuiHandler::handleMouseButtonClick(CIntObjectList & interestedObjs, EIntObjMouseBtnType btn, bool isPressed)
    {
        std::cout<<"handle click"<<std::endl;
        auto hlp = interestedObjs;
        std::cout<<"GOT "<<current->motion.x<<" "<<current->motion.y<<std::endl;

wrong_offset_image is when: shield of the damened is equiped. I put there the shield of yawning dead.
yesnopopinfo shows.
then I click the validate button (top left corner).
coordinate of the click is now 349/434
(so about 21pixels offset)
(0007755)
mpech   
2019-02-17 14:53   
More infos...

dragdrop starts when picking up shield of the yawning dead
when dropping onto the left hand slot
shield is dropped
yesno popup shows
shield of the damned is picked up and ddrop start. (ArtifactHolder::select, dragAndDropCursor is called)
then there is a mouse offset applied on the cursor CCursorHandler::dragAndDropCursor (dndObject)

Once we cancel the yesnopopup,
the cursor does not show the artifact but I guess it is actually "there".
One can drop it on the stack (first slot) or the left hand again by clicking on the (almost) top-left corner (since dd offset is still applied..)

Somehow, workaround is to simply either unequip the left hand slot before trying to assemble
Or to click on the topleft corner afterwards

Still hope you guys can solve this quirk