@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,6 +1,6 @@
|
|
|
1
|
-
import { LiteEvent } from
|
|
2
|
-
import { ListItem } from
|
|
3
|
-
import { UIMenuItem } from
|
|
1
|
+
import { LiteEvent } from "../../../utils";
|
|
2
|
+
import { ListItem } from "../modules/";
|
|
3
|
+
import { UIMenuItem } from "./";
|
|
4
4
|
export declare class UIMenuListItem extends UIMenuItem {
|
|
5
5
|
readonly listChanged: LiteEvent;
|
|
6
6
|
readonly listSelected: LiteEvent;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { Menu, Sprite, Text } from
|
|
2
|
-
import { Alignment, Font } from
|
|
3
|
-
import { Color, LiteEvent, Point, Size, String } from
|
|
4
|
-
import { UIMenuItem } from
|
|
1
|
+
import { Menu, Sprite, Text } from "../../";
|
|
2
|
+
import { Alignment, Font } from "../../../enums";
|
|
3
|
+
import { Color, LiteEvent, Point, Size, String } from "../../../utils";
|
|
4
|
+
import { UIMenuItem } from "./";
|
|
5
5
|
export class UIMenuListItem extends UIMenuItem {
|
|
6
|
+
listChanged = new LiteEvent();
|
|
7
|
+
listSelected = new LiteEvent();
|
|
8
|
+
supportsRightBadge = false;
|
|
9
|
+
supportsRightLabel = false;
|
|
10
|
+
_itemText;
|
|
11
|
+
_leftArrow;
|
|
12
|
+
_rightArrow;
|
|
13
|
+
_index = 0;
|
|
14
|
+
_arrowOnlyOnSelected = false;
|
|
15
|
+
_items = [];
|
|
16
|
+
_textWidth = 0;
|
|
6
17
|
constructor(text, items, startIndex = 0, description, arrowOnlyOnSelected = true) {
|
|
7
18
|
super(text, description);
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.supportsRightLabel = false;
|
|
12
|
-
this._index = 0;
|
|
13
|
-
this._arrowOnlyOnSelected = false;
|
|
14
|
-
this._items = [];
|
|
15
|
-
this._textWidth = 0;
|
|
16
|
-
this._leftArrow = new Sprite('commonmenu', 'arrowleft', new Point(), new Size(30, 30));
|
|
17
|
-
this._rightArrow = new Sprite('commonmenu', 'arrowright', new Point(), new Size(30, 30));
|
|
18
|
-
this._itemText = new Text('', new Point(), 0.35, Color.White, Font.ChaletLondon, Alignment.Right);
|
|
19
|
+
this._leftArrow = new Sprite("commonmenu", "arrowleft", new Point(), new Size(30, 30));
|
|
20
|
+
this._rightArrow = new Sprite("commonmenu", "arrowright", new Point(), new Size(30, 30));
|
|
21
|
+
this._itemText = new Text("", new Point(), 0.35, Color.White, Font.ChaletLondon, Alignment.Right);
|
|
19
22
|
this.ArrowOnlyOnSelected = arrowOnlyOnSelected;
|
|
20
23
|
this.Items = items;
|
|
21
24
|
this.Index = startIndex;
|
|
@@ -33,7 +36,7 @@ export class UIMenuListItem extends UIMenuItem {
|
|
|
33
36
|
return this.Items[this.Index];
|
|
34
37
|
}
|
|
35
38
|
set SelectedItem(value) {
|
|
36
|
-
const index = this.Items.findIndex(i => i.id === value.id);
|
|
39
|
+
const index = this.Items.findIndex((i) => i.id === value.id);
|
|
37
40
|
if (index >= 0) {
|
|
38
41
|
this.Index = index;
|
|
39
42
|
}
|
|
@@ -49,7 +52,12 @@ export class UIMenuListItem extends UIMenuItem {
|
|
|
49
52
|
if (!this._items.length) {
|
|
50
53
|
return;
|
|
51
54
|
}
|
|
52
|
-
value =
|
|
55
|
+
value =
|
|
56
|
+
value < 0
|
|
57
|
+
? this._items.length - 1
|
|
58
|
+
: value > this._items.length - 1
|
|
59
|
+
? 0
|
|
60
|
+
: value;
|
|
53
61
|
this._index = value;
|
|
54
62
|
this._textWidth = 0;
|
|
55
63
|
}
|
|
@@ -83,7 +91,8 @@ export class UIMenuListItem extends UIMenuItem {
|
|
|
83
91
|
this._itemText.caption = caption;
|
|
84
92
|
this._textWidth = String.measureString(caption, this._itemText.font, this._itemText.scale, Menu.screenWidth);
|
|
85
93
|
}
|
|
86
|
-
this._rightArrow.pos.X =
|
|
94
|
+
this._rightArrow.pos.X =
|
|
95
|
+
this.offset.X + (this.parent ? this.parent.WidthOffset : 0) + 400;
|
|
87
96
|
this._itemText.pos.X = this._rightArrow.pos.X + 5;
|
|
88
97
|
this._itemText.color = this.enabled
|
|
89
98
|
? this.selected
|
|
@@ -105,6 +114,6 @@ export class UIMenuListItem extends UIMenuItem {
|
|
|
105
114
|
}
|
|
106
115
|
_getSelectedItemCaption() {
|
|
107
116
|
const item = this.SelectedItem;
|
|
108
|
-
return item ? item.name :
|
|
117
|
+
return item ? item.name : "";
|
|
109
118
|
}
|
|
110
119
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { UIMenuItem } from
|
|
2
|
-
import { Alignment } from
|
|
3
|
-
import { Menu } from
|
|
1
|
+
import { UIMenuItem } from "./";
|
|
2
|
+
import { Alignment } from "../../../enums";
|
|
3
|
+
import { Menu } from "../";
|
|
4
4
|
export class UIMenuSeparatorItem extends UIMenuItem {
|
|
5
|
+
supportsDescription = false;
|
|
6
|
+
supportsPanels = false;
|
|
7
|
+
supportsLeftBadge = false;
|
|
8
|
+
supportsRightBadge = false;
|
|
9
|
+
supportsRightLabel = false;
|
|
5
10
|
constructor(text) {
|
|
6
|
-
super(text ??
|
|
7
|
-
this.supportsDescription = false;
|
|
8
|
-
this.supportsPanels = false;
|
|
9
|
-
this.supportsLeftBadge = false;
|
|
10
|
-
this.supportsRightBadge = false;
|
|
11
|
-
this.supportsRightLabel = false;
|
|
11
|
+
super(text ?? "");
|
|
12
12
|
this.text.alignment = Alignment.Centered;
|
|
13
13
|
}
|
|
14
14
|
setVerticalPosition(y) {
|
|
@@ -21,7 +21,7 @@ export class UIMenuSeparatorItem extends UIMenuItem {
|
|
|
21
21
|
this.rectangle.size.width = width;
|
|
22
22
|
this.rectangle.pos.X = this.offset.X;
|
|
23
23
|
this.rectangle.draw(undefined, Menu.screenResolution);
|
|
24
|
-
if (this.text.caption !==
|
|
24
|
+
if (this.text.caption !== "") {
|
|
25
25
|
this.text.pos.X = this.offset.X + width / 2;
|
|
26
26
|
this.text.draw(undefined, Menu.screenResolution);
|
|
27
27
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UIMenuItem } from
|
|
2
|
-
import { Color, LiteEvent } from
|
|
3
|
-
import { BadgeStyle } from
|
|
1
|
+
import { UIMenuItem } from "./";
|
|
2
|
+
import { Color, LiteEvent } from "../../../utils";
|
|
3
|
+
import { BadgeStyle } from "../../../enums";
|
|
4
4
|
export declare class UIMenuSliderItem extends UIMenuItem {
|
|
5
5
|
readonly sliderChanged: LiteEvent;
|
|
6
6
|
readonly sliderSelected: LiteEvent;
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import { Menu, Rectangle, Sprite } from
|
|
2
|
-
import { UIMenuItem } from
|
|
3
|
-
import { Color, LiteEvent, Point, Size } from
|
|
4
|
-
import { BadgeStyle } from
|
|
1
|
+
import { Menu, Rectangle, Sprite } from "../../";
|
|
2
|
+
import { UIMenuItem } from "./";
|
|
3
|
+
import { Color, LiteEvent, Point, Size } from "../../../utils";
|
|
4
|
+
import { BadgeStyle } from "../../../enums";
|
|
5
5
|
export class UIMenuSliderItem extends UIMenuItem {
|
|
6
|
+
sliderChanged = new LiteEvent();
|
|
7
|
+
sliderSelected = new LiteEvent();
|
|
8
|
+
supportsRightBadge = false;
|
|
9
|
+
supportsRightLabel = false;
|
|
10
|
+
_index = 0;
|
|
11
|
+
_items = [];
|
|
12
|
+
_showDivider = true;
|
|
13
|
+
_arrowOnlyOnSelected = false;
|
|
14
|
+
_leftSliderBadge = BadgeStyle.None;
|
|
15
|
+
_rightSliderBadge = BadgeStyle.None;
|
|
16
|
+
_background;
|
|
17
|
+
_slider;
|
|
18
|
+
_divider;
|
|
19
|
+
_leftArrow;
|
|
20
|
+
_rightArrow;
|
|
21
|
+
_leftSliderBadgeSprite;
|
|
22
|
+
_rightSliderBadgeSprite;
|
|
6
23
|
constructor(text, items, startIndex = 0, description, showDivider = false, arrowOnlyOnSelected = false) {
|
|
7
24
|
super(text, description);
|
|
8
|
-
this.sliderChanged = new LiteEvent();
|
|
9
|
-
this.sliderSelected = new LiteEvent();
|
|
10
|
-
this.supportsRightBadge = false;
|
|
11
|
-
this.supportsRightLabel = false;
|
|
12
|
-
this._index = 0;
|
|
13
|
-
this._items = [];
|
|
14
|
-
this._showDivider = true;
|
|
15
|
-
this._arrowOnlyOnSelected = false;
|
|
16
|
-
this._leftSliderBadge = BadgeStyle.None;
|
|
17
|
-
this._rightSliderBadge = BadgeStyle.None;
|
|
18
25
|
this._background = new Rectangle(new Point(), new Size(150, 9), new Color(4, 32, 57));
|
|
19
26
|
this._slider = new Rectangle(new Point(), new Size(75, 9), new Color(57, 116, 200));
|
|
20
27
|
this._divider = new Rectangle(new Point(), new Size(2.5, 20), Color.WhiteSmoke);
|
|
21
|
-
this._leftArrow = new Sprite(
|
|
22
|
-
this._rightArrow = new Sprite(
|
|
23
|
-
this._leftSliderBadgeSprite = new Sprite(
|
|
24
|
-
this._rightSliderBadgeSprite = new Sprite(
|
|
28
|
+
this._leftArrow = new Sprite("commonmenutu", "arrowleft", new Point(), new Size(15, 15));
|
|
29
|
+
this._rightArrow = new Sprite("commonmenutu", "arrowright", new Point(), new Size(15, 15));
|
|
30
|
+
this._leftSliderBadgeSprite = new Sprite("", "");
|
|
31
|
+
this._rightSliderBadgeSprite = new Sprite("", "");
|
|
25
32
|
this.ArrowOnlyOnSelected = arrowOnlyOnSelected;
|
|
26
33
|
this.ShowDivider = showDivider;
|
|
27
34
|
this.Items = items;
|
|
@@ -78,7 +85,8 @@ export class UIMenuSliderItem extends UIMenuItem {
|
|
|
78
85
|
set LeftSliderBadge(value) {
|
|
79
86
|
value = Number(value);
|
|
80
87
|
this._leftSliderBadge = value;
|
|
81
|
-
this._leftSliderBadgeSprite.TextureDict =
|
|
88
|
+
this._leftSliderBadgeSprite.TextureDict =
|
|
89
|
+
UIMenuItem.badgeToTextureDict(value);
|
|
82
90
|
this._leftSliderBadgeSprite.size = UIMenuItem.getBadgeSize(value);
|
|
83
91
|
}
|
|
84
92
|
get RightSliderBadge() {
|
|
@@ -87,7 +95,8 @@ export class UIMenuSliderItem extends UIMenuItem {
|
|
|
87
95
|
set RightSliderBadge(value) {
|
|
88
96
|
value = Number(value);
|
|
89
97
|
this._rightSliderBadge = value;
|
|
90
|
-
this._rightSliderBadgeSprite.TextureDict =
|
|
98
|
+
this._rightSliderBadgeSprite.TextureDict =
|
|
99
|
+
UIMenuItem.badgeToTextureDict(value);
|
|
91
100
|
this._rightSliderBadgeSprite.size = UIMenuItem.getBadgeSize(value);
|
|
92
101
|
}
|
|
93
102
|
get IsMouseInBoundsOfLeftArrow() {
|
|
@@ -111,9 +120,13 @@ export class UIMenuSliderItem extends UIMenuItem {
|
|
|
111
120
|
this._leftArrow.pos.Y = yOffset + 155.5;
|
|
112
121
|
this._rightArrow.pos.Y = yOffset + 155.5;
|
|
113
122
|
this._leftSliderBadgeSprite.pos.Y =
|
|
114
|
-
yOffset +
|
|
123
|
+
yOffset +
|
|
124
|
+
142 +
|
|
125
|
+
UIMenuItem.getBadgeSpriteHeightOffset(this._leftSliderBadgeSprite);
|
|
115
126
|
this._rightSliderBadgeSprite.pos.Y =
|
|
116
|
-
yOffset +
|
|
127
|
+
yOffset +
|
|
128
|
+
142 +
|
|
129
|
+
UIMenuItem.getBadgeSpriteHeightOffset(this._rightSliderBadgeSprite);
|
|
117
130
|
super.setVerticalPosition(y);
|
|
118
131
|
}
|
|
119
132
|
draw() {
|
|
@@ -132,7 +145,8 @@ export class UIMenuSliderItem extends UIMenuItem {
|
|
|
132
145
|
const widthOffset = UIMenuItem.getBadgeSpriteWidthOffset(this._rightSliderBadgeSprite);
|
|
133
146
|
this._background.pos.X -= 40;
|
|
134
147
|
this._rightSliderBadgeSprite.pos.X = 431 + x;
|
|
135
|
-
this._rightSliderBadgeSprite.pos.X -=
|
|
148
|
+
this._rightSliderBadgeSprite.pos.X -=
|
|
149
|
+
this._rightSliderBadgeSprite.size.width + widthOffset;
|
|
136
150
|
this._rightSliderBadgeSprite.textureName = this.badgeToTextureName(this._rightSliderBadge);
|
|
137
151
|
this._rightSliderBadgeSprite.color = this.badgeToColor(this._rightSliderBadge);
|
|
138
152
|
this._rightSliderBadgeSprite.draw(Menu.screenResolution);
|
|
@@ -142,13 +156,15 @@ export class UIMenuSliderItem extends UIMenuItem {
|
|
|
142
156
|
}
|
|
143
157
|
if (this._leftSliderBadge !== BadgeStyle.None) {
|
|
144
158
|
const widthOffset = UIMenuItem.getBadgeSpriteWidthOffset(this._leftSliderBadgeSprite);
|
|
145
|
-
this._leftSliderBadgeSprite.pos.X -=
|
|
159
|
+
this._leftSliderBadgeSprite.pos.X -=
|
|
160
|
+
this._leftSliderBadgeSprite.size.width + widthOffset;
|
|
146
161
|
this._leftSliderBadgeSprite.pos.X += this._background.pos.X;
|
|
147
162
|
this._leftSliderBadgeSprite.textureName = this.badgeToTextureName(this._leftSliderBadge);
|
|
148
163
|
this._leftSliderBadgeSprite.color = this.badgeToColor(this._leftSliderBadge);
|
|
149
164
|
this._leftSliderBadgeSprite.draw(Menu.screenResolution);
|
|
150
165
|
}
|
|
151
|
-
const sliderXOffset = ((this._background.size.width - this._slider.size.width) /
|
|
166
|
+
const sliderXOffset = ((this._background.size.width - this._slider.size.width) /
|
|
167
|
+
(this._items.length - 1)) *
|
|
152
168
|
this.Index;
|
|
153
169
|
this._slider.pos.X = this._background.pos.X + sliderXOffset;
|
|
154
170
|
this._leftArrow.color = this.enabled
|
|
@@ -161,12 +177,14 @@ export class UIMenuSliderItem extends UIMenuItem {
|
|
|
161
177
|
this._slider.draw(undefined, Menu.screenResolution);
|
|
162
178
|
if (showArrows) {
|
|
163
179
|
this._leftArrow.pos.X = this._background.pos.X - 15;
|
|
164
|
-
this._rightArrow.pos.X =
|
|
180
|
+
this._rightArrow.pos.X =
|
|
181
|
+
this._background.pos.X + this._background.size.width;
|
|
165
182
|
this._leftArrow.draw(Menu.screenResolution);
|
|
166
183
|
this._rightArrow.draw(Menu.screenResolution);
|
|
167
184
|
}
|
|
168
185
|
if (this._showDivider) {
|
|
169
|
-
this._divider.pos.X =
|
|
186
|
+
this._divider.pos.X =
|
|
187
|
+
this._background.pos.X + this._background.size.width / 2;
|
|
170
188
|
this._divider.draw(undefined, Menu.screenResolution);
|
|
171
189
|
}
|
|
172
190
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./panels";
|
|
2
|
+
export { UIMenuItem } from "./UIMenuItem";
|
|
3
|
+
export { UIMenuCheckboxItem } from "./UIMenuCheckboxItem";
|
|
4
|
+
export { UIMenuListItem } from "./UIMenuListItem";
|
|
5
|
+
export { UIMenuSeparatorItem } from "./UIMenuSeparatorItem";
|
|
6
|
+
export { UIMenuSliderItem } from "./UIMenuSliderItem";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./panels";
|
|
2
|
+
export { UIMenuItem } from "./UIMenuItem";
|
|
3
|
+
export { UIMenuCheckboxItem } from "./UIMenuCheckboxItem";
|
|
4
|
+
export { UIMenuListItem } from "./UIMenuListItem";
|
|
5
|
+
export { UIMenuSeparatorItem } from "./UIMenuSeparatorItem";
|
|
6
|
+
export { UIMenuSliderItem } from "./UIMenuSliderItem";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UIMenuItem } from
|
|
2
|
-
import { Rectangle, Sprite } from
|
|
3
|
-
import { Menu } from
|
|
1
|
+
import { UIMenuItem } from "../";
|
|
2
|
+
import { Rectangle, Sprite } from "../../../";
|
|
3
|
+
import { Menu } from "../../";
|
|
4
4
|
export declare abstract class AbstractUIMenuPanel {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
protected parentItem?: UIMenuItem;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Crypto } from
|
|
2
|
-
import { Sprite } from
|
|
3
|
-
import { Menu } from
|
|
1
|
+
import { Crypto } from "../../../../utils";
|
|
2
|
+
import { Sprite } from "../../../";
|
|
3
|
+
import { Menu } from "../../";
|
|
4
4
|
export class AbstractUIMenuPanel {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
id = Crypto.uuidv4();
|
|
6
|
+
parentItem;
|
|
7
|
+
enabled = true;
|
|
8
|
+
background;
|
|
9
9
|
get ParentMenu() {
|
|
10
10
|
return this.parentItem ? this.parentItem.parent : undefined;
|
|
11
11
|
}
|
|
@@ -30,7 +30,8 @@ export class AbstractUIMenuPanel {
|
|
|
30
30
|
}
|
|
31
31
|
draw() {
|
|
32
32
|
if (this.background) {
|
|
33
|
-
this.background.size.width =
|
|
33
|
+
this.background.size.width =
|
|
34
|
+
431 + (this.ParentMenu ? this.ParentMenu.WidthOffset : 0);
|
|
34
35
|
this.background.pos.X = this.parentItem ? this.parentItem.offset.X : 0;
|
|
35
36
|
if (this.background instanceof Sprite) {
|
|
36
37
|
this.background.draw(Menu.screenResolution);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Color } from
|
|
2
|
-
import { AbstractUIMenuPanel } from
|
|
3
|
-
import { Sprite } from
|
|
1
|
+
import { Color } from "../../../../utils";
|
|
2
|
+
import { AbstractUIMenuPanel } from "./";
|
|
3
|
+
import { Sprite } from "../../../";
|
|
4
4
|
export declare class UIMenuColorPanel extends AbstractUIMenuPanel {
|
|
5
5
|
protected readonly background: Sprite;
|
|
6
6
|
private _title;
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import { Color, Point, Size } from
|
|
2
|
-
import { AbstractUIMenuPanel } from
|
|
3
|
-
import { Rectangle, Sprite, Text } from
|
|
4
|
-
import { Alignment, Control, Font } from
|
|
5
|
-
import { Game, Menu } from
|
|
1
|
+
import { Color, Point, Size } from "../../../../utils";
|
|
2
|
+
import { AbstractUIMenuPanel } from "./";
|
|
3
|
+
import { Rectangle, Sprite, Text } from "../../../";
|
|
4
|
+
import { Alignment, Control, Font } from "../../../../enums";
|
|
5
|
+
import { Game, Menu } from "../../../../";
|
|
6
6
|
export class UIMenuColorPanel extends AbstractUIMenuPanel {
|
|
7
|
+
background;
|
|
8
|
+
_title = "";
|
|
9
|
+
_text;
|
|
10
|
+
_colors = [];
|
|
11
|
+
_bar = [];
|
|
12
|
+
_lastColor = Color.Transparent;
|
|
13
|
+
_leftArrow;
|
|
14
|
+
_rightArrow;
|
|
15
|
+
_selectedRectangle;
|
|
16
|
+
// Pagination
|
|
17
|
+
_min = 0;
|
|
18
|
+
_max = 8;
|
|
19
|
+
_total = 9;
|
|
20
|
+
_index = 0;
|
|
7
21
|
constructor(title, colors) {
|
|
8
22
|
super();
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this._lastColor = Color.Transparent;
|
|
13
|
-
// Pagination
|
|
14
|
-
this._min = 0;
|
|
15
|
-
this._max = 8;
|
|
16
|
-
this._total = 9;
|
|
17
|
-
this._index = 0;
|
|
18
|
-
this.background = new Sprite('commonmenu', 'gradient_bgd', new Point(), new Size(431, 112));
|
|
19
|
-
this._leftArrow = new Sprite('commonmenu', 'arrowleft', new Point(), new Size(30, 30));
|
|
20
|
-
this._rightArrow = new Sprite('commonmenu', 'arrowright', new Point(), new Size(30, 30));
|
|
23
|
+
this.background = new Sprite("commonmenu", "gradient_bgd", new Point(), new Size(431, 112));
|
|
24
|
+
this._leftArrow = new Sprite("commonmenu", "arrowleft", new Point(), new Size(30, 30));
|
|
25
|
+
this._rightArrow = new Sprite("commonmenu", "arrowright", new Point(), new Size(30, 30));
|
|
21
26
|
this._selectedRectangle = new Rectangle(new Point(), new Size(44.5, 8), Color.White);
|
|
22
|
-
this._text = new Text(
|
|
27
|
+
this._text = new Text("", new Point(), 0.35, Color.White, Font.ChaletLondon, Alignment.Centered);
|
|
23
28
|
this.Title = title;
|
|
24
29
|
this.Colors = colors;
|
|
25
30
|
}
|
|
@@ -27,7 +32,7 @@ export class UIMenuColorPanel extends AbstractUIMenuPanel {
|
|
|
27
32
|
return this._title;
|
|
28
33
|
}
|
|
29
34
|
set Title(value) {
|
|
30
|
-
this._title = value ? value.trim() :
|
|
35
|
+
this._title = value ? value.trim() : "";
|
|
31
36
|
this._updateText();
|
|
32
37
|
}
|
|
33
38
|
get Colors() {
|
|
@@ -39,7 +44,7 @@ export class UIMenuColorPanel extends AbstractUIMenuPanel {
|
|
|
39
44
|
}
|
|
40
45
|
this._colors = value;
|
|
41
46
|
this._bar = [];
|
|
42
|
-
const colorRectangles = value.slice(0, this._total).map(color => {
|
|
47
|
+
const colorRectangles = value.slice(0, this._total).map((color) => {
|
|
43
48
|
return new Rectangle(new Point(0, 0), new Size(44.5, 44.5), color);
|
|
44
49
|
});
|
|
45
50
|
this._bar.push(...colorRectangles);
|
|
@@ -50,8 +55,8 @@ export class UIMenuColorPanel extends AbstractUIMenuPanel {
|
|
|
50
55
|
return this._colors[this.Index];
|
|
51
56
|
}
|
|
52
57
|
set Color(value) {
|
|
53
|
-
const index = this._colors.findIndex(c => {
|
|
54
|
-
return c.a === value.a && c.r === value.r && c.g === value.g && c.b === value.b;
|
|
58
|
+
const index = this._colors.findIndex((c) => {
|
|
59
|
+
return (c.a === value.a && c.r === value.r && c.g === value.g && c.b === value.b);
|
|
55
60
|
});
|
|
56
61
|
if (index !== -1) {
|
|
57
62
|
this.Index = index;
|
|
@@ -201,7 +206,8 @@ export class UIMenuColorPanel extends AbstractUIMenuPanel {
|
|
|
201
206
|
this._goRight();
|
|
202
207
|
}
|
|
203
208
|
this._bar.forEach(async (colorRect, index) => {
|
|
204
|
-
if (this.ParentMenu &&
|
|
209
|
+
if (this.ParentMenu &&
|
|
210
|
+
this.ParentMenu.isMouseInBounds(colorRect.pos, colorRect.size)) {
|
|
205
211
|
this.Index = this._min + index;
|
|
206
212
|
}
|
|
207
213
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Point } from
|
|
2
|
-
import { AbstractUIMenuPanel } from
|
|
3
|
-
import { Sprite } from
|
|
1
|
+
import { Point } from "../../../../utils";
|
|
2
|
+
import { AbstractUIMenuPanel } from "./";
|
|
3
|
+
import { Sprite } from "../../../";
|
|
4
4
|
export declare class UIMenuGridPanel extends AbstractUIMenuPanel {
|
|
5
5
|
protected readonly background: Sprite;
|
|
6
6
|
private _isCircleLocked;
|
|
@@ -1,54 +1,67 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
|
-
import { Color, Point, Size, Wait } from
|
|
3
|
-
import { AbstractUIMenuPanel } from
|
|
4
|
-
import { Menu, Sprite, Text } from
|
|
5
|
-
import { Alignment, Control, Font } from
|
|
6
|
-
import { Game } from
|
|
2
|
+
import { Color, Point, Size, Wait } from "../../../../utils";
|
|
3
|
+
import { AbstractUIMenuPanel } from "./";
|
|
4
|
+
import { Menu, Sprite, Text } from "../../../";
|
|
5
|
+
import { Alignment, Control, Font } from "../../../../enums";
|
|
6
|
+
import { Game } from "../../../../Game";
|
|
7
7
|
export class UIMenuGridPanel extends AbstractUIMenuPanel {
|
|
8
|
+
background;
|
|
9
|
+
_isCircleLocked = false;
|
|
10
|
+
_pressed = false;
|
|
11
|
+
_lockXAxis = false;
|
|
12
|
+
_lockYAxis = false;
|
|
13
|
+
_topText;
|
|
14
|
+
_leftText;
|
|
15
|
+
_rightText;
|
|
16
|
+
_bottomText;
|
|
17
|
+
_lastCirclePosition;
|
|
18
|
+
_grid;
|
|
19
|
+
_circle;
|
|
20
|
+
_setCirclePosition;
|
|
8
21
|
constructor(topText, leftText, rightText, bottomText, circlePosition) {
|
|
9
22
|
super();
|
|
10
|
-
this._isCircleLocked = false;
|
|
11
|
-
this._pressed = false;
|
|
12
|
-
this._lockXAxis = false;
|
|
13
|
-
this._lockYAxis = false;
|
|
14
23
|
this._setCirclePosition = circlePosition || new Point(0.5, 0.5);
|
|
15
|
-
this.background = new Sprite(
|
|
16
|
-
this._grid = new Sprite(
|
|
17
|
-
this._circle = new Sprite(
|
|
18
|
-
this.TopText = topText ??
|
|
19
|
-
this.LeftText = leftText ??
|
|
20
|
-
this.RightText = rightText ??
|
|
21
|
-
this.BottomText = bottomText ??
|
|
24
|
+
this.background = new Sprite("commonmenu", "gradient_bgd", new Point(), new Size(431, 275));
|
|
25
|
+
this._grid = new Sprite("pause_menu_pages_char_mom_dad", "nose_grid", new Point(), new Size(200, 200));
|
|
26
|
+
this._circle = new Sprite("mpinventory", "in_world_circle", new Point(), new Size(20, 20));
|
|
27
|
+
this.TopText = topText ?? "";
|
|
28
|
+
this.LeftText = leftText ?? "";
|
|
29
|
+
this.RightText = rightText ?? "";
|
|
30
|
+
this.BottomText = bottomText ?? "";
|
|
22
31
|
this._lastCirclePosition = this._setCirclePosition;
|
|
23
32
|
}
|
|
24
33
|
get TopText() {
|
|
25
|
-
return this._topText ? this._topText.caption :
|
|
34
|
+
return this._topText ? this._topText.caption : "";
|
|
26
35
|
}
|
|
27
36
|
set TopText(value) {
|
|
28
|
-
this._setText(
|
|
37
|
+
this._setText("_topText", value);
|
|
29
38
|
}
|
|
30
39
|
get LeftText() {
|
|
31
|
-
return this._leftText ? this._leftText.caption :
|
|
40
|
+
return this._leftText ? this._leftText.caption : "";
|
|
32
41
|
}
|
|
33
42
|
set LeftText(value) {
|
|
34
|
-
this._setText(
|
|
43
|
+
this._setText("_leftText", value);
|
|
35
44
|
}
|
|
36
45
|
get RightText() {
|
|
37
|
-
return this._rightText ? this._rightText.caption :
|
|
46
|
+
return this._rightText ? this._rightText.caption : "";
|
|
38
47
|
}
|
|
39
48
|
set RightText(value) {
|
|
40
|
-
this._setText(
|
|
49
|
+
this._setText("_rightText", value);
|
|
41
50
|
}
|
|
42
51
|
get BottomText() {
|
|
43
|
-
return this._bottomText ? this._bottomText.caption :
|
|
52
|
+
return this._bottomText ? this._bottomText.caption : "";
|
|
44
53
|
}
|
|
45
54
|
set BottomText(value) {
|
|
46
|
-
this._setText(
|
|
55
|
+
this._setText("_bottomText", value);
|
|
47
56
|
}
|
|
48
57
|
get CirclePosition() {
|
|
49
|
-
return new Point(Math.round(((this._circle.pos.X -
|
|
58
|
+
return new Point(Math.round(((this._circle.pos.X -
|
|
59
|
+
(this._grid.pos.X + 20) +
|
|
60
|
+
this._circle.size.width / 2) /
|
|
50
61
|
(this._grid.size.width - 40)) *
|
|
51
|
-
100) / 100, Math.round(((this._circle.pos.Y -
|
|
62
|
+
100) / 100, Math.round(((this._circle.pos.Y -
|
|
63
|
+
(this._grid.pos.Y + 20) +
|
|
64
|
+
this._circle.size.height / 2) /
|
|
52
65
|
(this._grid.size.height - 40)) *
|
|
53
66
|
100) / 100);
|
|
54
67
|
}
|
|
@@ -63,7 +76,10 @@ export class UIMenuGridPanel extends AbstractUIMenuPanel {
|
|
|
63
76
|
x = x >= 0 && x <= 1 ? x : 0;
|
|
64
77
|
this._setCirclePosition.X = x;
|
|
65
78
|
this._circle.pos.X =
|
|
66
|
-
this._grid.pos.X +
|
|
79
|
+
this._grid.pos.X +
|
|
80
|
+
20 +
|
|
81
|
+
(this._grid.size.width - 40) * x -
|
|
82
|
+
this._circle.size.width / 2;
|
|
67
83
|
}
|
|
68
84
|
set CirclePositionY(y) {
|
|
69
85
|
if (this._isCircleLocked && this._lockYAxis) {
|
|
@@ -72,7 +88,10 @@ export class UIMenuGridPanel extends AbstractUIMenuPanel {
|
|
|
72
88
|
y = y >= 0 && y <= 1 ? y : 0;
|
|
73
89
|
this._setCirclePosition.Y = y;
|
|
74
90
|
this._circle.pos.Y =
|
|
75
|
-
this._grid.pos.Y +
|
|
91
|
+
this._grid.pos.Y +
|
|
92
|
+
20 +
|
|
93
|
+
(this._grid.size.height - 40) * y -
|
|
94
|
+
this._circle.size.height / 2;
|
|
76
95
|
}
|
|
77
96
|
get LockXAxis() {
|
|
78
97
|
return this._lockXAxis;
|
|
@@ -128,7 +147,8 @@ export class UIMenuGridPanel extends AbstractUIMenuPanel {
|
|
|
128
147
|
draw() {
|
|
129
148
|
if (this.enabled) {
|
|
130
149
|
super.draw();
|
|
131
|
-
const x = this.parentItem?.offset.X ??
|
|
150
|
+
const x = this.parentItem?.offset.X ??
|
|
151
|
+
0 + (this.ParentMenu?.WidthOffset ?? 0) / 2;
|
|
132
152
|
this._grid.pos.X = x + 115.5;
|
|
133
153
|
if (!this._isCircleLocked) {
|
|
134
154
|
this.CirclePosition = this._setCirclePosition;
|
|
@@ -156,7 +176,7 @@ export class UIMenuGridPanel extends AbstractUIMenuPanel {
|
|
|
156
176
|
}
|
|
157
177
|
}
|
|
158
178
|
_setText(name, value) {
|
|
159
|
-
if (value && value.trim() !==
|
|
179
|
+
if (value && value.trim() !== "") {
|
|
160
180
|
// @ts-ignore
|
|
161
181
|
if (!this[name]) {
|
|
162
182
|
// @ts-ignore
|
|
@@ -182,21 +202,47 @@ export class UIMenuGridPanel extends AbstractUIMenuPanel {
|
|
|
182
202
|
const drawOffset = this.ParentMenu?.DrawOffset ?? new Point(0, 0);
|
|
183
203
|
while (Game.isDisabledControlPressed(0, Control.Attack)) {
|
|
184
204
|
await Wait(0);
|
|
185
|
-
let cX = (GetControlNormal(0, Control.CursorX) - drawOffset.X) *
|
|
186
|
-
|
|
205
|
+
let cX = (GetControlNormal(0, Control.CursorX) - drawOffset.X) *
|
|
206
|
+
Menu.screenWidth;
|
|
207
|
+
let cY = (GetControlNormal(0, Control.CursorY) - drawOffset.Y) *
|
|
208
|
+
Menu.screenHeight;
|
|
187
209
|
cX -= this._circle.size.width / 2;
|
|
188
210
|
cY -= this._circle.size.height / 2;
|
|
189
211
|
this._circle.pos.X =
|
|
190
|
-
cX >
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
212
|
+
cX >
|
|
213
|
+
this._grid.pos.X +
|
|
214
|
+
10 +
|
|
215
|
+
this._grid.size.width -
|
|
216
|
+
(this._lockXAxis ? 120 : 40)
|
|
217
|
+
? this._grid.pos.X +
|
|
218
|
+
10 +
|
|
219
|
+
this._grid.size.width -
|
|
220
|
+
(this._lockXAxis ? 120 : 40)
|
|
221
|
+
: cX <
|
|
222
|
+
this._grid.pos.X +
|
|
223
|
+
(this._lockXAxis ? 100 : 20) -
|
|
224
|
+
this._circle.size.width / 2
|
|
225
|
+
? this._grid.pos.X +
|
|
226
|
+
(this._lockXAxis ? 100 : 20) -
|
|
227
|
+
this._circle.size.width / 2
|
|
194
228
|
: cX;
|
|
195
229
|
this._circle.pos.Y =
|
|
196
|
-
cY >
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
230
|
+
cY >
|
|
231
|
+
this._grid.pos.Y +
|
|
232
|
+
10 +
|
|
233
|
+
this._grid.size.height -
|
|
234
|
+
(this._lockYAxis ? 120 : 40)
|
|
235
|
+
? this._grid.pos.Y +
|
|
236
|
+
10 +
|
|
237
|
+
this._grid.size.height -
|
|
238
|
+
(this._lockYAxis ? 120 : 40)
|
|
239
|
+
: cY <
|
|
240
|
+
this._grid.pos.Y +
|
|
241
|
+
(this._lockYAxis ? 100 : 20) -
|
|
242
|
+
this._circle.size.height / 2
|
|
243
|
+
? this._grid.pos.Y +
|
|
244
|
+
(this._lockYAxis ? 100 : 20) -
|
|
245
|
+
this._circle.size.height / 2
|
|
200
246
|
: cY;
|
|
201
247
|
}
|
|
202
248
|
this.updateParentItem();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractUIMenuPanel } from
|
|
2
|
-
import { Sprite } from
|
|
1
|
+
import { AbstractUIMenuPanel } from "./";
|
|
2
|
+
import { Sprite } from "../../../";
|
|
3
3
|
export declare class UIMenuPercentagePanel extends AbstractUIMenuPanel {
|
|
4
4
|
protected readonly background: Sprite;
|
|
5
5
|
private _pressed;
|