From 5089a1dea45c9f9f252fc4a6c3ec0e2d01126f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Correia?= Date: Tue, 12 May 2026 16:36:26 +0100 Subject: [PATCH] Messing with sizes and padding --- UI.lua | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/UI.lua b/UI.lua index 4412ec0..0b989bb 100644 --- a/UI.lua +++ b/UI.lua @@ -50,7 +50,7 @@ local function CreateDropdown(parent, name, labelText, options, defaultIndex, on else dropdown:SetPoint("LEFT", container, "LEFT", 0, 0) end - dropdown:SetWidth(180) + dropdown:SetWidth(190) dropdown:SetupMenu(function(dropdown, rootDescription) for i, option in ipairs(options) do @@ -343,6 +343,37 @@ function AltSystem:CreateMainFrame() yPos = yPos - ROW_HEIGHT - SECTION_GAP + -- Item label + CreateSubLabel(content, "Item", PADDING, yPos) + yPos = yPos - 20 + + -- Item radio buttons + local itemRadios = {} + + local function UpdateItemSelection(index) + AltSystem.State.selectedItemIndex = index + for i, radio in ipairs(itemRadios) do + radio:SetChecked(i == index) + end + end + + local itemX = PADDING + for i, item in ipairs(AltSystem.Data.Items) do + local text = item.name + if item.modifier > 0 then + text = text .. " (+" .. item.modifier .. ")" + end + local radio = CreateRadioButton(content, "AltSystemItemRadio" .. i, text, itemX, yPos, + AltSystem.State.selectedItemIndex == i, + function() + UpdateItemSelection(i) + end) + table.insert(itemRadios, radio) + itemX = itemX + 110 + end + + yPos = yPos - ROW_HEIGHT - SECTION_GAP + -- Section: Modifiers (optional) CreateSectionHeader(content, "Modifiers (optional)", PADDING, yPos) yPos = yPos - 18