Skip to content

Commit

Permalink
feat: 更新Locale
Browse files Browse the repository at this point in the history
  • Loading branch information
DengSir committed Sep 5, 2024
1 parent 288620c commit ba081fa
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .emmy/UI/Template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
---@field PortraitRingCover Texture
local tdInspectPortraitTemplate = {}

---@class tdInspectGearTalentFrame : Button
---@class tdInspectGearTalentTemplate : Button
---@field Icon Texture
---@field CircleMask MaskTexture
---@field Text FontString
---@field Point FontString
local tdInspectGearTalentFrame = {}
local tdInspectGearTalentTemplate = {}

---@class __tdInspectGearFrameTemplate_Portrait : tdInspectPortraitTemplate , Frame

---@class __tdInspectGearFrameTemplate_Talent1 : tdInspectGearTalentFrame , Button
---@class __tdInspectGearFrameTemplate_Talent1 : tdInspectGearTalentTemplate , Button

---@class __tdInspectGearFrameTemplate_Talent2 : tdInspectGearTalentFrame , Button
---@class __tdInspectGearFrameTemplate_Talent2 : tdInspectGearTalentTemplate , Button

---@class tdInspectGearFrameTemplate : BackdropTemplate , Frame
---@field Name FontString
Expand Down
2 changes: 2 additions & 0 deletions Localization/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ L['Show character gear list'] = true
L['Show inspect compare'] = true
L['Show inspect gear list'] = true
L['Show talent background'] = true
L.HELP_SUMMARY = true
L.Help = true
-- @locale-fill@
-- @end-import@
-- @end-debug@
4 changes: 4 additions & 0 deletions Localization/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ L['Show character gear list'] = '显示角色的装备列表'
L['Show inspect compare'] = '观察是比较装备'
L['Show inspect gear list'] = '显示被观察者装备列表'
L['Show talent background'] = '装备列表显示天赋背景'
L.Help = '帮助'
L.HELP_SUMMARY = [[1. 大部分玩家右键菜单(好友,公会,聊天等),可远程观察玩家。
2. 若玩家菜单右键没有观察选项,尝试禁用玩家菜单增强插件。
3. 角色装备列表非当前天赋按钮,点击可切换天赋。]]
-- @locale-fill@

-- @end-import@
4 changes: 4 additions & 0 deletions UI/GearFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,7 @@ function GearFrame:UpdateTalent(button, group, isActive)
self:SetBackground()
end
end

function GearFrame:OptionOnClick()
ns.Addon:OpenOptionFrame()
end
7 changes: 7 additions & 0 deletions UI/Option.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ function Addon:SetupOptionFrame()
inspectGear = fullToggle(L['Show inspect gear list']),
inspectCompare = fullToggle(L['Show inspect compare']),
showTalentBackground = fullToggle(L['Show talent background']),
help = {
type = 'group',
name = L['Help'],
inline = true,
order = orderGen(),
args = {help = {type = 'description', name = L.HELP_SUMMARY, order = orderGen()}},
},
},
}

Expand Down
19 changes: 16 additions & 3 deletions UI/Template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</Layers>
</Frame>

<Button name="tdInspectGearTalentFrame" virtual="true">
<Button name="tdInspectGearTalentTemplate" virtual="true">
<Size x="48" y="48"/>
<Layers>
<Layer level="ARTWORK" textureSubLevel="-1">
Expand Down Expand Up @@ -101,16 +101,29 @@
<Anchor point="TOPLEFT" x="18" y="-16"/>
</Anchors>
</Frame>
<Button parentKey="Talent1" inherits="tdInspectGearTalentFrame">
<Button parentKey="Talent1" inherits="tdInspectGearTalentTemplate">
<Anchors>
<Anchor point="TOPRIGHT" x="-10" y="-10" />
</Anchors>
</Button>
<Button parentKey="Talent2" scale="0.8" inherits="tdInspectGearTalentFrame">
<Button parentKey="Talent2" scale="0.8" inherits="tdInspectGearTalentTemplate">
<Anchors>
<Anchor point="BOTTOMRIGHT" relativeKey="$parent.Talent1" relativePoint="BOTTOMLEFT" x="-10" y="0" />
</Anchors>
</Button>
<Button>
<Size x="16" y="16"/>
<Anchors>
<Anchor point="TOPRIGHT" x="-4" y="4"/>
</Anchors>
<NormalTexture file="Interface\Scenarios\ScenarioIcon-Interact" />
<HighlightTexture file="Interface\Scenarios\ScenarioIcon-Interact" alphaMode="ADD" />
<Scripts>
<OnClick>
self:GetParent():OptionOnClick()
</OnClick>
</Scripts>
</Button>
</Frames>
<Layers>
<Layer level="ARTWORK">
Expand Down

0 comments on commit ba081fa

Please sign in to comment.