This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
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.
This fixes #22
Changes were tested using
Visual Studio 2022
onRelease 86
configurationsSummary of Changes
Modified the following files:
src/gui.h
ShowMacroMenu()
prototype to take pointer type parametersrc/gui.cpp
ShowMacroMenu()
implementation to match prototype changessrc/render.cpp
Render()
to stop callinggui::ShowMacroMenu()
when Macro Menu is closed (whenshow_macro_menu
set to false) and to end program if no other windows are open.Reasons for Changes
Modifying
ShowMacroMenu()
p_open
is being passed by reference toImGui::Begin()
, it looks likep_open
itself was being passed-by-valueshow_macro_menu
.ShowMacroMenu()
to take a pointer type parameter should ensureshow_macro_menu
will be modified when the Macro Menu is closedShowMacroMenu()
with my other changes but found the Issue would persist unless I made the above changes.Changes to
Render()
Render()
, sogui::ShowMacroMenu()
would always be called even if the Macro Menu were closed.Render()
would immediately re-render (invokeShowMacroMenu()
) if the Macro Menu was closed.gui::ShowMacroMenu()
call in anif/else
block ensures the Macro Menu will stay closed once the user clicks the close button.else
statement allows the program to be shut off once the user exits the Macro Menu.Conclusion
Please let me know if other changes are required.
Additionally, if this PR is approved and merged, I'd like this contribution to count towards my Hacktoberfest 2023 progress.
If the above changes are approved and merged, could the
hacktoberfest-accepted
label be added to the PR/MR?Thank you for considering these changes.