FAForever / fa

Lua code for FAF
221 stars 228 forks source link

Fix production queue tooltip in non-default layouts #6243

Closed PaletzTheWise closed 1 week ago

PaletzTheWise commented 3 weeks ago

Description of the proposed changes

image

The top part of the tooltip is the queue. It can be enabled in Options->Interface->Additional Information->Show Factory Queue on Hover.

The issue is that the _left and _right layouts are missing the layouting logic for the queue.

Fix:

Testing done on the proposed changes

Verified the queue tooltip behaves correctly for an observer even when the layout is cycled For each layout

Verified the queue tooltip behaves correctly for a player

INFO: attempting to set skin to:    aeon
WARNING: Error running console command UI_RotateSkin +: e:\workshop\coding\faf\lua\lazyvar.lua(207): attempt to call method `OnDirty' (a nil value)
         stack traceback:
            e:\workshop\coding\faf\lua\lazyvar.lua(207): in function `SetValue'
            e:\workshop\coding\faf\lua\lazyvar.lua(225): in function `Set'
            e:\workshop\coding\faf\lua\ui\uiutil.lua(287): in function `SetCurrentSkin'
            e:\workshop\coding\faf\lua\ui\uiutil.lua(385): in function <e:\workshop\coding\faf\lua\ui\uiutil.lua:350>

Additional context

Checklist

Garanas commented 3 weeks ago

These are great contributions @PaletzTheWise , keep them coming - there's a lot of details such as these that easily got overlooked over the span of a decade worth of contributions from a wide range of people!

PaletzTheWise commented 3 weeks ago

I don't promise anything but I think I'll send a few more fixes indeed :)