Skip to content

Commit

Permalink
Using parent keys + minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Solanya committed Jan 14, 2024
1 parent c95acd1 commit 5b2028a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1119,14 +1119,14 @@ function setEditDisplay()
frame.miscIndex = frameIndex;
_G[frame:GetName() .. "Icon"].IC = miscStructure.IC or TRP3_InterfaceIcons.Default;
_G[frame:GetName() .. "NameField"]:SetText(miscStructure.NA or loc.CM_NAME);
-- Disabling name edition on presets
-- Disable name editing on presets
if miscStructure.ID == TRP3_API.MiscInfoType.Custom then
_G[frame:GetName() .. "NameField"]:Show();
_G[frame:GetName() .. "PresetNameText"]:Hide();
frame.PresetName:Hide();
else
_G[frame:GetName() .. "NameField"]:Hide();
_G[frame:GetName() .. "PresetNameText"]:Show();
_G[frame:GetName() .. "PresetNameText"]:SetText(miscStructure.NA or loc.CM_NAME);
frame.PresetName:Show();
frame.PresetName:SetText(miscStructure.NA or loc.CM_NAME);
end
_G[frame:GetName() .. "ValueField"]:SetText(miscStructure.VA or loc.CM_VALUE);
refreshEditIcon(_G[frame:GetName() .. "Icon"]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ https://raw.githubusercontent.com/Meorawr/wow-ui-schema/main/UI.xsd">
</Frames>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentPresetNameText" parentKey="PresetName" text="[preset]" inherits="GameFontNormal" justifyH="LEFT">
<FontString parentKey="PresetName" text="[preset]" inherits="GameFontHighlight" justifyH="LEFT">
<Size x="100" y="18"/>
<Anchors>
<Anchor point="LEFT" x="15" y="0" relativePoint="RIGHT" relativeTo="$parentIcon"/>
</Anchors>
<Color r="1.0" g="1.0" b="1.0"/>
</FontString>
</Layer>
</Layers>
Expand Down

0 comments on commit 5b2028a

Please sign in to comment.