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

Support adventure mode look cursor #5230

Merged
merged 8 commits into from
Feb 10, 2025
Merged

Conversation

Bumber64
Copy link
Contributor

Make the fns in gui/dwarfmode.lua modify the adv cursor if in adv mode.
Do the same for Gui::getCursorPos, Gui::getCursorCoords, and Gui::setCursorCoords.
Clean up some direct uses of the cursor.

* Update dwarfmode.lua - Make cursor fns support adv mode look
* Update Gui.cpp - Make cursor fns support adv mode look
* Update changevein.cpp - Use getCursorPos
* Update createitem.cpp - Use getCursorPos
* Update cursecheck.cpp - Doesn't use cursor
* Update stripcaged.cpp - Doesn't use cursor
* Update zone.cpp - Use getCursorPos
@Bumber64
Copy link
Contributor Author

Bumber64 commented Jan 31, 2025

A list of scripts that should be potentially be using the guidm fns instead:

devel/light.lua
devel/query.lua
devel/tree-info.lua
gui/advfort.lua
gui/blueprint.lua
gui/companion-order.lua
gui/tiletypes.lua
modtools/create-unit.lua
colonies.lua
hfs-pit.lua
launch.lua
position.lua
putontable.lua
source.lua
stripcaged.lua
teleport.lua

toggle-kbd-cursor.lua can use guidm.clearCursorPos() instead of guidm.setCursorPos() in one spot. (And should be disabled for adv mode, since we can't actually toggle the cursor. It just moves it around.)

extinguish and firestarter scripts should be considered to work for adv mode now.

docs/changelog.txt Show resolved Hide resolved
docs/changelog.txt Show resolved Hide resolved
library/modules/Gui.cpp Outdated Show resolved Hide resolved
Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

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

I think more changelog entries are warranted in the Lua section about adventure mode cursor support

docs/changelog.txt Outdated Show resolved Hide resolved
library/lua/gui/dwarfmode.lua Outdated Show resolved Hide resolved
@myk002 myk002 merged commit 588ec75 into DFHack:develop Feb 10, 2025
14 checks passed
@Bumber64 Bumber64 deleted the adv_cursor branch February 11, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants