ck 11 months ago
commit c3f1938ce0
  1. 4
      DiesalGUI-2.0/Objects/DropDown.lua
  2. 7
      DiesalGUI-2.0/Objects/DropDownItem.lua
  3. BIN
      DiesalStyle-2.0/Media/Fonts/MaterialSymbolsRounded.ttf

@ -146,6 +146,7 @@ local methods = {
clickable = item.clickable,
indent = item.indent or 0,
}, true)
dropdownItem.text:SetPoint("TOPLEFT", 12 + (item.indent * 6), -2)
if item.indent and item.indent > 0 then
local leftOffset = -6 + (-6 * item.indent)
dropdownItem:UpdateStyle("frame-lineV", {
@ -257,8 +258,7 @@ local methods = {
for _, key in ipairs(keyTable) do
if dropdownItem.settings.key == key then
dropdownItem:SetSelected(true)
dropdownText = dropdownText and format("%s, %s", dropdownText, dropdownItem.settings.value) or
dropdownItem.settings.value
dropdownText = dropdownText and format("%s, %s", dropdownText, dropdownItem.settings.value) or dropdownItem.settings.value
selectionTable[#selectionTable + 1] = dropdownItem.settings.key
end
end

@ -65,8 +65,8 @@ local methods = {
end,
---@param self Diesal.GUI.Object.DropDown.Item
["SetText"] = function(self, text)
local indentText = self.settings.indent == 0 and "" or (" " .. (" "):rep(self.settings.indent) .. " ")
self.text:SetText(indentText .. text)
local indentText = (self.settings.indent == 0 and "" or ((" "):rep(self.settings.indent + 3))) .. text
self.text:SetText(text)
end,
---@param self Diesal.GUI.Object.DropDown.Item
["OnClick"] = function(self)
@ -85,8 +85,7 @@ local methods = {
self:SetSelected(not settings.selected)
for i = 1, #dropdownItems do
if dropdownItems[i].settings.selected then
dropdownText = dropdownText and format("%s, %s", dropdownText, dropdownItems[i].settings.value) or
dropdownItems[i].settings.value
dropdownText = dropdownText and format("%s, %s", dropdownText, dropdownItems[i].settings.value) or dropdownItems[i].settings.value
selectionTable[#selectionTable + 1] = dropdownItems[i].settings.key
end
end

Loading…
Cancel
Save