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

Add alternative rightclick behavior overlay to gui/design #1345

Merged
merged 9 commits into from
Dec 6, 2024

Conversation

nibirubingus
Copy link
Contributor

@nibirubingus nibirubingus commented Dec 4, 2024

This adds the overlay proposed in DFHack/dfhack#5025. Name tentative.

@myk002
Copy link
Member

myk002 commented Dec 4, 2024

since this "script" does nothing when run and is controllable entirely via other interfaces, I think we should attach it to an existing tool and document it with that tool. This is thematically linked with the tooltip overlay, so I'd suggest tacking this code onto gui/design.lua after the DimensionsOverlay class.

Documentation can be added to docs/gui/design.rst. Here's another example of docs for a tool with multiple overlays: https://github.com/DFHack/dfhack/blob/develop/docs/plugins/dig.rst?plain=1#L194

fixrightclick.lua Outdated Show resolved Hide resolved
@nibirubingus nibirubingus marked this pull request as draft December 4, 2024 18:18
@nibirubingus nibirubingus changed the title Add fixrightclick overlay script Add alternative rightclick behavior overlay to gui/design Dec 4, 2024
@nibirubingus nibirubingus marked this pull request as ready for review December 4, 2024 19:10
docs/gui/design.rst Outdated Show resolved Hide resolved
'dwarfmode/Designate',
'dwarfmode/Burrow/Paint',
'dwarfmode/Stockpile/Paint',
'dwarfmode/Zone/Paint',
Copy link
Member

Choose a reason for hiding this comment

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

Ha - I need to handle this case for DimensionsOverlay too. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem - I actually wanted to do that myself but for some reason it wouldn't work even though I'm sure I made almost the exact same change. Must've been a syntax error

Copy link
Member

Choose a reason for hiding this comment

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

after you made the edit, did you run :lua require('plugins.overlay').rescan()? changes to overlay widgets need to be reloaded at the framework level.

Copy link
Contributor Author

@nibirubingus nibirubingus Dec 6, 2024

Choose a reason for hiding this comment

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

Uh, I can't remember if I did that after I'd added design.rightclick. But I definitely did restart my game

gui/design.lua Outdated Show resolved Hide resolved
@myk002
Copy link
Member

myk002 commented Dec 6, 2024

At your leisure, we would be honored if you could add your name to https://github.com/DFHack/dfhack/blob/develop/docs/about/Authors.rst

@myk002 myk002 merged commit 9fd678d into DFHack:master Dec 6, 2024
10 checks passed
@nibirubingus nibirubingus deleted the verkhov-fixrightclick branch December 11, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants