fix(ui): redigeringsvinduet i menuens mørke tone (lineær farve 0.016) og så bredt som rækkerne (v1.59.5.0)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
SmartPickupFrame.EDIT_PANEL_KINDS = SmartPickupFrame.EDIT_PANEL_KINDS or {}
|
||||
SmartPickupFrame.EDIT_PANEL_WIDTH, SmartPickupFrame.EDIT_PANEL_HEIGHT = 0.80, 0.90 -- andel af listens flade
|
||||
SmartPickupFrame.EDIT_PANEL_HEADER_PX = 80
|
||||
SmartPickupFrame.EDIT_PANEL_ROW_PX = 860 -- rækkerne er ~835 px brede
|
||||
|
||||
function SmartPickupFrame:initEditPanelButtons(i18n)
|
||||
self.panelCloseButtonInfo = {inputAction = InputAction.MENU_BACK, text = i18n:getText("spu_panel_close"), callback = function() self:onClickPanelClose() end}
|
||||
@@ -59,7 +60,9 @@ function SmartPickupFrame:layoutEditPanel()
|
||||
if box == nil or box.absPosition == nil or box.absSize == nil then return end
|
||||
local x, y, w, h = box.absPosition[1], box.absPosition[2], box.absSize[1], box.absSize[2]
|
||||
place(self.editBackdrop, x, y, w, h)
|
||||
local pw, ph = w * SmartPickupFrame.EDIT_PANEL_WIDTH, h * SmartPickupFrame.EDIT_PANEL_HEIGHT
|
||||
-- så bredt som rækkerne (~835 px) + margen, ikke bredere end listen
|
||||
local pw = math.min(w * SmartPickupFrame.EDIT_PANEL_WIDTH, SmartPickupFrame.EDIT_PANEL_ROW_PX * g_pixelSizeScaledX)
|
||||
local ph = h * SmartPickupFrame.EDIT_PANEL_HEIGHT
|
||||
local px, py = x + (w - pw) / 2, y + (h - ph) / 2
|
||||
place(self.editPanel, px, py, pw, ph)
|
||||
local header = SmartPickupFrame.EDIT_PANEL_HEADER_PX * g_pixelSizeScaledY
|
||||
|
||||
Reference in New Issue
Block a user