11-- @Author: Webster
22-- @Date: 2016-02-26 23:33:04
33-- @Last Modified by: Webster
4- -- @Last Modified time: 2016-04-22 19:01:26
4+ -- @Last Modified time: 2016-04-24 14:38:02
55local _L = JH .LoadLangPack
66local Achievement = {}
77local ACHI_ANCHOR = { s = " CENTER" , r = " CENTER" , x = 0 , y = 0 }
@@ -14,7 +14,7 @@ local AHCI_CLIENT_LANG = select(3, GetVersion())
1414local sformat = string.format
1515local tinsert = table.insert
1616
17- function Bitmap2Number (t )
17+ local function Bitmap2Number (t )
1818 local n = 0
1919 for i , v in ipairs (t ) do
2020 if v and v ~= 0 then
@@ -154,14 +154,16 @@ function JH_Achievement.OnItemUpdateSize()
154154 local item = this
155155 if item and item :IsValid () and item .src then
156156 local w , h = item :GetSize ()
157- if w > 670 then -- fixed size
158- local f = 670 / w
159- item :SetSize (w * f , h * f )
157+ local fScale = Station .GetUIScale ()
158+ local fW , fH = w / fScale , h / fScale
159+ if fW > 670 then -- fixed size
160+ local f = 670 / fW
161+ item :SetSize (fW * f , fH * f )
162+ else
163+ item :SetSize (fW , fH )
160164 end
161165 item :RegisterEvent (16 )
162166 item .OnItemLButtonClick = function ()
163- local fScale = Station .GetUIScale ()
164- local fW , fH = w / fScale , h / fScale
165167 local sW , sH = fW + 20 , fH + 40
166168 local ui = GUI .CreateFrame (" JH_ImageView" , { w = sW , h = sH , nStyle = 2 , title = " Image View" }):BackGround (222 , 210 , 190 )
167169 local hImageview = ui :Raw ():GetRoot ()
436438function Achievement .SyncAchiList (btn , fnCallBack )
437439 local me = GetClientPlayer ()
438440 local id = me .GetGlobalID ()
439- if IsRemotePlayer (me .dwID ) then
440- return JH .Alert (g_tStrings .STR_REMOTE_NOT_TIP )
441- end
441+ -- if IsRemotePlayer(me.dwID) then
442+ -- return JH.Alert(g_tStrings.STR_REMOTE_NOT_TIP)
443+ -- end
442444 if btn then btn :Enable (false ) end
443445 local bitmap , data , nPoint = GetAchievementList ()
444446 local code = table.concat (bitmap )
0 commit comments