[wesnoth-commits] [wesnoth/wesnoth] 428cbb: gui2: Delegate mouse cursor reset to modal dialogs
Charles Dang
noreply at github.com
Thu Jan 23 04:30:49 UTC 2020
Branch: refs/heads/1.14
Home: https://github.com/wesnoth/wesnoth
Commit: 428cbbbe9e6d22052ac9100cc3c8b83d0284f187
https://github.com/wesnoth/wesnoth/commit/428cbbbe9e6d22052ac9100cc3c8b83d0284f187
Author: Iris Morelle <shadowm at wesnoth.org>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
M src/gui/dialogs/modal_dialog.cpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
Log Message:
-----------
gui2: Delegate mouse cursor reset to modal dialogs
This is a backport to 1.14 of two commits from master:
* gui2: Delegate mouse cursor reset to modal dialogs
47ddf8877f5bb481b933b2a3dbc012d4c156d69a
* gui2: Fix cursor setter going out of scope as soon as it's created
751043a692920a2e95a79a3a7c488eeda2b16ede
Reason being that in the original, the first commit had a major bug
(issue #4618).
Currently it's the gui2::window class' responsibility, by inheriting
from cursor::setter (yes) and offering absolutely no way to control it.
Unfortunately, it turns out that this can cause issues with tooltips
resetting the cursor at unexpected times when they get
displayed/hidden while having widgets change the cursor depending on
whether they have the mouse focus or not.
Right now the only modeless dialog we have is the tooltip dialog, and
really there's no reason to say that modeless dialogs should have the
ability to reset the cursor without explicitly asking for it. As for
modal dialogs... I don't entirely agree that they should do it either,
but for tradition's sake, let's just keep the current behaviour with
them.
(In an ideal world the cursor business would be managed by the window
managaer IMO, but I'm not ready to argue my case.)
Commit: 513b6d1269f87b24a753467a7efa9afe63e1acd5
https://github.com/wesnoth/wesnoth/commit/513b6d1269f87b24a753467a7efa9afe63e1acd5
Author: Iris Morelle <shadowm at wesnoth.org>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
M data/gui/schema.cfg
M data/gui/widget/text_box_default.cfg
M src/gui/widgets/text_box.cpp
M src/gui/widgets/text_box_base.cpp
M src/gui/widgets/text_box_base.hpp
Log Message:
-----------
gui2/text_box: Add hover effect
This gives GUI2 textboxes (and password boxes since they are a subclass)
a simple hover effect by extending the canvas definitions for the widget
accordingly.
Commit: 487ee0ceec3b655be8c05f4c94fbe3e4ff990421
https://github.com/wesnoth/wesnoth/commit/487ee0ceec3b655be8c05f4c94fbe3e4ff990421
Author: Charles Dang <exodia339 at gmail.com>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
M data/gui/widget/text_box_default.cfg
Log Message:
-----------
GUI2/Text Box: UI tweaks suggested by shadowm
[ci skip]
Commit: 50494b7f06097a50b7541c8640c2e0c208d0a47b
https://github.com/wesnoth/wesnoth/commit/50494b7f06097a50b7541c8640c2e0c208d0a47b
Author: Iris Morelle <shadowm at wesnoth.org>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
A images/cursors-bw/ibeam.png
A images/cursors/ibeam.png
M src/cursor.cpp
M src/cursor.hpp
M src/gui/widgets/text_box_base.cpp
M src/gui/widgets/text_box_base.hpp
Log Message:
-----------
gui2/text_box: Implement I-beam cursor
This is a backport to 1.14 of multiple commits from master:
* gui2/text_box: Implement I-beam cursor
d7f2595393e2744d87ee504557b92264fca29741
* Don't forcefully disable colour cursors
fc04268aa4eb725433d1db458973f1d187f73598
* Set the I-beam cursor's hotspot properly
c31047af4723c76dcfb3561d77a3d6c211c2994c
This cursor is active when the widget has the mouse focus. You know,
like textboxes are wont to do anywhere else. Took long enough, although
there was an interaction issue with tooltips fixed in the previous
commit.
I still need to figure out how to make this work with GUI1 textboxes
(e.g. in-game console).
The colour version of the cursor was kindly provided by LordBob, and the
B&W version is my own.
Commit: 01d0e65e0851ea3c3a36cee40ce4bd5f0f173863
https://github.com/wesnoth/wesnoth/commit/01d0e65e0851ea3c3a36cee40ce4bd5f0f173863
Author: Iris Morelle <shadowm at wesnoth.org>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
M src/widgets/textbox.cpp
Log Message:
-----------
gui1: Implement I-beam cursor for GUI1 textboxes
Commit: 95ad5e2173aec0b4fe8959e7129fdc2ae08687b7
https://github.com/wesnoth/wesnoth/commit/95ad5e2173aec0b4fe8959e7129fdc2ae08687b7
Author: Iris Morelle <shadowm at wesnoth.org>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
M data/gui/widget/text_box_default.cfg
Log Message:
-----------
gui2/text_box: Re-do borders for all states
This makes it so all states of the text box widget have borders again.
The colours are changed, however, so that the focused state has the
brightest border.
This turned out to be necessary because otherwise the chat input textbox
in the MP lobby completely blends with the chat log box, making it seem
as though it disappears whenever it doesn't have the keyboard focus.
[ci skip]
Commit: 53869dccf893dbfabf57d522e59cf612f0d48a4e
https://github.com/wesnoth/wesnoth/commit/53869dccf893dbfabf57d522e59cf612f0d48a4e
Author: Iris Morelle <shadowm at wesnoth.org>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
M changelog.md
Log Message:
-----------
Update changelog
[ci skip]
Commit: 3db2fa71e42714176113ff6ed93ce59dcbd14b09
https://github.com/wesnoth/wesnoth/commit/3db2fa71e42714176113ff6ed93ce59dcbd14b09
Author: Charles Dang <exodia339 at gmail.com>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
M changelog.md
M data/gui/schema.cfg
M data/gui/widget/text_box_default.cfg
A images/cursors-bw/ibeam.png
A images/cursors/ibeam.png
M src/cursor.cpp
M src/cursor.hpp
M src/gui/dialogs/modal_dialog.cpp
M src/gui/widgets/text_box.cpp
M src/gui/widgets/text_box_base.cpp
M src/gui/widgets/text_box_base.hpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
M src/widgets/textbox.cpp
Log Message:
-----------
Merge pull request #4710 from shikadiqueen/backport/1.14-ibeam-cursor
ui: Backport I-beam cursor + Textbox hover and border changes
Compare: https://github.com/wesnoth/wesnoth/compare/98fc1251e61c...3db2fa71e427
More information about the Commits
mailing list