local f0_local0 = module local f0_local1, f0_local2 = ... f0_local0( f0_local1, package.seeall ) CoD.PrintModuleLoad( _NAME ) f0_local0 = 250 f0_local1 = 250 f0_local2 = 250 local f0_local3 = 1000 local f0_local4 = 750 local f0_local5 = 250 local f0_local6 = 230.4 local f0_local7 = 460.8 local f0_local8 = function ( f1_arg0, f1_arg1 ) if f1_arg0.current_state ~= "active" then f1_arg0:animateToState( "active", f0_local0 ) f1_arg0.current_state = "active" end end local f0_local9 = function ( f2_arg0, f2_arg1 ) if f2_arg0.current_state ~= "default" then f2_arg0:animateToState( "default", 0 ) f2_arg0.current_state = "default" end end LUI.MenuBuilder.registerType( "minimapHudDef", function () local f3_local0 = RegisterMaterial( "hud_minimap_border" ) local f3_local1 = 140 local f3_local2 = 268 local f3_local3 = 15 local f3_local4 = 13 local self = LUI.UIElement.new() self.id = "minimapHud" self:registerAnimationState( "default", { topAnchor = true, leftAnchor = true, bottomAnchor = false, rightAnchor = false, top = 0, left = 0, height = f0_local6, width = f0_local7 } ) self:animateToState( "default", 0 ) local f3_local6 = LUI.UIImage.new() f3_local6.id = "minimapBorder" f3_local6:registerAnimationState( "default", { topAnchor = false, leftAnchor = true, bottomAnchor = false, rightAnchor = true, height = 0, material = f3_local0, alpha = 1 } ) f3_local6:animateToState( "default", 0 ) f3_local6:registerAnimationState( "active", { height = f0_local6 } ) f3_local6:registerAnimationState( "opening", { height = f0_local6 + 40 } ) f3_local6:registerEventHandler( "hud_off", f0_local9 ) f3_local6:registerEventHandler( "hud_on", MBh.AnimateSequence( { { "default", 0 }, { "opening", f0_local0 / 2 }, { "active", f0_local0 / 2 } } ) ) self:addElement( f3_local6 ) local f3_local7 = LUI.MenuBuilder.BuildAddChild local f3_local8 = self local f3_local9 = { type = "UIMinimap", id = "minimap", states = { default = { topAnchor = true, leftAnchor = true, top = f3_local3, left = f3_local4, height = f3_local1, width = f3_local2, alpha = 0 }, active = { alpha = 0.5 }, nosignal = { alpha = 0.05 } } } local f3_local10 = { hud_off = function ( f4_arg0, f4_arg1 ) f0_local9( f4_arg0, f4_arg1 ) f4_arg0:dispatchEventToChildren( f4_arg1 ) end, hud_on = function ( f5_arg0, f5_arg1 ) f5_arg0:dispatchEventToChildren( f5_arg1 ) local f5_local0 = MBh.AnimateSequence( { { "default", 0 }, { "default", f0_local0 }, { "active", f0_local1 } } ) f5_local0( f5_arg0 ) end } local f3_local11 = MBh.AnimateSequence local f3_local12 = {} local f3_local13 = { "active", 0 } local f3_local14 = {} local f3_local15 = "default" local f3_local16 = math.random( 10, 50 ) f3_local14 = f3_local15 f3_local15 = {} f3_local16 = "active" local f3_local17 = math.random( 10, 50 ) f3_local15 = f3_local16 f3_local16 = {} f3_local17 = "default" local f3_local18 = math.random( 10, 50 ) f3_local16 = f3_local17 f3_local17 = {} f3_local18 = "active" local f3_local19 = math.random( 10, 50 ) f3_local17 = f3_local18 f3_local18 = {} f3_local19 = "default" local f3_local20 = math.random( 10, 50 ) f3_local18 = f3_local19 f3_local19 = {} f3_local20 = "active" local f3_local21 = math.random( 10, 50 ) f3_local19 = f3_local20 f3_local20 = {} f3_local21 = "default" local f3_local22 = math.random( 50, 100 ) f3_local20 = f3_local21 f3_local21 = { "active", 250 } f3_local12[1] = f3_local13 f3_local12[2] = f3_local14 f3_local12[3] = f3_local15 f3_local12[4] = f3_local16 f3_local12[5] = f3_local17 f3_local12[6] = f3_local18 f3_local12[7] = f3_local19 f3_local12[8] = f3_local20 f3_local12[9] = f3_local21 f3_local10.hud_shake = f3_local11( f3_local12 ) f3_local10.hud_nosignal_on = MBh.AnimateToState( "nosignal", 0.25 ) f3_local10.hud_nosignal_off = MBh.AnimateToState( "active", 0.25 ) f3_local9.handlers = f3_local10 f3_local9.children = { { type = "jammerEffectStaticDef", id = "minimapStatic" }, { type = "jammerEffectArtifactDef", id = "minimapArtifact" }, { type = "jammerEffectNoSignalDef", id = "minimapNoSignal" } } f3_local7( f3_local8, f3_local9 ) LUI.MenuBuilder.BuildAddChild( self, { type = "UIMinimapIcons", id = "minimapIcons", properties = { drawPlayer = true }, states = { default = { topAnchor = true, leftAnchor = true, bottomAnchor = false, rightAnchor = false, top = f3_local3, left = f3_local4, height = f3_local1, width = f3_local2, alpha = 0 }, active = { alpha = 1 }, nosignal = { alpha = 0 }, static = { alpha = 0.25 } }, handlers = { hud_off = f0_local9, hud_on = MBh.AnimateSequence( { { "default", 0 }, { "default", f0_local0 + f0_local1 }, { "active", f0_local2 } } ), hud_nosignal_on = MBh.AnimateToState( "nosignal", 0.25 ), hud_nosignal_off = MBh.AnimateToState( "active", 0.25 ), hud_static = MBh.AnimateToState( "static", 0.25 ) } } ) LUI.MenuBuilder.BuildAddChild( self, { type = "UICompass", id = "minimapCompass", states = { default = { topAnchor = true, leftAnchor = true, top = 15, left = 17, height = 10, width = f3_local2 - 7, material = RegisterMaterial( "minimap_tickertape_mp" ), alpha = 0 }, active = { alpha = 1 }, nosignal = { alpha = 0.05 } }, handlers = { hud_off = f0_local9, hud_on = MBh.AnimateSequence( { { "default", 0 }, { "default", f0_local0 + f0_local1 + f0_local2 }, { "active", f0_local3, true, true } } ), hud_nosignal_on = MBh.AnimateToState( "nosignal", 0.25 ), hud_nosignal_off = MBh.AnimateToState( "active", 0.25 ) } } ) self:addElement( LUI.MenuBuilder.buildItems( { type = "talkerHudDef" }, self.properties, self ) ) return self end ) LockTable( _M )