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

GUIFormSpecMenu: Add basic element highlighing debug feature #9423

Merged
merged 2 commits into from Apr 12, 2020

Conversation

SmallJoker
Copy link
Member

This PR adds a highlighting feature to all formspecs which can be enabled using the debug key.
Possible additions in the future: a static text to describe the highlighted element (type name, ID, etc)

To do

This PR is Ready for Review.

How to test

  1. Press the debug key (default: F5)

grafik

@SmallJoker SmallJoker added Feature ✨ PRs that add or enhance a feature Formspec labels Feb 22, 2020
src/gui/guiFormSpecMenu.cpp Outdated Show resolved Hide resolved
@rubenwardy rubenwardy self-requested a review March 1, 2020 14:06
Comment on lines 3289 to 3290
hovered->getAbsoluteClippingRect(),
&hovered_pos);
Copy link
Member

@Desour Desour Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameters are color, pos, *clip, not color, clip, *pos. http://irrlicht.sourceforge.net/docu/classirr_1_1video_1_1_i_video_driver.html#ac7f452fae0ef8abe01768a78ba7033b7
(Just using the clipping rect would also suffice.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thank you. I adjusted the PR accordingly.

@SmallJoker SmallJoker force-pushed the formspec_debug branch 2 times, most recently from 222c318 to 3e2bc25 Compare April 6, 2020 18:55
@SmallJoker SmallJoker merged commit 6cf15cf into minetest:master Apr 12, 2020
@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Apr 13, 2020

Nice.
But the documentation for keymap_toggle_debug should have been updated as well.

aldum pushed a commit to banyamesterseg/minetest that referenced this pull request Apr 16, 2020
nerzhul pushed a commit to nerzhul/minetest that referenced this pull request Apr 27, 2020
@SmallJoker SmallJoker deleted the formspec_debug branch July 5, 2020 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature ✨ PRs that add or enhance a feature Formspec One approval ✅ ◻️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants