-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chen
authored and
Chen
committed
Jan 7, 2016
1 parent
8860803
commit 419effa
Showing
7 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
-- @Author: Webster | ||
-- @Date: 2015-09-16 18:12:29 | ||
-- @Last Modified by: Webster | ||
-- @Last Modified time: 2015-09-16 19:14:07 | ||
-- @Last Modified time: 2016-01-07 13:14:17 | ||
|
||
-- 只有存在文件的情况下才会开启 | ||
local isEnable = IsFileExist(JH.GetAddonInfo().szDataPath .. "EnableButton") | ||
if isEnable then | ||
local Container = Station.Lookup("Normal/TopMenu/WndContainer_List") | ||
if Container then | ||
if not Container:Lookup("JH_Window") then | ||
local wnd = Container:AppendContentFromIni(JH.GetAddonInfo().szRootPath .. "0Base/ui/JH_Button.ini", "JH_Window") | ||
if wnd then | ||
Container:FormatAllContentPos() | ||
JH.RegisterEvent("FIRST_LOADING_END", function() | ||
local isEnable = IsFileExist(JH.GetAddonInfo().szDataPath .. "EnableButton") | ||
if isEnable or JH.bDebugClient then | ||
local Container = Station.Lookup("Normal/TopMenu/WndContainer_List") | ||
if Container then | ||
if not Container:Lookup("JH_Window") then | ||
local wnd = Container:AppendContentFromIni(JH.GetAddonInfo().szRootPath .. "0Base/ui/JH_Button.ini", "JH_Window") | ||
if wnd then | ||
Container:FormatAllContentPos() | ||
end | ||
end | ||
end | ||
local wnd = Container:Lookup("JH_Window") | ||
if wnd then | ||
local btn = wnd:Lookup("Btn_JH") | ||
RegisterEvent("RELOAD_UI_ADDON_BEGIN", function() | ||
-- free(ui) | ||
btn.OnLButtonClick = nil | ||
btn.OnRButtonClick = nil | ||
end) | ||
btn.OnLButtonClick = JH.TogglePanel | ||
btn.OnRButtonClick = function() | ||
PopupMenu(JH.GetPlayerAddonMenu()[1]) | ||
local wnd = Container:Lookup("JH_Window") | ||
if wnd then | ||
local btn = wnd:Lookup("Btn_JH") | ||
RegisterEvent("RELOAD_UI_ADDON_BEGIN", function() | ||
-- free(ui) | ||
btn.OnLButtonClick = nil | ||
btn.OnRButtonClick = nil | ||
end) | ||
btn.OnLButtonClick = JH.TogglePanel | ||
btn.OnRButtonClick = function() | ||
PopupMenu(JH.GetPlayerAddonMenu()[1]) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters