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

Add support for exiting formspecs by doubleclicking outside #1200

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
4 participants
@sapier
Copy link
Contributor

sapier commented Apr 5, 2014

Formspec performance fixes
Some code cleanup

@rubenwardy

This comment has been minimized.

Copy link
Member

rubenwardy commented Apr 28, 2014

This improves the user interface a lot.

However, I think clicking outside of a formspec when you have an item in your hand drops it. Does this patch take this into account?

@sapier

This comment has been minimized.

Copy link
Contributor Author

sapier commented Apr 28, 2014

I didn't have that in mind but does this really conflict? One is single the other double click?

@rubenwardy

This comment has been minimized.

Copy link
Member

rubenwardy commented Apr 28, 2014

Oh, okay.

@sapier

This comment has been minimized.

Copy link
Contributor Author

sapier commented Apr 29, 2014

Useless without #1241.

@sapier sapier closed this Apr 29, 2014

@sapier sapier reopened this May 7, 2014

@DavidMikeSimon

View changes

src/guiFormSpecMenu.cpp Outdated
(m_doubleclickdetect[0].pos.Y - m_doubleclickdetect[1].pos.Y));

if (distance < 30) {

This comment has been minimized.

Copy link
@DavidMikeSimon

DavidMikeSimon May 19, 2014

Slight optimization possible here: instead of finding the real distance with sqrt and comparing against 30, you can find the squared distance and compare against 900 (that is, 30^2).

This comment has been minimized.

Copy link
@DavidMikeSimon
@sfan5

View changes

src/guiFormSpecMenu.cpp Outdated
* check if event is part of a double click
* @param event event to evaluate
* @return true/false if a doubleclick was detected
*/

This comment has been minimized.

Copy link
@sfan5

sfan5 Jun 1, 2014

Member

Doxygen comments are acceptable, but PLEASE put them in the header file.
--http://dev.minetest.net/Code_style_guidelines

This comment has been minimized.

Copy link
@sapier

sapier Jun 12, 2014

Author Contributor

Hmm honoring latest discussion results we should change "acceptable" to "appreciated" ... I moved it to header, no idea why I put it to cpp file originally.

@sapier

This comment has been minimized.

Copy link
Contributor Author

sapier commented Jun 12, 2014

merged 003634e

@sapier sapier closed this Jun 12, 2014

@sapier sapier deleted the sapier:add_doubleclick_formspec_exit branch Jan 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.