Skip to content

Commit

Permalink
Optimize reader of wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
haimanman committed Apr 16, 2017
1 parent fd399a4 commit aecd05f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
16 changes: 13 additions & 3 deletions HM_0Base/HM_About.lua
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,21 @@ _HM_About.PS.OnPanelActive = function(frame)
ui:Append("Text", { txt = _L["About HMM"], x = 0, y = 188, font = 27 })
ui:Append("Text", { x = 0, y = 216, w = 500, h = 20, multi = true }):Align(0, 0):Text(_L["A pure PVP TianCe player of evil camp. Third-class operation, but first-class crazy and lazy!"])
-- other
nX = 0
ui:Append("Text", { txt = _L["Others"], x = 0, y = 244, font = 27 })
--nX = ui:Append("WndCheckBox", { x = 0, y = 272, checked = HM_About.bPlayOpen })
--:Text(_L["Play music on hourly first time to open panel"]):Click(function(bChecked) HM_About.bPlayOpen = bChecked end):Pos_()
ui:Append("WndCheckBox", { x = 0, y = 272, checked = HM_About.bDebug == true })
:Text("Enable Debug"):Click(function(bChecked) HM_About.bDebug = bChecked end)
nX = ui:Append("WndCheckBox", { x = nX, y = 272, checked = HM_About.bDebug == true }):Text("Enable Debug"):Click(function(bChecked)
HM_About.bDebug = bChecked
end):Pos_()
ui:Append("Text", { x = nX + 10, y = 272, txt = "<" .. _L["Haiman Site"] .. ">" }):Click(function()
if HM_Secret then
HM.OpenPanel(_L["Haiman Site"])
else
HM.Sysmsg("https://haimanchajian.com 或微信公众号【海鳗插件】")
HM.Sysmsg("https://haimanchajian.com 或微信公众号【海鳗插件】")
end
end)
end

-- author
Expand Down Expand Up @@ -311,7 +321,7 @@ _HM_About.PS.OnTaboxCheck = function(frame, nIndex, szTitle)
ui:Append("Text", { x = 5, y = 5, font = 239, w = 532, h = 100, txt = "海鳗插件官网" }):Align(1, 1):Click(function()
if szLang == "zhcn" then
if HM_Secret then
HM.OpenPanel("海鳗官网")
HM.OpenPanel(_L["Haiman Site"])
else
HM.Sysmsg("https://haimanchajian.com 或微信公众号【海鳗插件】")
HM.Sysmsg("https://haimanchajian.com 或微信公众号【海鳗插件】")
Expand Down
1 change: 1 addition & 0 deletions HM_0Base/lang/zhcn.jx3dat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ data = {
-- HM.lua --
["HM, JX3 Plug-in Collection"] = "������ʵ�ò����",
["HM Plug"] = "�������",
["Haiman Site"] = "��������",
["General"] = "����",
["Target"] = "Ŀ��",
["Battle"] = "ս��",
Expand Down
1 change: 1 addition & 0 deletions HM_0Base/lang/zhtw.jx3dat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ data = {
-- HM.lua --
["HM, JX3 Plug-in Collection"] = "海鰻、實用插件集",
["HM Plug"] = "海鰻插件",
["Haiman Site"] = "海鰻官網",
["General"] = "常用",
["Target"] = "目標",
["Battle"] = "戰斗",
Expand Down
8 changes: 8 additions & 0 deletions HM_AchieveWiki/HM_AchieveWiki.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ local ACHI_ROOT_URL = "https://haimanchajian.com"
local ACHI_CLIENT_LANG = select(3, GetVersion())
local Achievement = {}
local tinsert = table.insert
local bConfirm = false

HM_AchieveWiki = {
bAutoSync = false,
Expand Down Expand Up @@ -96,6 +97,7 @@ function HM_AchieveWiki.OnLButtonClick()
end):fail(function()
HM.Sysmsg(_L["Request failed"])
end)
bConfirm = true
end
end

Expand Down Expand Up @@ -264,6 +266,12 @@ function Achievement.OpenEncyclopedia(dwID, dwIcon, szTitle, szDesc)
PlaySound(SOUND.UI_SOUND, g_sound.OpenFrame)
frame.warn:Show()
frame.view:Show()
if bConfirm then
local _this = this
this = frame.view
HM_AchieveWiki.OnLButtonClick()
this = _this
end
end

function Achievement.AppendBoxEvent(handle)
Expand Down
2 changes: 1 addition & 1 deletion HM_Secret/HM_Secret.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HM.RegisterCustomData("HM_Secret")
-- 本地函数和变量
---------------------------------------------------------------------
local _HM_Secret = {
szName = "海鳗官网",
szName = _L["Haiman Site"],
szIniFile = "interface\\HM\\HM_Secret\\HM_Secret.ini",
}

Expand Down

0 comments on commit aecd05f

Please sign in to comment.