From 0fa5298230642082c066c378703026fd149c9b2f Mon Sep 17 00:00:00 2001 From: Emil Zhai Date: Wed, 12 Nov 2014 14:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BAWndCheckBox=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BD=93=E9=AA=8C=20=E6=96=87=E5=AD=97=E4=B9=9F=E5=8F=AF?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E9=BC=A0=E6=A0=87=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .Framework/src/MY.UI.lua | 6 +++++- .Framework/ui/WndCheckBox.ini | 15 +++++++++------ ScreenShot/src/MY_ScreenShot.lua | 2 +- Toolbox/src/MY_Toolbox.lua | 6 +++--- XLifeBar/XLifeBar.lua | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.Framework/src/MY.UI.lua b/.Framework/src/MY.UI.lua index ae8c6e153..0c11700f7 100644 --- a/.Framework/src/MY.UI.lua +++ b/.Framework/src/MY.UI.lua @@ -1572,7 +1572,11 @@ function _MY.UI:size(nWidth, nHeight) end pcall(function() if ele.type=="WndCheckBox" then - + ele.wnd:SetSize(nHeight, nHeight) + ele.txt:SetSize(nWidth - nHeight - 1, nHeight) + ele.hdl:SetRelPos(nHeight + 1, 0) + ele.hdl:SetSize(nWidth, nHeight) + ele.hdl:FormatAllItemPos() elseif ele.type=="WndComboBox" then local w, h= ele.cmb:GetSize() ele.cmb:SetRelPos(nWidth-w-5, math.ceil((nHeight - h)/2)) diff --git a/.Framework/ui/WndCheckBox.ini b/.Framework/ui/WndCheckBox.ini index 5c85f17bc..2d7da8191 100644 --- a/.Framework/ui/WndCheckBox.ini +++ b/.Framework/ui/WndCheckBox.ini @@ -39,6 +39,7 @@ UnChecking=3 Image=ui\Image\button\CommonButton_1.UITex $Tip= ShowTipType=0 +DummyWnd=1 [Handle_Total] ._WndType=Handle @@ -48,8 +49,9 @@ FirstItemPosType=0 Left=0 Top=0 PosType=0 -Width=1 -Height=1 +Width=146 +Height=25 +EventID=512 [Text_Default] ._WndType=Text @@ -59,11 +61,12 @@ FontSpacing=0 Alpha=255 $Text= Left=26 -Top=4 +Top=0 PosType=0 Width=120 -Height=24 +Height=25 FontScheme=18 -ShowAll=1 -AutoEtc=0 +ShowAll=0 +AutoEtc=1 +VAlign=1 diff --git a/ScreenShot/src/MY_ScreenShot.lua b/ScreenShot/src/MY_ScreenShot.lua index aebac70a6..734c658c7 100644 --- a/ScreenShot/src/MY_ScreenShot.lua +++ b/ScreenShot/src/MY_ScreenShot.lua @@ -101,7 +101,7 @@ _MY_ScreenShot.OnPanelActive = function(wnd) ui:children("#WndEditBox_SsRoot"):text(MY_ScreenShot.GetConfig("szFilePath")) end - ui:append("WndCheckBox_UseGlobal", "WndCheckBox"):children("#WndCheckBox_UseGlobal"):pos(30,30) + ui:append("WndCheckBox_UseGlobal", "WndCheckBox"):children("#WndCheckBox_UseGlobal"):pos(30,30):width(200) :text(_L["use global config"]):tip(_L['Check to use global config, otherwise use private setting.']) :check(function(bChecked) MY_ScreenShot.bUseGlobalConfig = bChecked fnRefreshPanel(ui) end) :check(MY_ScreenShot.bUseGlobalConfig) diff --git a/Toolbox/src/MY_Toolbox.lua b/Toolbox/src/MY_Toolbox.lua index 797d0f00b..5f7cf1c36 100644 --- a/Toolbox/src/MY_Toolbox.lua +++ b/Toolbox/src/MY_Toolbox.lua @@ -1194,21 +1194,21 @@ _MY_ToolBox.OnPanelActive = function(wnd) y = y + 30 for id, cache in pairs(_Cache.InfoTip) do local cfg = Config.InfoTip[id] - ui:append("WndCheckBox_InfoTip_"..id, "WndCheckBox"):children("#WndCheckBox_InfoTip_"..id):pos(x, y) + ui:append("WndCheckBox_InfoTip_"..id, "WndCheckBox"):children("#WndCheckBox_InfoTip_"..id):pos(x, y):width(100) :text(cache.title):check(cfg.bEnable or false) :check(function(bChecked) cfg.bEnable = bChecked _MY_ToolBox.ReloadInfoTip() end) x = x + 90 - ui:append("WndCheckBox_InfoTipTitle_"..id, "WndCheckBox"):children("#WndCheckBox_InfoTipTitle_"..id):pos(x, y) + ui:append("WndCheckBox_InfoTipTitle_"..id, "WndCheckBox"):children("#WndCheckBox_InfoTipTitle_"..id):pos(x, y):width(60) :text(_L['title']):check(cfg.bShowTitle or false) :check(function(bChecked) cfg.bShowTitle = bChecked _MY_ToolBox.ReloadInfoTip() end) x = x + 40 - ui:append("WndCheckBox_InfoTipBg_"..id, "WndCheckBox"):children("#WndCheckBox_InfoTipBg_"..id):pos(x, y) + ui:append("WndCheckBox_InfoTipBg_"..id, "WndCheckBox"):children("#WndCheckBox_InfoTipBg_"..id):pos(x, y):width(60) :text(_L['background']):check(cfg.bShowBg or false) :check(function(bChecked) cfg.bShowBg = bChecked diff --git a/XLifeBar/XLifeBar.lua b/XLifeBar/XLifeBar.lua index 72f13dcf0..d061e29ea 100644 --- a/XLifeBar/XLifeBar.lua +++ b/XLifeBar/XLifeBar.lua @@ -746,7 +746,7 @@ _Cache.OnPanelActive = function(wnd) :check(function(bChecked) XLifeBar.bEnabled = bChecked _XLifeBar.Reset(true) end) -- 使用所有角色公共设置 ui:append("WndCheckBox_GlobalConfig", "WndCheckBox"):children("#WndCheckBox_GlobalConfig") - :pos(x+110,y):text(_L["use global config"]) + :width(200):pos(x+110,y):text(_L["use global config"]) :check(XLifeBar.bEnabled or false) :check(function(bChecked) XLifeBar.bUseGlobalConfig = bChecked