# UI_Window_Setting_BadgePreviewWindow_571.luac
; fn @BadgePreviewWindow.lua  line 0-0 np=0 va=1 ms=3 code=18 consts=9 upvals=1 protos=2
;   K[0]='BadgePreviewWindow'
;   K[1]='setmetatable'
;   K[2]='windowMaskAlpha'
;   K[3]='EWindowMaskAlpha'
;   K[4]='Dark'
;   K[5]='BaseWindow'
;   K[6]='__index'
;   K[7]='BeforeOpenCheck'
;   K[8]='Init'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K3('EWindowMaskAlpha')]
0003  GETTABLE  R2 = R2[K4('Dark')]
0004  SETTABLE  R1[K2('windowMaskAlpha')] = R2
0005  GETTABUP  R2 = _ENV[K5('BaseWindow')]
0006  CALL      R0 = call(R0, 1 args, 2 rets)
0007  SETTABUP  _ENV[K0('BadgePreviewWindow')] = R0
0008  GETTABUP  R0 = _ENV[K0('BadgePreviewWindow')]
0009  GETTABUP  R1 = _ENV[K0('BadgePreviewWindow')]
0010  SETTABLE  R0[K6('__index')] = R1
0011  GETTABUP  R0 = _ENV[K0('BadgePreviewWindow')]
0012  CLOSURE   R1 = closure proto0
0013  SETTABLE  R0[K7('BeforeOpenCheck')] = R1
0014  GETTABUP  R0 = _ENV[K0('BadgePreviewWindow')]
0015  CLOSURE   R1 = closure proto1
0016  SETTABLE  R0[K8('Init')] = R1
0017  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 7-17 np=2 va=0 ms=4 code=18 consts=4 upvals=1 protos=0
  ;   K[0]='StringUtil'
  ;   K[1]='IsNilOrEmpty'
  ;   K[2]='AlbumActivityModel'
  ;   K[3]='GetActiveModel'
  ;   upvals: _ENV
  ;   locals: self(0-18), badgeId(0-18)
  0000  GETTABUP  R2 = _ENV[K0('StringUtil')]
  0001  GETTABLE  R2 = R2[K1('IsNilOrEmpty')]
  0002  MOVE      R3 = R0
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  TEST      if not R2 then   -> -131066
  0005  JMP       (jump)   -> 8
  0006  LOADBOOL  R2 = false
  0007  RETURN    return R2..R1
  0008  GETTABUP  R2 = _ENV[K2('AlbumActivityModel')]
  0009  GETTABLE  R2 = R2[K3('GetActiveModel')]
  0010  CALL      R2 = call(R2, 1 args, 0 rets)
  0011  TEST      if not R2 then   -> -131058
  0012  JMP       (jump)   -> 15
  0013  LOADBOOL  R2 = false
  0014  RETURN    return R2..R1
  0015  LOADBOOL  R2 = true
  0016  RETURN    return R2..R1
  0017  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 19-31 np=2 va=0 ms=10 code=52 consts=26 upvals=1 protos=0
  ;   K[0]='m_badge3DView'
  ;   K[1]='Init'
  ;   K[2]='m_titleText'
  ;   K[3]='text'
  ;   K[4]='GM'
  ;   K[5]='GameTextModel'
  ;   K[6]='GetText'
  ;   K[7]='_name'
  ;   K[8]='AlbumActivityModel'
  ;   K[9]='GetActiveModel'
  ;   K[10]='GetType'
  ;   K[11]='_title'
  ;   K[12]='m_descText'
  ;   K[13]='badge_how_to_get'
  ;   K[14]='m_userAvatar'
  ;   K[15]='SetAvatar'
  ;   K[16]='EAvatarFrame'
  ;   K[17]='Normal'
  ;   K[18]='UserProfileModel'
  ;   K[19]='GetAvatar'
  ;   K[20]='LogWindowAction'
  ;   K[21]='EBIType'
  ;   K[22]='UIActionType'
  ;   K[23]='Open'
  ;   K[24]='EBIReferType'
  ;   K[25]='UserClick'
  ;   upvals: _ENV
  ;   locals: self(0-52), badgeId(0-52), ongoingAlbumModel(16-52), albumTitle(24-52)
  0000  GETTABLE  R2 = R0[K0('m_badge3DView')]
  0001  SELF      R3 = R2[K1('Init')] (self)
  0002  MOVE      R4 = R0
  0003  CALL      R2 = call(R2, 0 args, 2 rets)
  0004  GETTABLE  R2 = R0[K2('m_titleText')]
  0005  GETTABUP  R3 = _ENV[K4('GM')]
  0006  GETTABLE  R3 = R3[K5('GameTextModel')]
  0007  SELF      R4 = R3[K6('GetText')] (self)
  0008  MOVE      R5 = R0
  0009  LOADK     R6 = K7 '_name'
  0010  CONCAT    R5 = concat(R5..R5)
  0011  CALL      R3 = call(R3, 1 args, 2 rets)
  0012  SETTABLE  R2[K3('text')] = R3
  0013  GETTABUP  R2 = _ENV[K8('AlbumActivityModel')]
  0014  GETTABLE  R2 = R2[K9('GetActiveModel')]
  0015  CALL      R2 = call(R2, 1 args, 0 rets)
  0016  GETTABUP  R3 = _ENV[K4('GM')]
  0017  GETTABLE  R3 = R3[K5('GameTextModel')]
  0018  SELF      R4 = R3[K6('GetText')] (self)
  0019  SELF      R6 = R2[K10('GetType')] (self)
  0020  CALL      R5 = call(R5, 1 args, 1 rets)
  0021  LOADK     R6 = K11 '_title'
  0022  CONCAT    R5 = concat(R5..R5)
  0023  CALL      R3 = call(R3, 1 args, 2 rets)
  0024  GETTABLE  R4 = R0[K12('m_descText')]
  0025  GETTABUP  R5 = _ENV[K4('GM')]
  0026  GETTABLE  R5 = R5[K5('GameTextModel')]
  0027  SELF      R6 = R5[K6('GetText')] (self)
  0028  LOADK     R7 = K13 'badge_how_to_get'
  0029  MOVE      R8 = R0
  0030  CALL      R5 = call(R5, 1 args, 3 rets)
  0031  SETTABLE  R4[K3('text')] = R5
  0032  GETTABLE  R4 = R0[K14('m_userAvatar')]
  0033  SELF      R5 = R4[K15('SetAvatar')] (self)
  0034  GETTABUP  R6 = _ENV[K16('EAvatarFrame')]
  0035  GETTABLE  R6 = R6[K17('Normal')]
  0036  GETTABUP  R7 = _ENV[K4('GM')]
  0037  GETTABLE  R7 = R7[K18('UserProfileModel')]
  0038  SELF      R8 = R7[K19('GetAvatar')] (self)
  0039  CALL      R7 = call(R7, 1 args, 1 rets)
  0040  MOVE      R8 = R0
  0041  LOADNIL   R9..R9 = nil
  0042  CALL      R4 = call(R4, 0 args, 5 rets)
  0043  SELF      R5 = R0[K20('LogWindowAction')] (self)
  0044  GETTABUP  R6 = _ENV[K21('EBIType')]
  0045  GETTABLE  R6 = R6[K22('UIActionType')]
  0046  GETTABLE  R6 = R6[K23('Open')]
  0047  GETTABUP  R7 = _ENV[K24('EBIReferType')]
  0048  GETTABLE  R7 = R7[K25('UserClick')]
  0049  MOVE      R8 = R0
  0050  CALL      R4 = call(R4, 0 args, 4 rets)
  0051  RETURN    return R0..R-1
