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

Implement UI for adding/editing/deleting cheats #4610

Merged
merged 2 commits into from Mar 5, 2019

Conversation

Projects
None yet
3 participants
@zhaowenlan1779
Copy link
Member

zhaowenlan1779 commented Jan 30, 2019

Screenshot:
image

More description can be found in the commit messages.


This change is Reviewable

Show resolved Hide resolved src/citra_qt/cheats.cpp
Show resolved Hide resolved src/citra_qt/cheats.h Outdated
Show resolved Hide resolved src/citra_qt/cheats.h Outdated
@ghost
Copy link

ghost left a comment

rename labelDetails to labelCode
rename textDetails to textCode

zhaowenlan1779 added some commits Jan 30, 2019

core/cheats: Add and change a few functions
Added a few interfaces for adding/deleting/replacing/saving cheats. The cheats list is guarded by a std::shared_mutex, and would only need a exclusive lock when it's being updated.

I marked the `Execute` function as `const` to avoid accidentally changing the internal state of the cheat on execution, so that execution can be considered a "read" operation which only needs a shared lock.

Whether a cheat is enabled or not is now saved by a special comment line `*citra_enabled`.
citra_qt: Implement UI for adding/editing/deleting cheats
The UI file is rewritten, to better make use of Qt's layouts (instead of depending on abstract geometry). "Add Cheat", "Save", "Delete" buttons are also added.

The UI logic should be rather easy and usable (IMO), but the code may seem a bit dirty. If anyone has a better idea regarding UI logic design or code implementation, feel free to tell me about it.

@zhaowenlan1779 zhaowenlan1779 force-pushed the zhaowenlan1779:cheats-ui branch from 1452fdd to 433176a Feb 2, 2019

@zhaowenlan1779

This comment has been minimized.

Copy link
Member Author

zhaowenlan1779 commented Mar 3, 2019

will merge soon if no more comments.

@wwylele

wwylele approved these changes Mar 3, 2019

@zhaowenlan1779 zhaowenlan1779 merged commit 3ea30fe into citra-emu:master Mar 5, 2019

3 checks passed

ci/bitrise/4ccd8e5720f0d13b/pr Passed - citra
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zhaowenlan1779 zhaowenlan1779 deleted the zhaowenlan1779:cheats-ui branch Mar 5, 2019

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.