-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Enable mouse input - rework #41605
Merged
ZhilkinSerg
merged 58 commits into
CleverRaven:master
from
martinrhan:branch_mouse_pickup
Aug 3, 2020
Merged
Enable mouse input - rework #41605
ZhilkinSerg
merged 58 commits into
CleverRaven:master
from
martinrhan:branch_mouse_pickup
Aug 3, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Mark Langsdorf <mark.langsdorf@gmail.com>
BevapDin
reviewed
Jun 26, 2020
BevapDin
reviewed
Jun 26, 2020
BevapDin
reviewed
Jun 26, 2020
anothersimulacrum
added
[C++]
Changes (can be) made in C++. Previously named `Code`
Controls / Input
Keyboard, mouse, keybindings, input UI, etc.
Info / User Interface
Game - player communication, menus, etc.
SDL: Tiles / Sound
Tiles visual interface and sounds.
labels
Jun 26, 2020
This pull request introduces 2 alerts when merging 9315ac9 into ff1ff7e - view on LGTM.com new alerts:
|
Co-authored-by: BevapDin <tho_ki@gmx.de>
Co-authored-by: anothersimulacrum <anothersimulacrum@gmail.com>
Co-authored-by: BevapDin <tho_ki@gmx.de>
Co-authored-by: BevapDin <tho_ki@gmx.de>
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
This pull request introduces 1 alert when merging 14bbe4d into 7e17b10 - view on LGTM.com new alerts:
|
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
ZhilkinSerg
reviewed
Jul 28, 2020
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[C++]
Changes (can be) made in C++. Previously named `Code`
Controls / Input
Keyboard, mouse, keybindings, input UI, etc.
Info / User Interface
Game - player communication, menus, etc.
SDL: Tiles / Sound
Tiles visual interface and sounds.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Features "Enable mouse input for uilist and pickup, optimized some codes."
Purpose of change
#41272 (review)
As the using of struct entry_drawn_info is not a good practice, I redone the codes and forgone them.
And beyond that I also further made mouse input thing for pickup. Now user can use mouse to choose items to pickup.
Describe the solution
Used struct inclusive_rectangle in point.h instead. Therefore we get rid of some extra and useless struct defined.
Codes added to pickup.h and pickup.cpp. It is similar to what was done previously, but for pickup it need to have an int cur_it to store the index of which item that this pickup_rect refers to and it doesn't has any entry thing defined as a class, it was just directly do everything within one single method, so I add a struct inheriting inclusive_rectangle, and a static vector<pickup_rect> within it to store all rectangles of pickup entry.
Describe alternatives you've considered
N/A
Testing
WIN10, VS, Release build tested, mouse input worked nicely for inventory, uilist, pickup.
Additional context
Also added one comment for method get_coordinates_text in input.h