Fancy UI stuff

- Increased the size of the "top left panel" customization menu element to accommodate new additions.
- Added a rudimentary UI element to show what value the Light Brightness is on. Only displayed when turned on.
- Moved the "Controller Mode is enabled." text from standalone drawtext to now being part ot the "top left panel" element, meaning it moves with it instead of being an overlayed text.
This commit is contained in:
MokaAkashiya85 2025-02-22 17:56:41 +01:00
parent 042a26d2b5
commit 3bd56f2b25

View File

@ -684,11 +684,6 @@ function SWEP:CreateCustomizeHUD()
]] ]]
if ARC9.ControllerMode() then if ARC9.ControllerMode() then
surface.SetTextPos(ARC9ScreenScale(4), ARC9ScreenScale(4))
surface.SetTextColor(ARC9.GetHUDColor("fg"))
surface.SetFont("ARC9_8")
surface.DrawText(ARC9:GetPhrase("customize.hint.controller"))
--[[surface.SetMaterial(Material("arc9/gamepad/corner.png", "")) --[[surface.SetMaterial(Material("arc9/gamepad/corner.png", ""))
surface.SetDrawColor(255, 255, 255, 255) surface.SetDrawColor(255, 255, 255, 255)
@ -1399,9 +1394,29 @@ function SWEP:CreateHUD_RHP()
self.CustomizeHUD.topleft_panel = topleft_panel self.CustomizeHUD.topleft_panel = topleft_panel
topleft_panel:SetPos(-ARC9ScreenScale(70) + deadzonexx, -ARC9ScreenScale(40)) -- w = 0, h = 0 topleft_panel:SetPos(-ARC9ScreenScale(70) + deadzonexx, -ARC9ScreenScale(40)) -- w = 0, h = 0
topleft_panel:MoveTo(deadzonexx, 0.1, 0.4, 0, 0.1, nil) topleft_panel:MoveTo(deadzonexx, 0.1, 0.4, 0, 0.1, nil)
topleft_panel:SetSize(ARC9ScreenScale(70+29), ARC9ScreenScale(40)) topleft_panel:SetSize(ARC9ScreenScale(70+40), ARC9ScreenScale(40 + 29))
topleft_panel:MoveToFront() topleft_panel:MoveToFront()
topleft_panel.Paint = function(self2, w, h) end topleft_panel.Paint = function(self2, w, h)
if ARC9.ControllerMode() then
surface.SetFont("ARC9_8")
surface.SetTextColor(ARC9.GetHUDColor("fg"))
surface.SetTextPos(ARC9ScreenScale(4), ARC9ScreenScale(4))
surface.DrawText(ARC9:GetPhrase("customize.hint.controller"))
end
if GetConVar("arc9_cust_light"):GetBool() then
local clt = math.Round(GetConVar("arc9_cust_light_brightness"):GetFloat(), 3)
local cltw = surface.GetTextSize(clt)
surface.SetTextPos(ARC9ScreenScale(58.5) - cltw / 2, ARC9ScreenScale(40))
surface.SetFont("ARC9_8")
surface.SetTextColor(ARC9.GetHUDColor("fg"))
surface.DrawText( clt )
end
end
local topleft_settings = vgui.Create("ARC9TopButton", topleft_panel) local topleft_settings = vgui.Create("ARC9TopButton", topleft_panel)
topleft_settings:SetPos(ARC9ScreenScale(19), ARC9ScreenScale(19)) topleft_settings:SetPos(ARC9ScreenScale(19), ARC9ScreenScale(19))