Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken selection via mouse rect. #50

Closed
lynxlynxlynx opened this issue Jul 4, 2017 · 12 comments
Closed

broken selection via mouse rect. #50

lynxlynxlynx opened this issue Jul 4, 2017 · 12 comments

Comments

@lynxlynxlynx
Copy link
Collaborator

just so it's not forgotten: 5a04992 is to blame.

@bradallred
Copy link
Owner

I dont understand how that would break that. surely GameControl::ChangeMap ought to disable event handling and also reset the mouse state. You sure its not something else?

@lynxlynxlynx
Copy link
Collaborator Author

lynxlynxlynx commented Jul 5, 2017

Yeah, established through bisect. You can revert it and see for yourself. Like I said in the comment, my guess is that now nothing is turning off SF_DISABLEMOUSE... But that doesn't really seem to be the case - the code looks ok and the cursor is still visible and enabled.

@bradallred
Copy link
Owner

ok, so something else somewhere might be setting SF_CUTSCENE, SF_DISABLEMOUSE and must have been relying on this to clear it... thats the only thing i can think of if the cursor isn't greyed.

the question is, should GameControl::ChangeMap do anything if we are in a cutscene? if it is allowed then I suppose changing map ought to clear that.

to me, it doesn't seem like changing map during a cutscene is valid behavior, but I may be wrong (do any cutscenes span multiple areas?)

@lynxlynxlynx
Copy link
Collaborator Author

Why would the cursor be grayed without SF_DISABLEMOUSE being set?

Cutscenes regularly change maps and the function is of course needed. ChangeMap is probably called while starting/loading a game too.

@bradallred
Copy link
Owner

IIRC if the disabled flag on a view is set you will get a greyed cursor too. In fact it may be the only thing that does it anymore.

@lynxlynxlynx
Copy link
Collaborator Author

ChangeMap is usually (if not always) over before you could see that.

@bradallred
Copy link
Owner

ok, I dont know if it will resolve the issue, but if this is called via cutscene and it was previously clearing that flag, then we should call SetCutSceneMode(false) at the beginning (or end since thats where it was before)

@lynxlynxlynx
Copy link
Collaborator Author

No, this is a dead end. In master it's not playing with any of this.

@bradallred
Copy link
Owner

now it makes even less sense :)

I now have to suspect ClearMouseState() somehow getting things stuck

@lynxlynxlynx
Copy link
Collaborator Author

it does, yes. Commenting that out is enough to get the rect back. :)

@bradallred
Copy link
Owner

still, that shouldn't have that result... ClearMouseState() should at worst reset things such that another click and drag ought to work.

seems to indicate some other problem somewhere. Probably one thing we should do is have GC disabled at construction time and only become enabled once a map is loaded.

@bradallred
Copy link
Owner

problem is simply that GameControl::ChangeMap doesn't always change the map :)

this is apparently called from the game loop every iteration too :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants