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

horizontal scrollbar not allowing full width #164

Open
FluffierThanThou opened this issue Aug 27, 2020 · 2 comments
Open

horizontal scrollbar not allowing full width #164

FluffierThanThou opened this issue Aug 27, 2020 · 2 comments

Comments

@FluffierThanThou
Copy link
Member

Reported by: Akenno
Description:
@fluffy The scrollbar won't let me scroll until the end. Here is a picture of it. https://imgur.com/a/8KF8asf
The upper one is where everything is normal.
The lower one is the extended version (or with playing more mods that add more worktypes).

Hope you can help me out! Thanks anyways for taking a look. :)

@chrispikula
Copy link

So, I also have this same issue.
Here are three images, with three scrollbar positions. One at the left, one in the center, ie, the scroll bar looks like it's all the way to the right, and one where the scrollbar pushes off the edge of the screen.

https://imgur.com/a/ptJm6Lz

When I expand the jobs, the Guard job (Guards For Me) is on the left, and the last job is just clipped off (similar to collapsed) by around 5 or 6 pixels. I don't see the favorites.

@fangslash
Copy link

Quick bump because I'm having the same issue. It occurs whenever there are too many columns in the work tab.

Most common way to reproduce is to expand the sub categories, or adding other mods that adds new jobs (e.g. Complex Jobs). Can also happen if you use low resolution/high zoom.

In case if this is helpful, I've also noticed that the horizontal scroll bar would go off screen, and it always cuts of a few pixels of the very last job.

sineme added a commit to sineme/WorkTab that referenced this issue Dec 28, 2022
fixes fluffy-mods#157, fluffy-mods#159 and fluffy-mods#164

The scroll area was using cachedSize for its output rectangle capping it at the screen width.
As the "Work"-tab window is not as wide as the screen, ouput rectangle was too wide when there were many work types.

To fix this the PawnTable was extended with the property methods void set_OutRect(this PawnTable, Rect) and Rect get_OutRect() 'fake adding' a new property that can be used to set and get the "Work"-tab window dimension instead of relying on the screen size.

MainTabWindow_WorkTab.DoWindowContents calls set_OutRect with the window dimension
PawnTable_PawnTableOnGUI.PawnTableOnGUI calls get_OutRect to clamp the output rectangle properly
sineme added a commit to sineme/WorkTab that referenced this issue Dec 28, 2022
fixes fluffy-mods#157, fluffy-mods#159 and fluffy-mods#164

The scroll area was using cachedSize for its output rectangle capping it at the screen width. As the "Work"-tab window is not as wide as the screen, ouput rectangle was too wide when there were many work types.

To fix this the PawnTable was extended with the property methods void set_OutRect(this PawnTable, Rect) and Rect get_OutRect() 'fake adding' a new property that can be used to set and get the "Work"-tab window dimension instead of relying on the screen size.

MainTabWindow_WorkTab.DoWindowContents calls set_OutRect with the window dimension PawnTable_PawnTableOnGUI.PawnTableOnGUI calls get_OutRect to clamp the output rectangle properly

I think ideally PawnTable.PawnTableOnGUI's parameter would be Rect window instead of Vector2 position in the future.
Kupie added a commit to Kupie/WorkTab that referenced this issue Apr 15, 2024
* Update FavouriteManager.cs

Fluffy.WorkTab.NoStoredFavourites was not translated

* Default priority (+ tip) setting now transletable

Update Keyed-English.xml

* Fix horizontal scroll area

fixes fluffy-mods#157, fluffy-mods#159 and fluffy-mods#164

The scroll area was using cachedSize for its output rectangle capping it at the screen width. As the "Work"-tab window is not as wide as the screen, ouput rectangle was too wide when there were many work types.

To fix this the PawnTable was extended with the property methods void set_OutRect(this PawnTable, Rect) and Rect get_OutRect() 'fake adding' a new property that can be used to set and get the "Work"-tab window dimension instead of relying on the screen size.

MainTabWindow_WorkTab.DoWindowContents calls set_OutRect with the window dimension PawnTable_PawnTableOnGUI.PawnTableOnGUI calls get_OutRect to clamp the output rectangle properly

I think ideally PawnTable.PawnTableOnGUI's parameter would be Rect window instead of Vector2 position in the future.

* Respect "Disable Scrollwheel" on Checkbox WorkTypes

* Replace Job Icon Column with Job Text Column

* Make Mod Setting for Job Text Column (Icon vs Text)

* Localize Mod Setting for Job Text Column

* Add Option to Highlight Current Active Work Cell

* Fix: Priorities reset after save-load.

PriorityManager class was relying on Scribe methods in ExposeData() for clearing out old priorities data.
But ExposeData() is not called when a new game is started or a game is loaded which was saved without the mod active.
So, new data was added to the old one.
If a non-modded save was loaded twice, pawn priorities lists were doubled, with the latest list being active.
When the game was subsequently saved and loaded, all data was saved, but only the oldest copy of priorities was restored.
Other copies yielded an error:
Exception in LookDictionary(label=Priorities): System.InvalidOperationException: Tried to add different values for the same key.
Attempts to load priorities data of non-existent pawns, inherited from other games, resulted in a probably harmless error:
Could not resolve reference to object with loadID Thing_Human#

Now, all static members of PriorityManager are initialized by constructor.

* Removed unused project DynamicPawnTable.

* Fix warning: DrawUtilities probably needs a StaticConstructorOnStartup attribute

Fix warning in the game's log:
Type DrawUtilities probably needs a StaticConstructorOnStartup attribute, because it has a field activeHighlightBox of type Texture2D. All assets must be loaded in the main thread.

* Fix: Naming rule violation.

* Fix: active job frame is too bright.

* Fix wording in tooltips: increase/increment/decrease/decrement priorities => raise/lower

* Enable HighlightCurrentJobCell by default.

Also, change names and labels for being consistent: ActiveWorkCells => CurrentJobCell.
Minor clean-up.

* Fix: Numeric settings are reset after restarting the game.

* Fix the last fix: Numeric settings are hard to edit.

---------

Co-authored-by: angelolocritani <67960642+angelolocritani@users.noreply.github.com>
Co-authored-by: Sineme <sineme@users.noreply.github.com>
Co-authored-by: maarxx <chris.lewark@gmail.com>
Co-authored-by: Doomster14 <146005125+Doomster14@users.noreply.github.com>
JiaRG pushed a commit to JiaRG/WorkTab that referenced this issue Jul 7, 2024
fixes fluffy-mods#157, fluffy-mods#159 and fluffy-mods#164

The scroll area was using cachedSize for its output rectangle capping it at the screen width. As the "Work"-tab window is not as wide as the screen, ouput rectangle was too wide when there were many work types.

To fix this the PawnTable was extended with the property methods void set_OutRect(this PawnTable, Rect) and Rect get_OutRect() 'fake adding' a new property that can be used to set and get the "Work"-tab window dimension instead of relying on the screen size.

MainTabWindow_WorkTab.DoWindowContents calls set_OutRect with the window dimension PawnTable_PawnTableOnGUI.PawnTableOnGUI calls get_OutRect to clamp the output rectangle properly

I think ideally PawnTable.PawnTableOnGUI's parameter would be Rect window instead of Vector2 position in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants