Skip to content

Commit

Permalink
resize title screen hover area to original size
Browse files Browse the repository at this point in the history
could be item based but nah i guess
  • Loading branch information
poco0317 committed Oct 23, 2021
1 parent 9392492 commit 6657fd6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Themes/Rebirth/Graphics/ScreenTitleMenu scroller.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ local screen
local choiceTextZoom = 0.6
local buttonVerticalFudge = 5

-- initial width of the selector
-- it may be bigger or smaller in reality due to item resizing done in ScreenTitleMenu underlay
local selectorWidth = 574 / 1920 * SCREEN_WIDTH

-- look through the choices defined in metrics.ini [ScreenTitleMenu] ChoiceNames
-- the Scrollers (choices) are named "ScrollChoice<GameCommandName>" so we just have to look for it that way
-- we offset it by 1 to index it from 0: the index being sent back to c++ needs to be 0 indexed
Expand Down Expand Up @@ -55,7 +59,7 @@ return Def.ActorFrame {
self:halign(0)
self:diffusealpha(0)
local txt = self:GetParent():GetChild("ScrollerText")
self:zoomto(txt:GetZoomedWidth(), txt:GetZoomedHeight() + buttonVerticalFudge)
self:zoomto(selectorWidth, txt:GetZoomedHeight() + buttonVerticalFudge)
end,
MouseOverCommand = function(self)
-- if not focused on the scroller, don't allow controlling it
Expand Down

0 comments on commit 6657fd6

Please sign in to comment.