mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-03 17:36:56 +00:00
GetPerfectPixel divided by the uiScale option, or by 1 while useUiScale was off, though the game's automatic scale is never under 0.9, so default borders came out about a tenth of a pixel thin. The game scales UIParent only after add-ons and saved variables load, so the pixel now comes from GetPhysicalScreenSize and the scale the game is about to apply, worked out from the same options and rules as OnDisplaySizeChanged. UI_SCALE_CHANGED offers a reload once when the pixel size changes. The preset dropdown and the pixelperfect module go: its presets were pixel perfect only at 1080p and its restore path never ran. The settings show the game's own Use UI-Scale and UI-Scale options, plus a Pixel Perfect UI-Scale checkbox (one UI unit per screen pixel, kept through window resizes) that overrides them. The pixel perfect border and HiDPI options go too; border sizes now count real pixels. CVAR settings rows write their option through their own config instead of this:GetParent(), which a dropdown's menu button is not. The first-run slider stops at 0.64, below which the game drops uiScale for its automatic scale.