-
Notifications
You must be signed in to change notification settings - Fork 198
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
Make gui/workorder-details
and gui/workshop-job
work again
#799
Open
TymurGubayev
wants to merge
31
commits into
DFHack:master
Choose a base branch
from
TymurGubayev:TymurGubayev-patch-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+660
−561
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
84fc36d
Update workorder-details.lua
TymurGubayev 1f9c249
Update workorder-details.rst
TymurGubayev 9eca80b
remove trailing whitespaces
TymurGubayev 8b559fd
merge workorder-details into workshop-job, update to not use `gui.dia…
TymurGubayev c94a5be
Update job-details.lua: fix whitespaces
TymurGubayev 1f2c9f5
`require 'gui.dialogs'` for the `showMessage()`
TymurGubayev 3846f1f
add instructions how to open the tool
TymurGubayev d80af4f
explain magic numbers
TymurGubayev d06b5a8
make use of more specific focus strings
TymurGubayev 937e6d2
avoid redefining a variable
TymurGubayev e2bd30f
use more descriptive label text
TymurGubayev 07a9ccd
separate ZScreenModal and Window
TymurGubayev bfa2892
separate ZScreenModal and Window, part 2
TymurGubayev 590dd4a
add the widget to workorder conditions as well
TymurGubayev 7603249
use HotkeyLabel to make actions clickable
TymurGubayev 9ada99a
place the overlay text over task name in BuildingTask view regardless…
TymurGubayev ef0ebcc
do not show unnamed flags even if set
TymurGubayev bf055ab
job-details.rst: mention where can we find the tool
TymurGubayev 85b92c0
enable in the workshops' work order details screen
TymurGubayev 36985ed
improve positioning logic for building overlay
TymurGubayev 069fd09
set auto_width=true on hotkey labels
TymurGubayev bd88a1a
remove the 'LEAVESCREEN' label
TymurGubayev 77ab5b9
only hide numeric flag names if `dfhack.getHideArmokTools() == true`
TymurGubayev 597c48a
Use user-friendly quantity instead of internal counter
TymurGubayev cd7ca2f
use window size do determine if tabs are in two rows
TymurGubayev bb95a28
disable the key if job has no items
TymurGubayev 17ca139
add an ability to reset changes
TymurGubayev e861565
disable "change type" if Armok mode is off
TymurGubayev 5ac5b9c
use special setItemType and setMaterial methods when resetting changes
TymurGubayev 11393bc
fix a bug introduced in recent commit
TymurGubayev 492417b
fix another bug
TymurGubayev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
make use of more specific focus strings
- Loading branch information
commit d06b5a8a06687db11fa35379ece0878f73d464a7
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move this to the right by 5 so it still looks good at the smallest width
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I "reserved" the whole line using
frame={w=1000, h= 1}
, so that now withdfhack.screen.getWindowSize()
I can move the hotkey around and it always fits.It would've been nice to be able to move the widget itself. IIRC that wasn't possible last time I checked (half a year ago? because of label placement in the workorder-recheck.lua).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I improved upon this. The logic is as follows now.
screen width
minus thedistance from the right
minus thewidget width
x1 < 6
), move the text to the right (offset = 6 - x1
).This works well enough until you try to narrow the game window to the minimum and then widen it again. Then the
self.frame.r
is changed from102
to77
and stays that way. That's why the 4th step is neededself.frame.r
Even with this after widening the window it doesn't immediately get the right position, but another small resizing in any direction sets it right.