More restyling
This commit is contained in:
parent
26f25d969c
commit
8da464dcd2
2 changed files with 35 additions and 35 deletions
4
Data.lua
4
Data.lua
|
|
@ -252,8 +252,8 @@ end
|
|||
-- Item options: name and modifier (first entry = no item)
|
||||
AltSystem.Data.Items = {
|
||||
{ name = "No item", modifier = 0 },
|
||||
{ name = "Rare item", modifier = 3 },
|
||||
{ name = "Epic item", modifier = 5 },
|
||||
{ name = "Rare", modifier = 3 },
|
||||
{ name = "Epic", modifier = 5 },
|
||||
}
|
||||
|
||||
-- Defense / Armor options: name and modifier
|
||||
|
|
|
|||
66
UI.lua
66
UI.lua
|
|
@ -372,41 +372,9 @@ 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)
|
||||
radio.UpdateVisual()
|
||||
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
|
||||
yPos = yPos - 28
|
||||
--CreateSubLabel(content, "Label", PADDING, yPos)
|
||||
--yPos = yPos - 22
|
||||
|
||||
|
|
@ -484,6 +452,38 @@ 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)
|
||||
radio.UpdateVisual()
|
||||
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: Roll Dice
|
||||
CreateSectionHeader(content, "Roll Dice", PADDING, yPos)
|
||||
yPos = yPos - 22
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue