@nativewrappers/fivem 0.0.41 → 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{client/Audio.d.ts → Audio.d.ts} +3 -3
- package/{client/Audio.js → Audio.js} +44 -43
- package/{client/Blip.d.ts → Blip.d.ts} +3 -3
- package/{client/Blip.js → Blip.js} +4 -3
- package/{client/Camera.d.ts → Camera.d.ts} +4 -4
- package/{client/Camera.js → Camera.js} +18 -17
- package/{client/Checkpoint.d.ts → Checkpoint.d.ts} +2 -2
- package/{client/Checkpoint.js → Checkpoint.js} +7 -6
- package/{client/Events.js → Events.js} +23 -23
- package/{client/Game.d.ts → Game.d.ts} +4 -3
- package/{client/Game.js → Game.js} +16 -10
- package/{client/GameplayCamera.d.ts → GameplayCamera.d.ts} +2 -2
- package/{client/GameplayCamera.js → GameplayCamera.js} +2 -2
- package/{client/Model.d.ts → Model.d.ts} +5 -3
- package/{client/Model.js → Model.js} +21 -7
- package/{client/NetworkedScene.d.ts → NetworkedScene.d.ts} +2 -2
- package/{client/NetworkedScene.js → NetworkedScene.js} +1 -0
- package/{client/ParticleEffect.d.ts → ParticleEffect.d.ts} +3 -3
- package/{client/ParticleEffect.js → ParticleEffect.js} +11 -8
- package/{client/ParticleEffectAsset.d.ts → ParticleEffectAsset.d.ts} +3 -3
- package/{client/ParticleEffectAsset.js → ParticleEffectAsset.js} +4 -3
- package/{client/Pickup.d.ts → Pickup.d.ts} +1 -1
- package/{client/Pickup.js → Pickup.js} +2 -1
- package/{client/Raycast.d.ts → Raycast.d.ts} +3 -3
- package/{client/Raycast.js → Raycast.js} +10 -3
- package/{client/RelationshipGroup.d.ts → RelationshipGroup.d.ts} +1 -1
- package/{client/RelationshipGroup.js → RelationshipGroup.js} +4 -0
- package/{client/Rope.d.ts → Rope.d.ts} +2 -2
- package/{client/Rope.js → Rope.js} +6 -2
- package/{client/TaskSequence.d.ts → TaskSequence.d.ts} +1 -1
- package/{client/TaskSequence.js → TaskSequence.js} +5 -2
- package/{client/Tasks.d.ts → Tasks.d.ts} +5 -5
- package/{client/Tasks.js → Tasks.js} +7 -6
- package/{client/World.d.ts → World.d.ts} +20 -12
- package/{client/World.js → World.js} +66 -62
- package/{client/cfx → cfx}/index.d.ts +1 -1
- package/{client/enums → enums}/RaycastEnums.js +3 -1
- package/enums/index.d.ts +42 -0
- package/enums/index.js +42 -0
- package/hashes/index.d.ts +5 -0
- package/hashes/index.js +5 -0
- package/index.d.ts +24 -0
- package/index.js +25 -0
- package/{client/interfaces → interfaces}/Dimensions.d.ts +1 -1
- package/{client/models → models}/BaseEntity.d.ts +26 -26
- package/{client/models → models}/BaseEntity.js +32 -30
- package/{client/models → models}/EntityBone.d.ts +2 -2
- package/{client/models → models}/EntityBone.js +4 -2
- package/{client/models → models}/EntityBoneCollection.d.ts +2 -2
- package/{client/models → models}/EntityBoneCollection.js +5 -2
- package/{client/models → models}/Ped.d.ts +20 -9
- package/{client/models → models}/Ped.js +66 -56
- package/{client/models → models}/PedBone.d.ts +2 -2
- package/{client/models → models}/PedBone.js +1 -1
- package/{client/models → models}/PedBoneCollection.d.ts +1 -1
- package/{client/models → models}/PedBoneCollection.js +4 -2
- package/{client/models → models}/Player.d.ts +3 -3
- package/{client/models → models}/Player.js +12 -9
- package/{client/models → models}/Prop.d.ts +2 -2
- package/{client/models → models}/Prop.js +4 -4
- package/{client/models → models}/Vehicle.d.ts +6 -6
- package/{client/models → models}/Vehicle.js +22 -16
- package/{client/models → models}/VehicleDoor.d.ts +2 -2
- package/{client/models → models}/VehicleDoor.js +2 -0
- package/{client/models → models}/VehicleDoorCollection.d.ts +3 -3
- package/{client/models → models}/VehicleDoorCollection.js +16 -15
- package/{client/models → models}/VehicleMod.d.ts +2 -2
- package/{client/models → models}/VehicleMod.js +2 -0
- package/{client/models → models}/VehicleModCollection.d.ts +5 -5
- package/{client/models → models}/VehicleModCollection.js +20 -19
- package/{client/models → models}/VehicleToggleMod.d.ts +2 -2
- package/{client/models → models}/VehicleToggleMod.js +2 -0
- package/{client/models → models}/VehicleWheel.d.ts +1 -1
- package/{client/models → models}/VehicleWheel.js +2 -0
- package/{client/models → models}/VehicleWheelCollection.d.ts +3 -3
- package/{client/models → models}/VehicleWheelCollection.js +15 -14
- package/{client/models → models}/VehicleWindow.d.ts +2 -2
- package/{client/models → models}/VehicleWindow.js +2 -0
- package/{client/models → models}/VehicleWindowCollection.d.ts +3 -3
- package/{client/models → models}/VehicleWindowCollection.js +13 -12
- package/models/index.d.ts +18 -0
- package/models/index.js +19 -0
- package/package.json +6 -30
- package/{client/ui → ui}/Container.d.ts +2 -2
- package/{client/ui → ui}/Container.js +6 -3
- package/{client/ui → ui}/Effects.d.ts +1 -1
- package/ui/Effects.js +106 -0
- package/{client/ui → ui}/Fading.js +2 -2
- package/{client/ui → ui}/Hud.d.ts +2 -2
- package/{client/ui → ui}/Hud.js +1 -1
- package/{client/ui → ui}/InstructionalButtons.d.ts +1 -1
- package/{client/ui → ui}/InstructionalButtons.js +8 -7
- package/{client/ui → ui}/LoadingPrompt.d.ts +1 -1
- package/{client/ui → ui}/LoadingPrompt.js +5 -5
- package/{client/ui → ui}/Notification.js +1 -0
- package/{client/ui → ui}/Rectangle.d.ts +2 -2
- package/{client/ui → ui}/Rectangle.js +5 -2
- package/{client/ui → ui}/Scaleform.d.ts +1 -1
- package/{client/ui → ui}/Scaleform.js +10 -8
- package/{client/ui → ui}/Screen.d.ts +3 -3
- package/{client/ui → ui}/Screen.js +13 -13
- package/{client/ui → ui}/Sprite.d.ts +1 -1
- package/{client/ui → ui}/Sprite.js +10 -3
- package/{client/ui → ui}/Text.d.ts +3 -3
- package/{client/ui → ui}/Text.js +19 -7
- package/{client/ui → ui}/Timerbar.d.ts +1 -1
- package/{client/ui → ui}/Timerbar.js +37 -30
- package/ui/index.d.ts +15 -0
- package/ui/index.js +15 -0
- package/{client/ui → ui}/interfaces/IButton.d.ts +1 -1
- package/{client/ui → ui}/interfaces/IDrawable.d.ts +1 -1
- package/ui/interfaces/index.d.ts +2 -0
- package/{client/ui → ui}/menu/Menu.d.ts +4 -4
- package/{client/ui → ui}/menu/Menu.js +96 -67
- package/{client/ui → ui}/menu/MenuControl.js +1 -0
- package/{client/ui → ui}/menu/MenuControls.d.ts +1 -1
- package/ui/menu/MenuControls.js +9 -0
- package/{client/ui → ui}/menu/MenuSettings.d.ts +1 -1
- package/ui/menu/MenuSettings.js +54 -0
- package/ui/menu/index.d.ts +6 -0
- package/ui/menu/index.js +6 -0
- package/{client/ui → ui}/menu/items/UIMenuCheckboxItem.d.ts +3 -3
- package/{client/ui → ui}/menu/items/UIMenuCheckboxItem.js +17 -15
- package/{client/ui → ui}/menu/items/UIMenuItem.d.ts +4 -4
- package/{client/ui → ui}/menu/items/UIMenuItem.js +276 -255
- package/{client/ui → ui}/menu/items/UIMenuListItem.d.ts +3 -3
- package/{client/ui → ui}/menu/items/UIMenuListItem.js +28 -19
- package/{client/ui → ui}/menu/items/UIMenuSeparatorItem.d.ts +1 -1
- package/{client/ui → ui}/menu/items/UIMenuSeparatorItem.js +10 -10
- package/{client/ui → ui}/menu/items/UIMenuSliderItem.d.ts +3 -3
- package/{client/ui → ui}/menu/items/UIMenuSliderItem.js +45 -27
- package/ui/menu/items/index.d.ts +6 -0
- package/ui/menu/items/index.js +6 -0
- package/{client/ui → ui}/menu/items/panels/AbstractUIMenuPanel.d.ts +3 -3
- package/{client/ui → ui}/menu/items/panels/AbstractUIMenuPanel.js +9 -8
- package/{client/ui → ui}/menu/items/panels/UIMenuColorPanel.d.ts +3 -3
- package/{client/ui → ui}/menu/items/panels/UIMenuColorPanel.js +29 -23
- package/{client/ui → ui}/menu/items/panels/UIMenuGridPanel.d.ts +3 -3
- package/{client/ui → ui}/menu/items/panels/UIMenuGridPanel.js +86 -40
- package/{client/ui → ui}/menu/items/panels/UIMenuPercentagePanel.d.ts +2 -2
- package/{client/ui → ui}/menu/items/panels/UIMenuPercentagePanel.js +27 -18
- package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanel.d.ts +2 -2
- package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanel.js +10 -8
- package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanelItem.d.ts +1 -1
- package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanelItem.js +10 -7
- package/ui/menu/items/panels/index.d.ts +6 -0
- package/ui/menu/items/panels/index.js +6 -0
- package/{client/ui → ui}/menu/modules/ListItem.js +4 -2
- package/ui/menu/modules/index.d.ts +1 -0
- package/ui/menu/modules/index.js +1 -0
- package/{client/utils → utils}/Animations.js +2 -2
- package/{client/utils → utils}/Crypto.js +5 -5
- package/{client/utils → utils}/LiteEvent.js +3 -5
- package/{client/utils → utils}/Point.js +5 -3
- package/{common/utils → utils}/PointF.js +3 -0
- package/{client/utils → utils}/Quaternion.d.ts +1 -1
- package/{client/utils → utils}/Quaternion.js +5 -1
- package/{client/utils → utils}/Size.js +2 -0
- package/{client/utils → utils}/String.d.ts +1 -1
- package/{client/utils → utils}/String.js +3 -3
- package/{client/utils → utils}/enumValues.js +2 -2
- package/{client/utils → utils}/getStringFromUInt8Array.js +1 -1
- package/utils/index.d.ts +9 -0
- package/utils/index.js +9 -0
- package/{client/weapon → weapon}/DlcWeaponData.d.ts +1 -1
- package/{client/weapon → weapon}/DlcWeaponData.js +3 -3
- package/{client/weapon → weapon}/Weapon.d.ts +10 -10
- package/{client/weapon → weapon}/Weapon.js +17 -14
- package/{client/weapon → weapon}/WeaponAsset.d.ts +1 -1
- package/{client/weapon → weapon}/WeaponAsset.js +4 -3
- package/{client/weapon → weapon}/WeaponCollection.d.ts +3 -3
- package/{client/weapon → weapon}/WeaponCollection.js +4 -3
- package/{client/weapon → weapon}/WeaponDisplayNameByHash.d.ts +1 -1
- package/weapon/WeaponDisplayNameByHash.js +75 -0
- package/{client/weapon → weapon}/WeaponHudStats.d.ts +1 -1
- package/{client/weapon → weapon}/WeaponHudStats.js +4 -4
- package/weapon/index.d.ts +8 -0
- package/weapon/index.js +8 -0
- package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPointByHash.d.ts +2 -2
- package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPointByHash.js +355 -91
- package/{client/weaponComponent → weaponComponent}/ComponentDisplayNameByHash.d.ts +1 -1
- package/weaponComponent/ComponentDisplayNameByHash.js +280 -0
- package/{client/weaponComponent → weaponComponent}/DlcWeaponComponentData.d.ts +1 -1
- package/{client/weaponComponent → weaponComponent}/DlcWeaponComponentData.js +2 -2
- package/{client/weaponComponent → weaponComponent}/InvalidWeaponComponent.d.ts +4 -4
- package/{client/weaponComponent → weaponComponent}/InvalidWeaponComponent.js +5 -5
- package/{client/weaponComponent → weaponComponent}/WeaponComponent.d.ts +6 -6
- package/{client/weaponComponent → weaponComponent}/WeaponComponent.js +15 -11
- package/{client/weaponComponent → weaponComponent}/WeaponComponentCollection.d.ts +4 -4
- package/{client/weaponComponent → weaponComponent}/WeaponComponentCollection.js +13 -11
- package/{client/weaponComponent → weaponComponent}/WeaponComponentHashesByWeaponHash.d.ts +2 -2
- package/{client/weaponComponent → weaponComponent}/WeaponComponentHashesByWeaponHash.js +13 -7
- package/{client/weaponComponent → weaponComponent}/WeaponComponentHudStats.d.ts +1 -1
- package/{client/weaponComponent → weaponComponent}/WeaponComponentHudStats.js +4 -4
- package/weaponComponent/index.d.ts +5 -0
- package/weaponComponent/index.js +5 -0
- package/README.md +0 -41
- package/client/enums/index.d.ts +0 -42
- package/client/enums/index.js +0 -42
- package/client/hashes/index.d.ts +0 -5
- package/client/hashes/index.js +0 -5
- package/client/index.d.ts +0 -24
- package/client/index.js +0 -25
- package/client/models/index.d.ts +0 -18
- package/client/models/index.js +0 -19
- package/client/ui/Effects.js +0 -106
- package/client/ui/index.d.ts +0 -15
- package/client/ui/index.js +0 -15
- package/client/ui/interfaces/index.d.ts +0 -2
- package/client/ui/menu/MenuControls.js +0 -11
- package/client/ui/menu/MenuSettings.js +0 -51
- package/client/ui/menu/index.d.ts +0 -6
- package/client/ui/menu/index.js +0 -6
- package/client/ui/menu/items/index.d.ts +0 -6
- package/client/ui/menu/items/index.js +0 -6
- package/client/ui/menu/items/panels/index.d.ts +0 -6
- package/client/ui/menu/items/panels/index.js +0 -6
- package/client/ui/menu/modules/index.d.ts +0 -1
- package/client/ui/menu/modules/index.js +0 -1
- package/client/utils/PointF.js +0 -11
- package/client/utils/index.d.ts +0 -9
- package/client/utils/index.js +0 -9
- package/client/weapon/WeaponDisplayNameByHash.js +0 -75
- package/client/weapon/index.d.ts +0 -8
- package/client/weapon/index.js +0 -8
- package/client/weaponComponent/ComponentDisplayNameByHash.js +0 -280
- package/client/weaponComponent/index.d.ts +0 -5
- package/client/weaponComponent/index.js +0 -5
- package/common/Convar.d.ts +0 -8
- package/common/Convar.js +0 -20
- package/common/Kvp.d.ts +0 -91
- package/common/Kvp.js +0 -161
- package/common/Resource.d.ts +0 -14
- package/common/Resource.js +0 -35
- package/common/index.d.ts +0 -5
- package/common/index.js +0 -5
- package/common/types.d.ts +0 -5
- package/common/types.js +0 -1
- package/common/utils/ClassTypes.d.ts +0 -11
- package/common/utils/ClassTypes.js +0 -12
- package/common/utils/Color.d.ts +0 -14
- package/common/utils/Color.js +0 -21
- package/common/utils/Maths.d.ts +0 -4
- package/common/utils/Maths.js +0 -10
- package/common/utils/PointF.d.ts +0 -12
- package/common/utils/Quaternion.d.ts +0 -10
- package/common/utils/Quaternion.js +0 -23
- package/common/utils/Vector.d.ts +0 -390
- package/common/utils/Vector.js +0 -546
- package/common/utils/Vector2.d.ts +0 -1
- package/common/utils/Vector2.js +0 -1
- package/common/utils/Vector3.d.ts +0 -1
- package/common/utils/Vector3.js +0 -1
- package/common/utils/Vector4.d.ts +0 -1
- package/common/utils/Vector4.js +0 -1
- package/common/utils/cleanPlayerName.d.ts +0 -6
- package/common/utils/cleanPlayerName.js +0 -27
- package/common/utils/enumValues.d.ts +0 -12
- package/common/utils/enumValues.js +0 -14
- package/common/utils/getStringFromUInt8Array.d.ts +0 -8
- package/common/utils/getStringFromUInt8Array.js +0 -10
- package/common/utils/getUInt32FromUint8Array.d.ts +0 -8
- package/common/utils/getUInt32FromUint8Array.js +0 -8
- package/common/utils/index.d.ts +0 -12
- package/common/utils/index.js +0 -12
- package/server/Events.d.ts +0 -16
- package/server/Events.js +0 -79
- package/server/Game.d.ts +0 -25
- package/server/Game.js +0 -55
- package/server/cfx/StateBagChangeHandler.d.ts +0 -3
- package/server/cfx/StateBagChangeHandler.js +0 -1
- package/server/cfx/index.d.ts +0 -6
- package/server/cfx/index.js +0 -1
- package/server/entities/BaseEntity.d.ts +0 -47
- package/server/entities/BaseEntity.js +0 -109
- package/server/entities/Entity.d.ts +0 -6
- package/server/entities/Entity.js +0 -12
- package/server/entities/Ped.d.ts +0 -32
- package/server/entities/Ped.js +0 -81
- package/server/entities/Player.d.ts +0 -63
- package/server/entities/Player.js +0 -135
- package/server/entities/Prop.d.ts +0 -14
- package/server/entities/Prop.js +0 -32
- package/server/entities/Vehicle.d.ts +0 -67
- package/server/entities/Vehicle.js +0 -175
- package/server/entities/index.d.ts +0 -5
- package/server/entities/index.js +0 -5
- package/server/enum/PopulationType.d.ts +0 -13
- package/server/enum/PopulationType.js +0 -14
- package/server/enum/VehicleLockStatus.d.ts +0 -9
- package/server/enum/VehicleLockStatus.js +0 -10
- package/server/enum/VehicleType.d.ts +0 -10
- package/server/enum/VehicleType.js +0 -11
- package/server/enum/eEntityType.d.ts +0 -5
- package/server/enum/eEntityType.js +0 -6
- package/server/enum/index.d.ts +0 -4
- package/server/enum/index.js +0 -4
- package/server/index.d.ts +0 -7
- package/server/index.js +0 -7
- package/server/type/Anticheat.d.ts +0 -153
- package/server/type/Anticheat.js +0 -1
- package/server/type/Hash.d.ts +0 -1
- package/server/type/Hash.js +0 -1
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +0 -1
- /package/{client/Events.d.ts → Events.d.ts} +0 -0
- /package/{client/cfx → cfx}/StateBagChangeHandler.d.ts +0 -0
- /package/{client/cfx → cfx}/StateBagChangeHandler.js +0 -0
- /package/{client/cfx → cfx}/index.js +0 -0
- /package/{client/enums → enums}/Alignment.d.ts +0 -0
- /package/{client/enums → enums}/Alignment.js +0 -0
- /package/{client/enums → enums}/AnimationFlags.d.ts +0 -0
- /package/{client/enums → enums}/AnimationFlags.js +0 -0
- /package/{client/enums → enums}/AudioFlag.d.ts +0 -0
- /package/{client/enums → enums}/AudioFlag.js +0 -0
- /package/{client/enums → enums}/BadgeStyle.d.ts +0 -0
- /package/{client/enums → enums}/BadgeStyle.js +0 -0
- /package/{client/enums → enums}/Blip.d.ts +0 -0
- /package/{client/enums → enums}/Blip.js +0 -0
- /package/{client/enums → enums}/Bone.d.ts +0 -0
- /package/{client/enums → enums}/Bone.js +0 -0
- /package/{client/enums → enums}/CameraShake.d.ts +0 -0
- /package/{client/enums → enums}/CameraShake.js +0 -0
- /package/{client/enums → enums}/CameraTypes.d.ts +0 -0
- /package/{client/enums → enums}/CameraTypes.js +0 -0
- /package/{client/enums → enums}/CheckboxStyle.d.ts +0 -0
- /package/{client/enums → enums}/CheckboxStyle.js +0 -0
- /package/{client/enums → enums}/Checkpoint.d.ts +0 -0
- /package/{client/enums → enums}/Checkpoint.js +0 -0
- /package/{client/enums → enums}/CloudHat.d.ts +0 -0
- /package/{client/enums → enums}/CloudHat.js +0 -0
- /package/{client/enums → enums}/Control.d.ts +0 -0
- /package/{client/enums → enums}/Control.js +0 -0
- /package/{client/enums → enums}/CursorSprite.d.ts +0 -0
- /package/{client/enums → enums}/CursorSprite.js +0 -0
- /package/{client/enums → enums}/Driving.d.ts +0 -0
- /package/{client/enums → enums}/Driving.js +0 -0
- /package/{client/enums → enums}/ExplosionType.d.ts +0 -0
- /package/{client/enums → enums}/ExplosionType.js +0 -0
- /package/{client/enums → enums}/FiringPattern.d.ts +0 -0
- /package/{client/enums → enums}/FiringPattern.js +0 -0
- /package/{client/enums → enums}/Font.d.ts +0 -0
- /package/{client/enums → enums}/Font.js +0 -0
- /package/{client/enums → enums}/ForceType.d.ts +0 -0
- /package/{client/enums → enums}/ForceType.js +0 -0
- /package/{client/enums → enums}/Gender.d.ts +0 -0
- /package/{client/enums → enums}/Gender.js +0 -0
- /package/{client/enums → enums}/HelmetType.d.ts +0 -0
- /package/{client/enums → enums}/HelmetType.js +0 -0
- /package/{client/enums → enums}/HudColor.d.ts +0 -0
- /package/{client/enums → enums}/HudColor.js +0 -0
- /package/{client/enums → enums}/HudComponent.d.ts +0 -0
- /package/{client/enums → enums}/HudComponent.js +0 -0
- /package/{client/enums → enums}/InputMode.d.ts +0 -0
- /package/{client/enums → enums}/InputMode.js +0 -0
- /package/{client/enums → enums}/InvertAxis.d.ts +0 -0
- /package/{client/enums → enums}/InvertAxis.js +0 -0
- /package/{client/enums → enums}/Language.d.ts +0 -0
- /package/{client/enums → enums}/Language.js +0 -0
- /package/{client/enums → enums}/LeaveVehicleFlags.d.ts +0 -0
- /package/{client/enums → enums}/LeaveVehicleFlags.js +0 -0
- /package/{client/enums → enums}/LoadingSpinnerType.d.ts +0 -0
- /package/{client/enums → enums}/LoadingSpinnerType.js +0 -0
- /package/{client/enums → enums}/MarkerType.d.ts +0 -0
- /package/{client/enums → enums}/MarkerType.js +0 -0
- /package/{client/enums → enums}/MenuAlignment.d.ts +0 -0
- /package/{client/enums → enums}/MenuAlignment.js +0 -0
- /package/{client/enums → enums}/NotificationType.d.ts +0 -0
- /package/{client/enums → enums}/NotificationType.js +0 -0
- /package/{client/enums → enums}/Parachute.d.ts +0 -0
- /package/{client/enums → enums}/Parachute.js +0 -0
- /package/{client/enums → enums}/PickupType.d.ts +0 -0
- /package/{client/enums → enums}/PickupType.js +0 -0
- /package/{client/enums → enums}/RadioStation.d.ts +0 -0
- /package/{client/enums → enums}/RadioStation.js +0 -0
- /package/{client/enums → enums}/RagdollType.d.ts +0 -0
- /package/{client/enums → enums}/RagdollType.js +0 -0
- /package/{client/enums → enums}/RaycastEnums.d.ts +0 -0
- /package/{client/enums → enums}/Relationship.d.ts +0 -0
- /package/{client/enums → enums}/Relationship.js +0 -0
- /package/{client/enums → enums}/RopeType.d.ts +0 -0
- /package/{client/enums → enums}/RopeType.js +0 -0
- /package/{client/enums → enums}/ScreenEffect.d.ts +0 -0
- /package/{client/enums → enums}/ScreenEffect.js +0 -0
- /package/{client/enums → enums}/SpeechModifier.d.ts +0 -0
- /package/{client/enums → enums}/SpeechModifier.js +0 -0
- /package/{client/enums → enums}/Vehicle.d.ts +0 -0
- /package/{client/enums → enums}/Vehicle.js +0 -0
- /package/{client/enums → enums}/Weather.d.ts +0 -0
- /package/{client/enums → enums}/Weather.js +0 -0
- /package/{client/enums → enums}/ZoneID.d.ts +0 -0
- /package/{client/enums → enums}/ZoneID.js +0 -0
- /package/{client/hashes → hashes}/MaterialHash.d.ts +0 -0
- /package/{client/hashes → hashes}/MaterialHash.js +0 -0
- /package/{client/hashes → hashes}/PedHash.d.ts +0 -0
- /package/{client/hashes → hashes}/PedHash.js +0 -0
- /package/{client/hashes → hashes}/VehicleHash.d.ts +0 -0
- /package/{client/hashes → hashes}/VehicleHash.js +0 -0
- /package/{client/hashes → hashes}/WeaponHash.d.ts +0 -0
- /package/{client/hashes → hashes}/WeaponHash.js +0 -0
- /package/{client/hashes → hashes}/WeatherTypeHash.d.ts +0 -0
- /package/{client/hashes → hashes}/WeatherTypeHash.js +0 -0
- /package/{client/interfaces → interfaces}/Dimensions.js +0 -0
- /package/{client/models → models}/Entity.d.ts +0 -0
- /package/{client/models → models}/Entity.js +0 -0
- /package/{client/ui → ui}/Fading.d.ts +0 -0
- /package/{client/ui → ui}/Notification.d.ts +0 -0
- /package/{client/ui → ui}/interfaces/IButton.js +0 -0
- /package/{client/ui → ui}/interfaces/IDrawable.js +0 -0
- /package/{client/ui → ui}/interfaces/index.js +0 -0
- /package/{client/ui → ui}/menu/MenuControl.d.ts +0 -0
- /package/{client/ui → ui}/menu/modules/ListItem.d.ts +0 -0
- /package/{client/utils → utils}/Animations.d.ts +0 -0
- /package/{client/utils → utils}/Crypto.d.ts +0 -0
- /package/{client/utils → utils}/LiteEvent.d.ts +0 -0
- /package/{client/utils → utils}/Maths.d.ts +0 -0
- /package/{client/utils → utils}/Maths.js +0 -0
- /package/{client/utils → utils}/Point.d.ts +0 -0
- /package/{client/utils → utils}/PointF.d.ts +0 -0
- /package/{client/utils → utils}/Size.d.ts +0 -0
- /package/{client/utils → utils}/enumValues.d.ts +0 -0
- /package/{client/utils → utils}/getStringFromUInt8Array.d.ts +0 -0
- /package/{client/utils → utils}/getUInt32FromUint8Array.d.ts +0 -0
- /package/{client/utils → utils}/getUInt32FromUint8Array.js +0 -0
- /package/{client/weapon → weapon}/Mk2WeaponHash.d.ts +0 -0
- /package/{client/weapon → weapon}/Mk2WeaponHash.js +0 -0
- /package/{client/weapon → weapon}/WeaponGroup.d.ts +0 -0
- /package/{client/weapon → weapon}/WeaponGroup.js +0 -0
- /package/{client/weapon → weapon}/WeaponLivery.d.ts +0 -0
- /package/{client/weapon → weapon}/WeaponLivery.js +0 -0
- /package/{client/weapon → weapon}/WeaponLiveryColor.d.ts +0 -0
- /package/{client/weapon → weapon}/WeaponLiveryColor.js +0 -0
- /package/{client/weapon → weapon}/WeaponTint.d.ts +0 -0
- /package/{client/weapon → weapon}/WeaponTint.js +0 -0
- /package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPoint.d.ts +0 -0
- /package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPoint.js +0 -0
- /package/{client/weaponComponent → weaponComponent}/WeaponComponentHash.d.ts +0 -0
- /package/{client/weaponComponent → weaponComponent}/WeaponComponentHash.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Scaleform } from
|
|
1
|
+
import { Scaleform } from "./Scaleform";
|
|
2
2
|
/**
|
|
3
3
|
* Draw native instructional buttons in the bottom left of the screen using scaleform
|
|
4
4
|
*
|
|
@@ -18,23 +18,24 @@ import { Scaleform } from './Scaleform';
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
export class InstructionalButtons {
|
|
21
|
+
scaleform;
|
|
21
22
|
/**
|
|
22
23
|
* Draws native instructional buttons
|
|
23
24
|
*
|
|
24
25
|
* @param buttons Array of instructional buttons to be drawn
|
|
25
26
|
*/
|
|
26
27
|
constructor(buttons) {
|
|
27
|
-
this.scaleform = new Scaleform(
|
|
28
|
-
this.scaleform.callFunction(
|
|
29
|
-
this.scaleform.callFunction(
|
|
28
|
+
this.scaleform = new Scaleform("INSTRUCTIONAL_BUTTONS");
|
|
29
|
+
this.scaleform.callFunction("CLEAR_ALL");
|
|
30
|
+
this.scaleform.callFunction("SET_CLEAR_SPACE", 200);
|
|
30
31
|
buttons.forEach((button, index) => {
|
|
31
32
|
this.pushButton(button, index);
|
|
32
33
|
});
|
|
33
|
-
this.scaleform.callFunction(
|
|
34
|
-
this.scaleform.callFunction(
|
|
34
|
+
this.scaleform.callFunction("DRAW_INSTRUCTIONAL_BUTTONS");
|
|
35
|
+
this.scaleform.callFunction("SET_BACKGROUND_COLOUR", 0, 0, 0, 80);
|
|
35
36
|
}
|
|
36
37
|
pushButton(button, index) {
|
|
37
|
-
BeginScaleformMovieMethod(this.scaleform.Handle,
|
|
38
|
+
BeginScaleformMovieMethod(this.scaleform.Handle, "SET_DATA_SLOT");
|
|
38
39
|
PushScaleformMovieFunctionParameterInt(index);
|
|
39
40
|
// Looping backwards here since scaleform is using a stack so the first control ends up being the last
|
|
40
41
|
// So looping backwards makes more sense here so that the controls are rendered in the order they're defined
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoadingSpinnerType } from
|
|
1
|
+
import { LoadingSpinnerType } from "../enums";
|
|
2
2
|
/**
|
|
3
3
|
* Show and hide loading prompt on the bottom right of the screen.
|
|
4
4
|
*
|
|
@@ -21,15 +21,15 @@ export class LoadingPrompt {
|
|
|
21
21
|
* @param loadingText Text to be displayed inside loading prompt.
|
|
22
22
|
* @param spinnerType Type of spinner.
|
|
23
23
|
*/
|
|
24
|
-
static show(loadingText =
|
|
24
|
+
static show(loadingText = "", spinnerType = LoadingSpinnerType.RegularClockwise) {
|
|
25
25
|
if (this.IsActive) {
|
|
26
26
|
this.hide();
|
|
27
27
|
}
|
|
28
|
-
if (loadingText ===
|
|
29
|
-
BeginTextCommandBusyString(
|
|
28
|
+
if (loadingText === "") {
|
|
29
|
+
BeginTextCommandBusyString("");
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
BeginTextCommandBusyString(
|
|
32
|
+
BeginTextCommandBusyString("STRING");
|
|
33
33
|
AddTextComponentSubstringPlayerName(loadingText);
|
|
34
34
|
}
|
|
35
35
|
EndTextCommandBusyString(Number(spinnerType));
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Point, Size } from
|
|
2
|
-
import { Screen } from
|
|
1
|
+
import { Point, Size } from "../utils";
|
|
2
|
+
import { Screen } from "./";
|
|
3
3
|
export class Rectangle {
|
|
4
|
+
pos;
|
|
5
|
+
size;
|
|
6
|
+
color;
|
|
4
7
|
constructor(pos, size, color) {
|
|
5
8
|
this.pos = pos;
|
|
6
9
|
this.size = size;
|
|
@@ -28,8 +28,10 @@ export class Scaleform {
|
|
|
28
28
|
resolve();
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
+
handle;
|
|
32
|
+
name;
|
|
33
|
+
loaded = false;
|
|
31
34
|
constructor(name) {
|
|
32
|
-
this.loaded = false;
|
|
33
35
|
this.name = name;
|
|
34
36
|
this.handle = RequestScaleformMovie(this.name);
|
|
35
37
|
}
|
|
@@ -71,15 +73,15 @@ export class Scaleform {
|
|
|
71
73
|
*/
|
|
72
74
|
callFunction(name, ...args) {
|
|
73
75
|
BeginScaleformMovieMethod(this.handle, name);
|
|
74
|
-
args.forEach(arg => {
|
|
76
|
+
args.forEach((arg) => {
|
|
75
77
|
switch (typeof arg) {
|
|
76
|
-
case
|
|
78
|
+
case "number":
|
|
77
79
|
PushScaleformMovieFunctionParameterInt(arg);
|
|
78
80
|
break;
|
|
79
|
-
case
|
|
81
|
+
case "string":
|
|
80
82
|
PushScaleformMovieFunctionParameterString(arg);
|
|
81
83
|
break;
|
|
82
|
-
case
|
|
84
|
+
case "boolean":
|
|
83
85
|
PushScaleformMovieFunctionParameterBool(arg);
|
|
84
86
|
break;
|
|
85
87
|
default:
|
|
@@ -106,7 +108,7 @@ export class Scaleform {
|
|
|
106
108
|
* @param param4
|
|
107
109
|
* @param param5
|
|
108
110
|
*/
|
|
109
|
-
callStringMethod(name, param1 =
|
|
111
|
+
callStringMethod(name, param1 = "", param2 = "", param3 = "", param4 = "", param5 = "") {
|
|
110
112
|
CallScaleformMovieMethodWithString(this.handle, name, param1, param2, param3, param4, param5);
|
|
111
113
|
}
|
|
112
114
|
/**
|
|
@@ -137,7 +139,7 @@ export class Scaleform {
|
|
|
137
139
|
* @param sParam4
|
|
138
140
|
* @param sParam5
|
|
139
141
|
*/
|
|
140
|
-
callSharedMethod(name, fParam1 = -1.0, fParam2 = -1.0, fParam3 = -1.0, fParam4 = -1.0, fParam5 = -1.0, sParam1 =
|
|
142
|
+
callSharedMethod(name, fParam1 = -1.0, fParam2 = -1.0, fParam3 = -1.0, fParam4 = -1.0, fParam5 = -1.0, sParam1 = "", sParam2 = "", sParam3 = "", sParam4 = "", sParam5 = "") {
|
|
141
143
|
CallScaleformMovieMethodWithNumberAndString(this.handle, name, fParam1, fParam2, fParam3, fParam4, fParam5, sParam1, sParam2, sParam3, sParam4, sParam5);
|
|
142
144
|
}
|
|
143
145
|
/**
|
|
@@ -211,7 +213,7 @@ export class Scaleform {
|
|
|
211
213
|
});
|
|
212
214
|
}
|
|
213
215
|
load() {
|
|
214
|
-
return new Promise(resolve => {
|
|
216
|
+
return new Promise((resolve) => {
|
|
215
217
|
if (this.IsLoaded) {
|
|
216
218
|
resolve(true);
|
|
217
219
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HudColor, NotificationType } from
|
|
2
|
-
import { Color, Size, Vector3 } from
|
|
3
|
-
import { Notification } from
|
|
1
|
+
import { HudColor, NotificationType } from "../enums";
|
|
2
|
+
import { Color, Size, Vector3 } from "../utils";
|
|
3
|
+
import { Notification } from "./";
|
|
4
4
|
export declare abstract class Screen {
|
|
5
5
|
static get Resolution(): Size;
|
|
6
6
|
static get ScaledResolution(): Size;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Audio } from
|
|
2
|
-
import { HudColor, NotificationType } from
|
|
3
|
-
import { Color, Size, String } from
|
|
4
|
-
import { Notification } from
|
|
1
|
+
import { Audio } from "../Audio";
|
|
2
|
+
import { HudColor, NotificationType } from "../enums";
|
|
3
|
+
import { Color, Size, String } from "../utils";
|
|
4
|
+
import { Notification } from "./";
|
|
5
5
|
export class Screen {
|
|
6
6
|
static get Resolution() {
|
|
7
7
|
const [width, height] = GetScreenActiveResolution();
|
|
@@ -25,32 +25,32 @@ export class Screen {
|
|
|
25
25
|
}
|
|
26
26
|
static showSubtitle(message, duration = 2500) {
|
|
27
27
|
const strings = String.stringToArray(message);
|
|
28
|
-
BeginTextCommandPrint(
|
|
29
|
-
strings.forEach(element => {
|
|
28
|
+
BeginTextCommandPrint("CELL_EMAIL_BCON");
|
|
29
|
+
strings.forEach((element) => {
|
|
30
30
|
AddTextComponentSubstringPlayerName(element);
|
|
31
31
|
});
|
|
32
32
|
EndTextCommandPrint(duration, true);
|
|
33
33
|
}
|
|
34
34
|
static displayHelpTextThisFrame(message) {
|
|
35
35
|
const strings = String.stringToArray(message);
|
|
36
|
-
BeginTextCommandDisplayHelp(
|
|
37
|
-
strings.forEach(element => {
|
|
36
|
+
BeginTextCommandDisplayHelp("CELL_EMAIL_BCON");
|
|
37
|
+
strings.forEach((element) => {
|
|
38
38
|
AddTextComponentSubstringPlayerName(element);
|
|
39
39
|
});
|
|
40
40
|
EndTextCommandDisplayHelp(0, false, false, -1);
|
|
41
41
|
}
|
|
42
42
|
static showNotification(message, blinking = false) {
|
|
43
43
|
const strings = String.stringToArray(message);
|
|
44
|
-
SetNotificationTextEntry(
|
|
45
|
-
strings.forEach(element => {
|
|
44
|
+
SetNotificationTextEntry("CELL_EMAIL_BCON");
|
|
45
|
+
strings.forEach((element) => {
|
|
46
46
|
AddTextComponentSubstringPlayerName(element);
|
|
47
47
|
});
|
|
48
48
|
return new Notification(DrawNotification(blinking, true));
|
|
49
49
|
}
|
|
50
50
|
static showAdvancedNotification(message, title, subtitle, iconSet, icon, bgColor = HudColor.NONE, flashColor = Color.Transparent, blinking = false, type = NotificationType.Default, showInBrief = true, sound = true) {
|
|
51
51
|
const strings = String.stringToArray(message);
|
|
52
|
-
SetNotificationTextEntry(
|
|
53
|
-
strings.forEach(element => {
|
|
52
|
+
SetNotificationTextEntry("CELL_EMAIL_BCON");
|
|
53
|
+
strings.forEach((element) => {
|
|
54
54
|
AddTextComponentSubstringPlayerName(element);
|
|
55
55
|
});
|
|
56
56
|
if (bgColor !== HudColor.NONE) {
|
|
@@ -60,7 +60,7 @@ export class Screen {
|
|
|
60
60
|
SetNotificationFlashColor(flashColor.r, flashColor.g, flashColor.b, flashColor.a);
|
|
61
61
|
}
|
|
62
62
|
if (sound) {
|
|
63
|
-
Audio.playSoundFrontEnd(
|
|
63
|
+
Audio.playSoundFrontEnd("DELETE", "HUD_DEATHMATCH_SOUNDSET");
|
|
64
64
|
}
|
|
65
65
|
SetNotificationMessage(iconSet, icon, true, Number(type), title, subtitle);
|
|
66
66
|
return new Notification(DrawNotification(blinking, showInBrief));
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { Color, Point, Size } from
|
|
2
|
-
import { Screen } from
|
|
1
|
+
import { Color, Point, Size } from "../utils";
|
|
2
|
+
import { Screen } from "./";
|
|
3
3
|
export class Sprite {
|
|
4
|
+
textureName;
|
|
5
|
+
pos;
|
|
6
|
+
size;
|
|
7
|
+
heading;
|
|
8
|
+
color;
|
|
9
|
+
visible;
|
|
10
|
+
_textureDict;
|
|
4
11
|
constructor(textureDict, textureName, pos, size, heading = 0, color = Color.White) {
|
|
5
12
|
this._textureDict = textureDict;
|
|
6
13
|
this.textureName = textureName;
|
|
@@ -31,7 +38,7 @@ export class Sprite {
|
|
|
31
38
|
return HasStreamedTextureDictLoaded(this._textureDict);
|
|
32
39
|
}
|
|
33
40
|
draw(arg1, textureName, pos, size, heading, color, loadTexture = true, resolution) {
|
|
34
|
-
const textureDictionary = arg1 && typeof arg1 ===
|
|
41
|
+
const textureDictionary = arg1 && typeof arg1 === "string" ? arg1 : this.TextureDict;
|
|
35
42
|
textureName = textureName || this.textureName;
|
|
36
43
|
pos = pos || this.pos;
|
|
37
44
|
size = size || this.size;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Alignment, Font } from
|
|
2
|
-
import { Color, Point, Size } from
|
|
3
|
-
import { IDrawable } from
|
|
1
|
+
import { Alignment, Font } from "../enums";
|
|
2
|
+
import { Color, Point, Size } from "../utils";
|
|
3
|
+
import { IDrawable } from "./";
|
|
4
4
|
export declare class Text implements IDrawable {
|
|
5
5
|
static draw(caption: string, pos: Point, scale?: number, color?: Color, font?: Font, alignment?: Alignment, dropShadow?: boolean, outline?: boolean, wordWrap?: Size, resolution?: Size): void;
|
|
6
6
|
static addLongString(str: string): void;
|
package/{client/ui → ui}/Text.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Alignment, Font } from
|
|
2
|
-
import { Color, Point, Size } from
|
|
3
|
-
import { Screen } from
|
|
1
|
+
import { Alignment, Font } from "../enums";
|
|
2
|
+
import { Color, Point, Size } from "../utils";
|
|
3
|
+
import { Screen } from "./";
|
|
4
4
|
export class Text {
|
|
5
5
|
static draw(caption, pos, scale = 1, color = Color.White, font = Font.ChaletLondon, alignment = Alignment.Left, dropShadow = false, outline = false, wordWrap, resolution) {
|
|
6
6
|
resolution = resolution || new Size(Screen.ScaledWidth, Screen.Height);
|
|
@@ -29,7 +29,7 @@ export class Text {
|
|
|
29
29
|
if (wordWrap) {
|
|
30
30
|
SetTextWrap(x, (pos.X + wordWrap.width) / resolution.width);
|
|
31
31
|
}
|
|
32
|
-
SetTextEntry(
|
|
32
|
+
SetTextEntry("STRING");
|
|
33
33
|
Text.addLongString(caption);
|
|
34
34
|
DrawText(x, y);
|
|
35
35
|
}
|
|
@@ -41,6 +41,15 @@ export class Text {
|
|
|
41
41
|
AddTextComponentSubstringPlayerName(substr);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
caption;
|
|
45
|
+
pos;
|
|
46
|
+
scale;
|
|
47
|
+
color;
|
|
48
|
+
font;
|
|
49
|
+
alignment;
|
|
50
|
+
dropShadow;
|
|
51
|
+
outline;
|
|
52
|
+
wordWrap;
|
|
44
53
|
/**
|
|
45
54
|
*
|
|
46
55
|
* @param caption Text to display
|
|
@@ -93,9 +102,12 @@ export class Text {
|
|
|
93
102
|
scale = scale !== undefined && scale !== null ? scale : this.scale;
|
|
94
103
|
color = color || this.color;
|
|
95
104
|
font = font !== undefined && font !== null ? font : this.font;
|
|
96
|
-
alignment =
|
|
97
|
-
|
|
98
|
-
|
|
105
|
+
alignment =
|
|
106
|
+
alignment !== undefined && alignment !== null
|
|
107
|
+
? alignment
|
|
108
|
+
: this.alignment;
|
|
109
|
+
dropShadow = typeof dropShadow === "boolean" ? dropShadow : dropShadow;
|
|
110
|
+
outline = typeof outline === "boolean" ? outline : outline;
|
|
99
111
|
wordWrap = wordWrap || this.wordWrap;
|
|
100
112
|
}
|
|
101
113
|
Text.draw(arg1, arg2, scale, color, font, alignment, dropShadow, outline, wordWrap, resolution);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HudComponent } from
|
|
2
|
-
import { Color, Point, Size } from
|
|
3
|
-
import { Hud } from
|
|
4
|
-
import { LoadingPrompt } from
|
|
5
|
-
import { Screen } from
|
|
6
|
-
import { Sprite } from
|
|
1
|
+
import { HudComponent } from "../enums";
|
|
2
|
+
import { Color, Point, Size } from "../utils";
|
|
3
|
+
import { Hud } from "./Hud";
|
|
4
|
+
import { LoadingPrompt } from "./LoadingPrompt";
|
|
5
|
+
import { Screen } from "./Screen";
|
|
6
|
+
import { Sprite } from "./Sprite";
|
|
7
7
|
/** @internal */
|
|
8
8
|
const activeTimerBars = [];
|
|
9
9
|
/** @internal */
|
|
@@ -26,7 +26,7 @@ const drawText = (text, position, options) => {
|
|
|
26
26
|
const shadow = options.shadow;
|
|
27
27
|
const color = options.color;
|
|
28
28
|
const align = options.align;
|
|
29
|
-
SetTextEntry(
|
|
29
|
+
SetTextEntry("CELL_EMAIL_BCON");
|
|
30
30
|
for (let i = 0; i < text.length; i += 99) {
|
|
31
31
|
const subStringText = text.substr(i, Math.min(99, text.length - i));
|
|
32
32
|
AddTextComponentSubstringPlayerName(subStringText);
|
|
@@ -66,19 +66,20 @@ const drawText = (text, position, options) => {
|
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
68
|
export class Timerbar {
|
|
69
|
+
sprite;
|
|
70
|
+
title = "";
|
|
71
|
+
text = "";
|
|
72
|
+
useProgressBar = false;
|
|
73
|
+
usePlayerStyle = false;
|
|
74
|
+
isVisible = false;
|
|
75
|
+
pbarValue = 0.0;
|
|
76
|
+
textColor = [240, 240, 240, 255];
|
|
77
|
+
pbarBgColor = [155, 155, 155, 255];
|
|
78
|
+
pbarFgColor = [255, 255, 255, 255];
|
|
69
79
|
constructor(title, useProgressBar = false) {
|
|
70
|
-
this.title = '';
|
|
71
|
-
this.text = '';
|
|
72
|
-
this.useProgressBar = false;
|
|
73
|
-
this.usePlayerStyle = false;
|
|
74
|
-
this.isVisible = false;
|
|
75
|
-
this.pbarValue = 0.0;
|
|
76
|
-
this.textColor = [240, 240, 240, 255];
|
|
77
|
-
this.pbarBgColor = [155, 155, 155, 255];
|
|
78
|
-
this.pbarFgColor = [255, 255, 255, 255];
|
|
79
80
|
this.title = title;
|
|
80
81
|
this.useProgressBar = useProgressBar;
|
|
81
|
-
this.text =
|
|
82
|
+
this.text = "";
|
|
82
83
|
this.pbarValue = 0.0;
|
|
83
84
|
this.textColor = [240, 240, 240, 255];
|
|
84
85
|
this.pbarBgColor = [155, 155, 155, 255];
|
|
@@ -87,7 +88,7 @@ export class Timerbar {
|
|
|
87
88
|
const safeZone = GetSafeZoneSize();
|
|
88
89
|
const safeZoneX = (1.0 - safeZone) * 0.5;
|
|
89
90
|
const safeZoneY = (1.0 - safeZone) * 0.5;
|
|
90
|
-
this.sprite = new Sprite(
|
|
91
|
+
this.sprite = new Sprite("timerbars", "all_black_bg", new Point(Screen.ScaledWidth * 0.918 - safeZoneX, Screen.Height * 0.984 - safeZoneY), new Size(Screen.ScaledWidth * 0.165, Screen.Height * 0.035), 0, new Color(255, 255, 255, 160));
|
|
91
92
|
if (!this.sprite.IsTextureDictionaryLoaded) {
|
|
92
93
|
this.sprite.loadTextureDictionary();
|
|
93
94
|
}
|
|
@@ -193,10 +194,16 @@ setTick(() => {
|
|
|
193
194
|
if (LoadingPrompt.IsActive) {
|
|
194
195
|
loadingPromptOffset = 0.035 + 0.035 * 0.038 * 2;
|
|
195
196
|
}
|
|
196
|
-
activeTimerBars.forEach(timerbar => {
|
|
197
|
-
const drawY = 0.984 -
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
activeTimerBars.forEach((timerbar) => {
|
|
198
|
+
const drawY = 0.984 -
|
|
199
|
+
loadingPromptOffset -
|
|
200
|
+
safeZoneY -
|
|
201
|
+
activeTimerBars.indexOf(timerbar) * 0.038;
|
|
202
|
+
DrawSprite("timerbars", "all_black_bg", 0.918 - safeZoneX, drawY, 0.165, 0.035, 0.0, 255, 255, 255, 160);
|
|
203
|
+
drawText(timerbar.Title, [
|
|
204
|
+
0.918 - safeZoneX + 0.012,
|
|
205
|
+
drawY - 0.009 - (timerbar.PlayerStyle ? 0.00625 : 0),
|
|
206
|
+
], {
|
|
200
207
|
align: 2,
|
|
201
208
|
color: timerbar.TextColor,
|
|
202
209
|
font: timerbar.PlayerStyle ? 4 : 0,
|
|
@@ -208,22 +215,22 @@ setTick(() => {
|
|
|
208
215
|
const pbarX = 0.918 - safeZoneX + 0.047;
|
|
209
216
|
const pbarY = drawY + 0.0015;
|
|
210
217
|
const width = 0.0616 * timerbar.Progress;
|
|
211
|
-
DrawRect(pbarX, pbarY, 0.0616, 0.0105, typeof timerbar.ProgressbarBgColor ===
|
|
218
|
+
DrawRect(pbarX, pbarY, 0.0616, 0.0105, typeof timerbar.ProgressbarBgColor === "number"
|
|
212
219
|
? timerbar.ProgressbarBgColor
|
|
213
|
-
: timerbar.ProgressbarBgColor[0], typeof timerbar.ProgressbarBgColor ===
|
|
220
|
+
: timerbar.ProgressbarBgColor[0], typeof timerbar.ProgressbarBgColor === "number"
|
|
214
221
|
? timerbar.ProgressbarBgColor
|
|
215
|
-
: timerbar.ProgressbarBgColor[1], typeof timerbar.ProgressbarBgColor ===
|
|
222
|
+
: timerbar.ProgressbarBgColor[1], typeof timerbar.ProgressbarBgColor === "number"
|
|
216
223
|
? timerbar.ProgressbarBgColor
|
|
217
|
-
: timerbar.ProgressbarBgColor[2], typeof timerbar.ProgressbarBgColor ===
|
|
224
|
+
: timerbar.ProgressbarBgColor[2], typeof timerbar.ProgressbarBgColor === "number"
|
|
218
225
|
? timerbar.ProgressbarBgColor
|
|
219
226
|
: timerbar.ProgressbarBgColor[3]);
|
|
220
|
-
DrawRect(pbarX - 0.0616 / 2 + width / 2, pbarY, width, 0.0105, typeof timerbar.ProgressbarFgColor ===
|
|
227
|
+
DrawRect(pbarX - 0.0616 / 2 + width / 2, pbarY, width, 0.0105, typeof timerbar.ProgressbarFgColor === "number"
|
|
221
228
|
? timerbar.ProgressbarFgColor
|
|
222
|
-
: timerbar.ProgressbarFgColor[0], typeof timerbar.ProgressbarFgColor ===
|
|
229
|
+
: timerbar.ProgressbarFgColor[0], typeof timerbar.ProgressbarFgColor === "number"
|
|
223
230
|
? timerbar.ProgressbarFgColor
|
|
224
|
-
: timerbar.ProgressbarFgColor[1], typeof timerbar.ProgressbarFgColor ===
|
|
231
|
+
: timerbar.ProgressbarFgColor[1], typeof timerbar.ProgressbarFgColor === "number"
|
|
225
232
|
? timerbar.ProgressbarFgColor
|
|
226
|
-
: timerbar.ProgressbarFgColor[2], typeof timerbar.ProgressbarFgColor ===
|
|
233
|
+
: timerbar.ProgressbarFgColor[2], typeof timerbar.ProgressbarFgColor === "number"
|
|
227
234
|
? timerbar.ProgressbarFgColor
|
|
228
235
|
: timerbar.ProgressbarFgColor[3]);
|
|
229
236
|
}
|
package/ui/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./interfaces";
|
|
2
|
+
export { Rectangle } from "./Rectangle";
|
|
3
|
+
export { Container } from "./Container";
|
|
4
|
+
export { Effects } from "./Effects";
|
|
5
|
+
export { Fading } from "./Fading";
|
|
6
|
+
export { Hud } from "./Hud";
|
|
7
|
+
export { InstructionalButtons } from "./InstructionalButtons";
|
|
8
|
+
export { LoadingPrompt } from "./LoadingPrompt";
|
|
9
|
+
export { Notification } from "./Notification";
|
|
10
|
+
export { Scaleform } from "./Scaleform";
|
|
11
|
+
export { Screen } from "./Screen";
|
|
12
|
+
export { Sprite } from "./Sprite";
|
|
13
|
+
export { Text } from "./Text";
|
|
14
|
+
export { Timerbar } from "./Timerbar";
|
|
15
|
+
export * from "./menu";
|
package/ui/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./interfaces";
|
|
2
|
+
export { Rectangle } from "./Rectangle";
|
|
3
|
+
export { Container } from "./Container";
|
|
4
|
+
export { Effects } from "./Effects";
|
|
5
|
+
export { Fading } from "./Fading";
|
|
6
|
+
export { Hud } from "./Hud";
|
|
7
|
+
export { InstructionalButtons } from "./InstructionalButtons";
|
|
8
|
+
export { LoadingPrompt } from "./LoadingPrompt";
|
|
9
|
+
export { Notification } from "./Notification";
|
|
10
|
+
export { Scaleform } from "./Scaleform";
|
|
11
|
+
export { Screen } from "./Screen";
|
|
12
|
+
export { Sprite } from "./Sprite";
|
|
13
|
+
export { Text } from "./Text";
|
|
14
|
+
export { Timerbar } from "./Timerbar";
|
|
15
|
+
export * from "./menu";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MenuControls, MenuSettings } from
|
|
2
|
-
import { Font, MenuAlignment } from
|
|
3
|
-
import { Color, LiteEvent, Point, Size } from
|
|
4
|
-
import { UIMenuItem } from
|
|
1
|
+
import { MenuControls, MenuSettings } from "../";
|
|
2
|
+
import { Font, MenuAlignment } from "../../enums";
|
|
3
|
+
import { Color, LiteEvent, Point, Size } from "../../utils";
|
|
4
|
+
import { UIMenuItem } from "./items";
|
|
5
5
|
export declare class Menu {
|
|
6
6
|
static screenAspectRatio: number;
|
|
7
7
|
static screenHeight: number;
|