Wiethoofd@JB, I assume you want your 'backpackpanel' to simply be moved to the right.
Instead of messing with weird offsets, actually just 'shrink' the backpack_panel and move that, then the offcenter and xpos values don't get weird values trying to correct odd forced behaviour.
Especially if you start using pin_to_sibling you only need to move your background and change the item offcenter (if that) to move everything to the left or right!
(Also not sure if you have a 'reloadscheme' button in the panel or refresh the backpack with the vgui_drawtree, but the button is currently saving my life trying to make edits to your backpackpanel.res ;)
(will update this post with a fixed version later)
I fixed your backpackpanel.res (download)
Reduced the overall width of the panel, corrected the alignment of items and page buttons.
- Made the item images align horizontally/vertically in their item boxes, as well as using the HQ item trick
- Back/Previous buttons + page number indication top left (+ hidden A & D page changing keys)
- Pinned a bunch of elements together so you only need to move one
- Moved the search box top right in the 'title bar'
- Moved the 'Cancel' button to where the 'sort' dropdown is when using/applying an item
- Increased the width of the title bar text (when applying items with long names)
- Repositioned the next/previous page buttons when dragging an item
- Increased size of the dragged item
- Resized page buttons & 'new' indicators
Things you still have to change/fix, because I don't have your colors/fonts/borders in my clientscheme.res:
- Page navigation buttons default/hover states and colors as well as the cancel button
- Current page font & 'New' indicator font sizes
- Checking if your 'CheckboxFix' aligns correctly after having pinned it
Wow that's incredible. Thanks a lot man! Your changes also make it look a lot better, I love it. Only one Problem, I have to reload backpack_panel with vgui_drawtree once before everything aligns. Anything I can do about this? Before After
I've been using vgui_drawtree to reload. Can I simply add a button with "reloadscheme" as command in my panel/backpack.res to reload it? That sounds a lot easier. :D