mirror of
https://github.com/sergeyyarkov/altv-copchase-mod.git
synced 2026-10-12 02:39:25 +03:00
some commands & admin panel
This commit is contained in:
parent
298a7bd6df
commit
1a90fad8ec
2784
client/includes/nativeui/nativeui.js
Normal file
2784
client/includes/nativeui/nativeui.js
Normal file
File diff suppressed because it is too large
Load Diff
1
client/includes/nativeui/nativeui.min.js
vendored
Normal file
1
client/includes/nativeui/nativeui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
141
client/includes/nativeui/types/NativeUi.d.ts
vendored
Normal file
141
client/includes/nativeui/types/NativeUi.d.ts
vendored
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
import BadgeStyle from "./enums/BadgeStyle";
|
||||||
|
import Font from "./enums/Font";
|
||||||
|
import Alignment from './enums/Alignment';
|
||||||
|
import Control from './enums/Control';
|
||||||
|
import HudColor from './enums/HudColor';
|
||||||
|
import ChangeDirection from './enums/ChangeDirection';
|
||||||
|
import UIMenuCheckboxItem from "./items/UIMenuCheckboxItem";
|
||||||
|
import UIMenuItem from "./items/UIMenuItem";
|
||||||
|
import UIMenuListItem from "./items/UIMenuListItem";
|
||||||
|
import UIMenuAutoListItem from "./items/UIMenuAutoListItem";
|
||||||
|
import UIMenuSliderItem from "./items/UIMenuSliderItem";
|
||||||
|
import ItemsCollection from "./modules/ItemsCollection";
|
||||||
|
import ListItem from "./modules/ListItem";
|
||||||
|
import ResRectangle from "./modules/ResRectangle";
|
||||||
|
import ResText from "./modules/ResText";
|
||||||
|
import Sprite from "./modules/Sprite";
|
||||||
|
import Color from "./utils/Color";
|
||||||
|
import LiteEvent from "./utils/LiteEvent";
|
||||||
|
import Point from "./utils/Point";
|
||||||
|
import Size from "./utils/Size";
|
||||||
|
import InstructionalButton from './modules/InstructionalButton';
|
||||||
|
import BigMessage from './modules/BigMessage';
|
||||||
|
import MidsizedMessage from './modules/MidsizedMessage';
|
||||||
|
import UIMenuDynamicListItem from './items/UIMenuDynamicListItem';
|
||||||
|
export default class NativeUI {
|
||||||
|
private _visible;
|
||||||
|
private _counterPretext;
|
||||||
|
private _counterOverride;
|
||||||
|
private _spriteLibrary;
|
||||||
|
private _spriteName;
|
||||||
|
private _offset;
|
||||||
|
private _lastUpDownNavigation;
|
||||||
|
private _lastLeftRightNavigation;
|
||||||
|
private _extraOffset;
|
||||||
|
private _buttonsEnabled;
|
||||||
|
private _justOpened;
|
||||||
|
private _justOpenedFromPool;
|
||||||
|
private _justClosedFromPool;
|
||||||
|
private _poolOpening;
|
||||||
|
private _safezoneOffset;
|
||||||
|
private _activeItem;
|
||||||
|
private _maxItemsOnScreen;
|
||||||
|
private _minItem;
|
||||||
|
private _maxItem;
|
||||||
|
private _mouseEdgeEnabled;
|
||||||
|
private _bannerSprite;
|
||||||
|
private _bannerRectangle;
|
||||||
|
private _recalculateDescriptionNextFrame;
|
||||||
|
private readonly _instructionalButtons;
|
||||||
|
private readonly _instructionalButtonsScaleform;
|
||||||
|
private readonly _defaultTitleScale;
|
||||||
|
private readonly _maxMenuItems;
|
||||||
|
private readonly _mainMenu;
|
||||||
|
private readonly _upAndDownSprite;
|
||||||
|
private readonly _titleResText;
|
||||||
|
private readonly _subtitleResText;
|
||||||
|
private readonly _extraRectangleUp;
|
||||||
|
private readonly _extraRectangleDown;
|
||||||
|
private readonly _descriptionBar;
|
||||||
|
private readonly _descriptionRectangle;
|
||||||
|
private readonly _descriptionText;
|
||||||
|
private readonly _counterText;
|
||||||
|
private readonly _background;
|
||||||
|
readonly Id: string;
|
||||||
|
readonly SelectTextLocalized: string;
|
||||||
|
readonly BackTextLocalized: string;
|
||||||
|
WidthOffset: number;
|
||||||
|
ParentMenu: NativeUI;
|
||||||
|
ParentItem: UIMenuItem;
|
||||||
|
Children: Map<string, NativeUI>;
|
||||||
|
MouseControlsEnabled: boolean;
|
||||||
|
CloseableByUser: boolean;
|
||||||
|
AUDIO_LIBRARY: string;
|
||||||
|
AUDIO_UPDOWN: string;
|
||||||
|
AUDIO_LEFTRIGHT: string;
|
||||||
|
AUDIO_SELECT: string;
|
||||||
|
AUDIO_BACK: string;
|
||||||
|
AUDIO_ERROR: string;
|
||||||
|
MenuItems: (UIMenuItem | UIMenuListItem | UIMenuAutoListItem | UIMenuDynamicListItem | UIMenuSliderItem | UIMenuCheckboxItem)[];
|
||||||
|
readonly IndexChange: LiteEvent;
|
||||||
|
readonly ListChange: LiteEvent;
|
||||||
|
readonly AutoListChange: LiteEvent;
|
||||||
|
readonly DynamicListChange: LiteEvent;
|
||||||
|
readonly SliderChange: LiteEvent;
|
||||||
|
readonly CheckboxChange: LiteEvent;
|
||||||
|
readonly ItemSelect: LiteEvent;
|
||||||
|
readonly MenuOpen: LiteEvent;
|
||||||
|
readonly MenuClose: LiteEvent;
|
||||||
|
readonly MenuChange: LiteEvent;
|
||||||
|
GetSpriteBanner(): Sprite;
|
||||||
|
GetRectangleBanner(): ResRectangle;
|
||||||
|
GetTitle(): ResText;
|
||||||
|
get MaxItemsVisible(): number;
|
||||||
|
set MaxItemsVisible(value: number);
|
||||||
|
get Title(): string;
|
||||||
|
set Title(text: string);
|
||||||
|
get GetSubTitle(): ResText;
|
||||||
|
get SubTitle(): string;
|
||||||
|
set SubTitle(text: string);
|
||||||
|
get Visible(): boolean;
|
||||||
|
set Visible(toggle: boolean);
|
||||||
|
get CurrentSelection(): number;
|
||||||
|
set CurrentSelection(v: number);
|
||||||
|
constructor(title: string, subtitle: string, offset: Point, spriteLibrary?: string, spriteName?: string);
|
||||||
|
DisableInstructionalButtons(disable: boolean): void;
|
||||||
|
AddInstructionalButton(button: InstructionalButton): void;
|
||||||
|
SetSpriteBannerType(spriteBanner: Sprite): void;
|
||||||
|
SetRectangleBannerType(rectangle: ResRectangle): void;
|
||||||
|
AddSpriteBannerType(spriteBanner: Sprite): void;
|
||||||
|
SetNoBannerType(): void;
|
||||||
|
RemoveInstructionalButton(button: InstructionalButton): void;
|
||||||
|
private RecalculateDescriptionPosition;
|
||||||
|
SetMenuWidthOffset(widthOffset: number): void;
|
||||||
|
AddItem(item: UIMenuItem): void;
|
||||||
|
RemoveItem(item: UIMenuItem): void;
|
||||||
|
RefreshIndex(): void;
|
||||||
|
Clear(): void;
|
||||||
|
Open(): void;
|
||||||
|
private CleanUp;
|
||||||
|
Close(closeChildren?: boolean): void;
|
||||||
|
GoLeft(): void;
|
||||||
|
GoRight(): void;
|
||||||
|
SelectItem(): void;
|
||||||
|
HasCurrentSelectionChildren(): boolean;
|
||||||
|
IsMouseInListItemArrows(item: UIMenuItem, topLeft: Point, safezone: any): 0 | 1 | 2;
|
||||||
|
ProcessMouse(): void;
|
||||||
|
ProcessControl(): void;
|
||||||
|
GoUpOverflow(): void;
|
||||||
|
GoUp(): void;
|
||||||
|
GoDownOverflow(): void;
|
||||||
|
GoDown(): void;
|
||||||
|
GoBack(): void;
|
||||||
|
BindMenuToItem(menuToBind: NativeUI, itemToBindTo: UIMenuItem): void;
|
||||||
|
AddSubMenu(subMenu: NativeUI, itemToBindTo: UIMenuItem): void;
|
||||||
|
ReleaseMenuFromItem(releaseFrom: UIMenuItem): boolean;
|
||||||
|
UpdateDescriptionCaption(): void;
|
||||||
|
CalculateDescription(): void;
|
||||||
|
UpdateScaleform(): void;
|
||||||
|
private render;
|
||||||
|
}
|
||||||
|
export { NativeUI as Menu, UIMenuItem, UIMenuListItem, UIMenuAutoListItem, UIMenuDynamicListItem, UIMenuCheckboxItem, UIMenuSliderItem, BadgeStyle, ChangeDirection, Font, Alignment, Control, HudColor, Sprite, ResRectangle, InstructionalButton, Point, Size, Color, ItemsCollection, ListItem, BigMessage, MidsizedMessage };
|
||||||
6
client/includes/nativeui/types/enums/Alignment.d.ts
vendored
Normal file
6
client/includes/nativeui/types/enums/Alignment.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export declare enum Alignment {
|
||||||
|
Left = 0,
|
||||||
|
Centered = 1,
|
||||||
|
Right = 2
|
||||||
|
}
|
||||||
|
export default Alignment;
|
||||||
34
client/includes/nativeui/types/enums/BadgeStyle.d.ts
vendored
Normal file
34
client/includes/nativeui/types/enums/BadgeStyle.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
declare enum BadgeStyle {
|
||||||
|
None = 0,
|
||||||
|
BronzeMedal = 1,
|
||||||
|
GoldMedal = 2,
|
||||||
|
SilverMedal = 3,
|
||||||
|
Alert = 4,
|
||||||
|
Crown = 5,
|
||||||
|
Ammo = 6,
|
||||||
|
Armour = 7,
|
||||||
|
Barber = 8,
|
||||||
|
Clothes = 9,
|
||||||
|
Franklin = 10,
|
||||||
|
Bike = 11,
|
||||||
|
Car = 12,
|
||||||
|
Gun = 13,
|
||||||
|
Heart = 14,
|
||||||
|
Makeup = 15,
|
||||||
|
Mask = 16,
|
||||||
|
Michael = 17,
|
||||||
|
Star = 18,
|
||||||
|
Tattoo = 19,
|
||||||
|
Trevor = 20,
|
||||||
|
Lock = 21,
|
||||||
|
Tick = 22,
|
||||||
|
Sale = 23,
|
||||||
|
ArrowLeft = 24,
|
||||||
|
ArrowRight = 25,
|
||||||
|
Audio1 = 26,
|
||||||
|
Audio2 = 27,
|
||||||
|
Audio3 = 28,
|
||||||
|
AudioInactive = 29,
|
||||||
|
AudioMute = 30
|
||||||
|
}
|
||||||
|
export default BadgeStyle;
|
||||||
5
client/includes/nativeui/types/enums/ChangeDirection.d.ts
vendored
Normal file
5
client/includes/nativeui/types/enums/ChangeDirection.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
declare enum ChangeDirection {
|
||||||
|
Left = 0,
|
||||||
|
Right = 1
|
||||||
|
}
|
||||||
|
export default ChangeDirection;
|
||||||
349
client/includes/nativeui/types/enums/Control.d.ts
vendored
Normal file
349
client/includes/nativeui/types/enums/Control.d.ts
vendored
Normal file
@ -0,0 +1,349 @@
|
|||||||
|
declare enum Control {
|
||||||
|
NextCamera = 0,
|
||||||
|
LookLeftRight = 1,
|
||||||
|
LookUpDown = 2,
|
||||||
|
LookUpOnly = 3,
|
||||||
|
LookDownOnly = 4,
|
||||||
|
LookLeftOnly = 5,
|
||||||
|
LookRightOnly = 6,
|
||||||
|
CinematicSlowMo = 7,
|
||||||
|
FlyUpDown = 8,
|
||||||
|
FlyLeftRight = 9,
|
||||||
|
ScriptedFlyZUp = 10,
|
||||||
|
ScriptedFlyZDown = 11,
|
||||||
|
WeaponWheelUpDown = 12,
|
||||||
|
WeaponWheelLeftRight = 13,
|
||||||
|
WeaponWheelNext = 14,
|
||||||
|
WeaponWheelPrev = 15,
|
||||||
|
SelectNextWeapon = 16,
|
||||||
|
SelectPrevWeapon = 17,
|
||||||
|
SkipCutscene = 18,
|
||||||
|
CharacterWheel = 19,
|
||||||
|
MultiplayerInfo = 20,
|
||||||
|
Sprint = 21,
|
||||||
|
Jump = 22,
|
||||||
|
Enter = 23,
|
||||||
|
Attack = 24,
|
||||||
|
Aim = 25,
|
||||||
|
LookBehind = 26,
|
||||||
|
Phone = 27,
|
||||||
|
SpecialAbility = 28,
|
||||||
|
SpecialAbilitySecondary = 29,
|
||||||
|
MoveLeftRight = 30,
|
||||||
|
MoveUpDown = 31,
|
||||||
|
MoveUpOnly = 32,
|
||||||
|
MoveDownOnly = 33,
|
||||||
|
MoveLeftOnly = 34,
|
||||||
|
MoveRightOnly = 35,
|
||||||
|
Duck = 36,
|
||||||
|
SelectWeapon = 37,
|
||||||
|
Pickup = 38,
|
||||||
|
SniperZoom = 39,
|
||||||
|
SniperZoomInOnly = 40,
|
||||||
|
SniperZoomOutOnly = 41,
|
||||||
|
SniperZoomInSecondary = 42,
|
||||||
|
SniperZoomOutSecondary = 43,
|
||||||
|
Cover = 44,
|
||||||
|
Reload = 45,
|
||||||
|
Talk = 46,
|
||||||
|
Detonate = 47,
|
||||||
|
HUDSpecial = 48,
|
||||||
|
Arrest = 49,
|
||||||
|
AccurateAim = 50,
|
||||||
|
Context = 51,
|
||||||
|
ContextSecondary = 52,
|
||||||
|
WeaponSpecial = 53,
|
||||||
|
WeaponSpecial2 = 54,
|
||||||
|
Dive = 55,
|
||||||
|
DropWeapon = 56,
|
||||||
|
DropAmmo = 57,
|
||||||
|
ThrowGrenade = 58,
|
||||||
|
VehicleMoveLeftRight = 59,
|
||||||
|
VehicleMoveUpDown = 60,
|
||||||
|
VehicleMoveUpOnly = 61,
|
||||||
|
VehicleMoveDownOnly = 62,
|
||||||
|
VehicleMoveLeftOnly = 63,
|
||||||
|
VehicleMoveRightOnly = 64,
|
||||||
|
VehicleSpecial = 65,
|
||||||
|
VehicleGunLeftRight = 66,
|
||||||
|
VehicleGunUpDown = 67,
|
||||||
|
VehicleAim = 68,
|
||||||
|
VehicleAttack = 69,
|
||||||
|
VehicleAttack2 = 70,
|
||||||
|
VehicleAccelerate = 71,
|
||||||
|
VehicleBrake = 72,
|
||||||
|
VehicleDuck = 73,
|
||||||
|
VehicleHeadlight = 74,
|
||||||
|
VehicleExit = 75,
|
||||||
|
VehicleHandbrake = 76,
|
||||||
|
VehicleHotwireLeft = 77,
|
||||||
|
VehicleHotwireRight = 78,
|
||||||
|
VehicleLookBehind = 79,
|
||||||
|
VehicleCinCam = 80,
|
||||||
|
VehicleNextRadio = 81,
|
||||||
|
VehiclePrevRadio = 82,
|
||||||
|
VehicleNextRadioTrack = 83,
|
||||||
|
VehiclePrevRadioTrack = 84,
|
||||||
|
VehicleRadioWheel = 85,
|
||||||
|
VehicleHorn = 86,
|
||||||
|
VehicleFlyThrottleUp = 87,
|
||||||
|
VehicleFlyThrottleDown = 88,
|
||||||
|
VehicleFlyYawLeft = 89,
|
||||||
|
VehicleFlyYawRight = 90,
|
||||||
|
VehiclePassengerAim = 91,
|
||||||
|
VehiclePassengerAttack = 92,
|
||||||
|
VehicleSpecialAbilityFranklin = 93,
|
||||||
|
VehicleStuntUpDown = 94,
|
||||||
|
VehicleCinematicUpDown = 95,
|
||||||
|
VehicleCinematicUpOnly = 96,
|
||||||
|
VehicleCinematicDownOnly = 97,
|
||||||
|
VehicleCinematicLeftRight = 98,
|
||||||
|
VehicleSelectNextWeapon = 99,
|
||||||
|
VehicleSelectPrevWeapon = 100,
|
||||||
|
VehicleRoof = 101,
|
||||||
|
VehicleJump = 102,
|
||||||
|
VehicleGrapplingHook = 103,
|
||||||
|
VehicleShuffle = 104,
|
||||||
|
VehicleDropProjectile = 105,
|
||||||
|
VehicleMouseControlOverride = 106,
|
||||||
|
VehicleFlyRollLeftRight = 107,
|
||||||
|
VehicleFlyRollLeftOnly = 108,
|
||||||
|
VehicleFlyRollRightOnly = 109,
|
||||||
|
VehicleFlyPitchUpDown = 110,
|
||||||
|
VehicleFlyPitchUpOnly = 111,
|
||||||
|
VehicleFlyPitchDownOnly = 112,
|
||||||
|
VehicleFlyUnderCarriage = 113,
|
||||||
|
VehicleFlyAttack = 114,
|
||||||
|
VehicleFlySelectNextWeapon = 115,
|
||||||
|
VehicleFlySelectPrevWeapon = 116,
|
||||||
|
VehicleFlySelectTargetLeft = 117,
|
||||||
|
VehicleFlySelectTargetRight = 118,
|
||||||
|
VehicleFlyVerticalFlightMode = 119,
|
||||||
|
VehicleFlyDuck = 120,
|
||||||
|
VehicleFlyAttackCamera = 121,
|
||||||
|
VehicleFlyMouseControlOverride = 122,
|
||||||
|
VehicleSubTurnLeftRight = 123,
|
||||||
|
VehicleSubTurnLeftOnly = 124,
|
||||||
|
VehicleSubTurnRightOnly = 125,
|
||||||
|
VehicleSubPitchUpDown = 126,
|
||||||
|
VehicleSubPitchUpOnly = 127,
|
||||||
|
VehicleSubPitchDownOnly = 128,
|
||||||
|
VehicleSubThrottleUp = 129,
|
||||||
|
VehicleSubThrottleDown = 130,
|
||||||
|
VehicleSubAscend = 131,
|
||||||
|
VehicleSubDescend = 132,
|
||||||
|
VehicleSubTurnHardLeft = 133,
|
||||||
|
VehicleSubTurnHardRight = 134,
|
||||||
|
VehicleSubMouseControlOverride = 135,
|
||||||
|
VehiclePushbikePedal = 136,
|
||||||
|
VehiclePushbikeSprint = 137,
|
||||||
|
VehiclePushbikeFrontBrake = 138,
|
||||||
|
VehiclePushbikeRearBrake = 139,
|
||||||
|
MeleeAttackLight = 140,
|
||||||
|
MeleeAttackHeavy = 141,
|
||||||
|
MeleeAttackAlternate = 142,
|
||||||
|
MeleeBlock = 143,
|
||||||
|
ParachuteDeploy = 144,
|
||||||
|
ParachuteDetach = 145,
|
||||||
|
ParachuteTurnLeftRight = 146,
|
||||||
|
ParachuteTurnLeftOnly = 147,
|
||||||
|
ParachuteTurnRightOnly = 148,
|
||||||
|
ParachutePitchUpDown = 149,
|
||||||
|
ParachutePitchUpOnly = 150,
|
||||||
|
ParachutePitchDownOnly = 151,
|
||||||
|
ParachuteBrakeLeft = 152,
|
||||||
|
ParachuteBrakeRight = 153,
|
||||||
|
ParachuteSmoke = 154,
|
||||||
|
ParachutePrecisionLanding = 155,
|
||||||
|
Map = 156,
|
||||||
|
SelectWeaponUnarmed = 157,
|
||||||
|
SelectWeaponMelee = 158,
|
||||||
|
SelectWeaponHandgun = 159,
|
||||||
|
SelectWeaponShotgun = 160,
|
||||||
|
SelectWeaponSmg = 161,
|
||||||
|
SelectWeaponAutoRifle = 162,
|
||||||
|
SelectWeaponSniper = 163,
|
||||||
|
SelectWeaponHeavy = 164,
|
||||||
|
SelectWeaponSpecial = 165,
|
||||||
|
SelectCharacterMichael = 166,
|
||||||
|
SelectCharacterFranklin = 167,
|
||||||
|
SelectCharacterTrevor = 168,
|
||||||
|
SelectCharacterMultiplayer = 169,
|
||||||
|
SaveReplayClip = 170,
|
||||||
|
SpecialAbilityPC = 171,
|
||||||
|
PhoneUp = 172,
|
||||||
|
PhoneDown = 173,
|
||||||
|
PhoneLeft = 174,
|
||||||
|
PhoneRight = 175,
|
||||||
|
PhoneSelect = 176,
|
||||||
|
PhoneCancel = 177,
|
||||||
|
PhoneOption = 178,
|
||||||
|
PhoneExtraOption = 179,
|
||||||
|
PhoneScrollForward = 180,
|
||||||
|
PhoneScrollBackward = 181,
|
||||||
|
PhoneCameraFocusLock = 182,
|
||||||
|
PhoneCameraGrid = 183,
|
||||||
|
PhoneCameraSelfie = 184,
|
||||||
|
PhoneCameraDOF = 185,
|
||||||
|
PhoneCameraExpression = 186,
|
||||||
|
FrontendDown = 187,
|
||||||
|
FrontendUp = 188,
|
||||||
|
FrontendLeft = 189,
|
||||||
|
FrontendRight = 190,
|
||||||
|
FrontendRdown = 191,
|
||||||
|
FrontendRup = 192,
|
||||||
|
FrontendRleft = 193,
|
||||||
|
FrontendRright = 194,
|
||||||
|
FrontendAxisX = 195,
|
||||||
|
FrontendAxisY = 196,
|
||||||
|
FrontendRightAxisX = 197,
|
||||||
|
FrontendRightAxisY = 198,
|
||||||
|
FrontendPause = 199,
|
||||||
|
FrontendPauseAlternate = 200,
|
||||||
|
FrontendAccept = 201,
|
||||||
|
FrontendCancel = 202,
|
||||||
|
FrontendX = 203,
|
||||||
|
FrontendY = 204,
|
||||||
|
FrontendLb = 205,
|
||||||
|
FrontendRb = 206,
|
||||||
|
FrontendLt = 207,
|
||||||
|
FrontendRt = 208,
|
||||||
|
FrontendLs = 209,
|
||||||
|
FrontendRs = 210,
|
||||||
|
FrontendLeaderboard = 211,
|
||||||
|
FrontendSocialClub = 212,
|
||||||
|
FrontendSocialClubSecondary = 213,
|
||||||
|
FrontendDelete = 214,
|
||||||
|
FrontendEndscreenAccept = 215,
|
||||||
|
FrontendEndscreenExpand = 216,
|
||||||
|
FrontendSelect = 217,
|
||||||
|
ScriptLeftAxisX = 218,
|
||||||
|
ScriptLeftAxisY = 219,
|
||||||
|
ScriptRightAxisX = 220,
|
||||||
|
ScriptRightAxisY = 221,
|
||||||
|
ScriptRUp = 222,
|
||||||
|
ScriptRDown = 223,
|
||||||
|
ScriptRLeft = 224,
|
||||||
|
ScriptRRight = 225,
|
||||||
|
ScriptLB = 226,
|
||||||
|
ScriptRB = 227,
|
||||||
|
ScriptLT = 228,
|
||||||
|
ScriptRT = 229,
|
||||||
|
ScriptLS = 230,
|
||||||
|
ScriptRS = 231,
|
||||||
|
ScriptPadUp = 232,
|
||||||
|
ScriptPadDown = 233,
|
||||||
|
ScriptPadLeft = 234,
|
||||||
|
ScriptPadRight = 235,
|
||||||
|
ScriptSelect = 236,
|
||||||
|
CursorAccept = 237,
|
||||||
|
CursorCancel = 238,
|
||||||
|
CursorX = 239,
|
||||||
|
CursorY = 240,
|
||||||
|
CursorScrollUp = 241,
|
||||||
|
CursorScrollDown = 242,
|
||||||
|
EnterCheatCode = 243,
|
||||||
|
InteractionMenu = 244,
|
||||||
|
MpTextChatAll = 245,
|
||||||
|
MpTextChatTeam = 246,
|
||||||
|
MpTextChatFriends = 247,
|
||||||
|
MpTextChatCrew = 248,
|
||||||
|
PushToTalk = 249,
|
||||||
|
CreatorLS = 250,
|
||||||
|
CreatorRS = 251,
|
||||||
|
CreatorLT = 252,
|
||||||
|
CreatorRT = 253,
|
||||||
|
CreatorMenuToggle = 254,
|
||||||
|
CreatorAccept = 255,
|
||||||
|
CreatorDelete = 256,
|
||||||
|
Attack2 = 257,
|
||||||
|
RappelJump = 258,
|
||||||
|
RappelLongJump = 259,
|
||||||
|
RappelSmashWindow = 260,
|
||||||
|
PrevWeapon = 261,
|
||||||
|
NextWeapon = 262,
|
||||||
|
MeleeAttack1 = 263,
|
||||||
|
MeleeAttack2 = 264,
|
||||||
|
Whistle = 265,
|
||||||
|
MoveLeft = 266,
|
||||||
|
MoveRight = 267,
|
||||||
|
MoveUp = 268,
|
||||||
|
MoveDown = 269,
|
||||||
|
LookLeft = 270,
|
||||||
|
LookRight = 271,
|
||||||
|
LookUp = 272,
|
||||||
|
LookDown = 273,
|
||||||
|
SniperZoomIn = 274,
|
||||||
|
SniperZoomOut = 275,
|
||||||
|
SniperZoomInAlternate = 276,
|
||||||
|
SniperZoomOutAlternate = 277,
|
||||||
|
VehicleMoveLeft = 278,
|
||||||
|
VehicleMoveRight = 279,
|
||||||
|
VehicleMoveUp = 280,
|
||||||
|
VehicleMoveDown = 281,
|
||||||
|
VehicleGunLeft = 282,
|
||||||
|
VehicleGunRight = 283,
|
||||||
|
VehicleGunUp = 284,
|
||||||
|
VehicleGunDown = 285,
|
||||||
|
VehicleLookLeft = 286,
|
||||||
|
VehicleLookRight = 287,
|
||||||
|
ReplayStartStopRecording = 288,
|
||||||
|
ReplayStartStopRecordingSecondary = 289,
|
||||||
|
ScaledLookLeftRight = 290,
|
||||||
|
ScaledLookUpDown = 291,
|
||||||
|
ScaledLookUpOnly = 292,
|
||||||
|
ScaledLookDownOnly = 293,
|
||||||
|
ScaledLookLeftOnly = 294,
|
||||||
|
ScaledLookRightOnly = 295,
|
||||||
|
ReplayMarkerDelete = 296,
|
||||||
|
ReplayClipDelete = 297,
|
||||||
|
ReplayPause = 298,
|
||||||
|
ReplayRewind = 299,
|
||||||
|
ReplayFfwd = 300,
|
||||||
|
ReplayNewmarker = 301,
|
||||||
|
ReplayRecord = 302,
|
||||||
|
ReplayScreenshot = 303,
|
||||||
|
ReplayHidehud = 304,
|
||||||
|
ReplayStartpoint = 305,
|
||||||
|
ReplayEndpoint = 306,
|
||||||
|
ReplayAdvance = 307,
|
||||||
|
ReplayBack = 308,
|
||||||
|
ReplayTools = 309,
|
||||||
|
ReplayRestart = 310,
|
||||||
|
ReplayShowhotkey = 311,
|
||||||
|
ReplayCycleMarkerLeft = 312,
|
||||||
|
ReplayCycleMarkerRight = 313,
|
||||||
|
ReplayFOVIncrease = 314,
|
||||||
|
ReplayFOVDecrease = 315,
|
||||||
|
ReplayCameraUp = 316,
|
||||||
|
ReplayCameraDown = 317,
|
||||||
|
ReplaySave = 318,
|
||||||
|
ReplayToggletime = 319,
|
||||||
|
ReplayToggletips = 320,
|
||||||
|
ReplayPreview = 321,
|
||||||
|
ReplayToggleTimeline = 322,
|
||||||
|
ReplayTimelinePickupClip = 323,
|
||||||
|
ReplayTimelineDuplicateClip = 324,
|
||||||
|
ReplayTimelinePlaceClip = 325,
|
||||||
|
ReplayCtrl = 326,
|
||||||
|
ReplayTimelineSave = 327,
|
||||||
|
ReplayPreviewAudio = 328,
|
||||||
|
VehicleDriveLook = 329,
|
||||||
|
VehicleDriveLook2 = 330,
|
||||||
|
VehicleFlyAttack2 = 331,
|
||||||
|
RadioWheelUpDown = 332,
|
||||||
|
RadioWheelLeftRight = 333,
|
||||||
|
VehicleSlowMoUpDown = 334,
|
||||||
|
VehicleSlowMoUpOnly = 335,
|
||||||
|
VehicleSlowMoDownOnly = 336,
|
||||||
|
MapPointOfInterest = 337,
|
||||||
|
ReplaySnapmaticPhoto = 338,
|
||||||
|
VehicleCarJump = 339,
|
||||||
|
VehicleRocketBoost = 340,
|
||||||
|
VehicleParachute = 341,
|
||||||
|
VehicleBikeWings = 342,
|
||||||
|
VehicleFlyBombBay = 343,
|
||||||
|
VehicleFlyCounter = 344,
|
||||||
|
VehicleFlyTransform = 345
|
||||||
|
}
|
||||||
|
export default Control;
|
||||||
8
client/includes/nativeui/types/enums/Font.d.ts
vendored
Normal file
8
client/includes/nativeui/types/enums/Font.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
declare enum Font {
|
||||||
|
ChaletLondon = 0,
|
||||||
|
HouseScript = 1,
|
||||||
|
Monospace = 2,
|
||||||
|
CharletComprimeColonge = 4,
|
||||||
|
Pricedown = 7
|
||||||
|
}
|
||||||
|
export default Font;
|
||||||
183
client/includes/nativeui/types/enums/HudColor.d.ts
vendored
Normal file
183
client/includes/nativeui/types/enums/HudColor.d.ts
vendored
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
declare enum HudColor {
|
||||||
|
HUD_COLOUR_PURE_WHITE = 0,
|
||||||
|
HUD_COLOUR_WHITE = 1,
|
||||||
|
HUD_COLOUR_BLACK = 2,
|
||||||
|
HUD_COLOUR_GREY = 3,
|
||||||
|
HUD_COLOUR_GREYLIGHT = 4,
|
||||||
|
HUD_COLOUR_GREYDARK = 5,
|
||||||
|
HUD_COLOUR_RED = 6,
|
||||||
|
HUD_COLOUR_REDLIGHT = 7,
|
||||||
|
HUD_COLOUR_REDDARK = 8,
|
||||||
|
HUD_COLOUR_BLUE = 9,
|
||||||
|
HUD_COLOUR_BLUELIGHT = 10,
|
||||||
|
HUD_COLOUR_BLUEDARK = 11,
|
||||||
|
HUD_COLOUR_YELLOW = 12,
|
||||||
|
HUD_COLOUR_YELLOWLIGHT = 13,
|
||||||
|
HUD_COLOUR_YELLOWDARK = 14,
|
||||||
|
HUD_COLOUR_ORANGE = 15,
|
||||||
|
HUD_COLOUR_ORANGELIGHT = 16,
|
||||||
|
HUD_COLOUR_ORANGEDARK = 17,
|
||||||
|
HUD_COLOUR_GREEN = 18,
|
||||||
|
HUD_COLOUR_GREENLIGHT = 19,
|
||||||
|
HUD_COLOUR_GREENDARK = 20,
|
||||||
|
HUD_COLOUR_PURPLE = 21,
|
||||||
|
HUD_COLOUR_PURPLELIGHT = 22,
|
||||||
|
HUD_COLOUR_PURPLEDARK = 23,
|
||||||
|
HUD_COLOUR_PINK = 24,
|
||||||
|
HUD_COLOUR_RADAR_HEALTH = 25,
|
||||||
|
HUD_COLOUR_RADAR_ARMOUR = 26,
|
||||||
|
HUD_COLOUR_RADAR_DAMAGE = 27,
|
||||||
|
HUD_COLOUR_NET_PLAYER1 = 28,
|
||||||
|
HUD_COLOUR_NET_PLAYER2 = 29,
|
||||||
|
HUD_COLOUR_NET_PLAYER3 = 30,
|
||||||
|
HUD_COLOUR_NET_PLAYER4 = 31,
|
||||||
|
HUD_COLOUR_NET_PLAYER5 = 32,
|
||||||
|
HUD_COLOUR_NET_PLAYER6 = 33,
|
||||||
|
HUD_COLOUR_NET_PLAYER7 = 34,
|
||||||
|
HUD_COLOUR_NET_PLAYER8 = 35,
|
||||||
|
HUD_COLOUR_NET_PLAYER9 = 36,
|
||||||
|
HUD_COLOUR_NET_PLAYER10 = 37,
|
||||||
|
HUD_COLOUR_NET_PLAYER11 = 38,
|
||||||
|
HUD_COLOUR_NET_PLAYER12 = 39,
|
||||||
|
HUD_COLOUR_NET_PLAYER13 = 40,
|
||||||
|
HUD_COLOUR_NET_PLAYER14 = 41,
|
||||||
|
HUD_COLOUR_NET_PLAYER15 = 42,
|
||||||
|
HUD_COLOUR_NET_PLAYER16 = 43,
|
||||||
|
HUD_COLOUR_NET_PLAYER17 = 44,
|
||||||
|
HUD_COLOUR_NET_PLAYER18 = 45,
|
||||||
|
HUD_COLOUR_NET_PLAYER19 = 46,
|
||||||
|
HUD_COLOUR_NET_PLAYER20 = 47,
|
||||||
|
HUD_COLOUR_NET_PLAYER21 = 48,
|
||||||
|
HUD_COLOUR_NET_PLAYER22 = 49,
|
||||||
|
HUD_COLOUR_NET_PLAYER23 = 50,
|
||||||
|
HUD_COLOUR_NET_PLAYER24 = 51,
|
||||||
|
HUD_COLOUR_NET_PLAYER25 = 52,
|
||||||
|
HUD_COLOUR_NET_PLAYER26 = 53,
|
||||||
|
HUD_COLOUR_NET_PLAYER27 = 54,
|
||||||
|
HUD_COLOUR_NET_PLAYER28 = 55,
|
||||||
|
HUD_COLOUR_NET_PLAYER29 = 56,
|
||||||
|
HUD_COLOUR_NET_PLAYER30 = 57,
|
||||||
|
HUD_COLOUR_NET_PLAYER31 = 58,
|
||||||
|
HUD_COLOUR_NET_PLAYER32 = 59,
|
||||||
|
HUD_COLOUR_SIMPLEBLIP_DEFAULT = 60,
|
||||||
|
HUD_COLOUR_MENU_BLUE = 61,
|
||||||
|
HUD_COLOUR_MENU_GREY_LIGHT = 62,
|
||||||
|
HUD_COLOUR_MENU_BLUE_EXTRA_DARK = 63,
|
||||||
|
HUD_COLOUR_MENU_YELLOW = 64,
|
||||||
|
HUD_COLOUR_MENU_YELLOW_DARK = 65,
|
||||||
|
HUD_COLOUR_MENU_GREEN = 66,
|
||||||
|
HUD_COLOUR_MENU_GREY = 67,
|
||||||
|
HUD_COLOUR_MENU_GREY_DARK = 68,
|
||||||
|
HUD_COLOUR_MENU_HIGHLIGHT = 69,
|
||||||
|
HUD_COLOUR_MENU_STANDARD = 70,
|
||||||
|
HUD_COLOUR_MENU_DIMMED = 71,
|
||||||
|
HUD_COLOUR_MENU_EXTRA_DIMMED = 72,
|
||||||
|
HUD_COLOUR_BRIEF_TITLE = 73,
|
||||||
|
HUD_COLOUR_MID_GREY_MP = 74,
|
||||||
|
HUD_COLOUR_NET_PLAYER1_DARK = 75,
|
||||||
|
HUD_COLOUR_NET_PLAYER2_DARK = 76,
|
||||||
|
HUD_COLOUR_NET_PLAYER3_DARK = 77,
|
||||||
|
HUD_COLOUR_NET_PLAYER4_DARK = 78,
|
||||||
|
HUD_COLOUR_NET_PLAYER5_DARK = 79,
|
||||||
|
HUD_COLOUR_NET_PLAYER6_DARK = 80,
|
||||||
|
HUD_COLOUR_NET_PLAYER7_DARK = 81,
|
||||||
|
HUD_COLOUR_NET_PLAYER8_DARK = 82,
|
||||||
|
HUD_COLOUR_NET_PLAYER9_DARK = 83,
|
||||||
|
HUD_COLOUR_NET_PLAYER10_DARK = 84,
|
||||||
|
HUD_COLOUR_NET_PLAYER11_DARK = 85,
|
||||||
|
HUD_COLOUR_NET_PLAYER12_DARK = 86,
|
||||||
|
HUD_COLOUR_NET_PLAYER13_DARK = 87,
|
||||||
|
HUD_COLOUR_NET_PLAYER14_DARK = 88,
|
||||||
|
HUD_COLOUR_NET_PLAYER15_DARK = 89,
|
||||||
|
HUD_COLOUR_NET_PLAYER16_DARK = 90,
|
||||||
|
HUD_COLOUR_NET_PLAYER17_DARK = 91,
|
||||||
|
HUD_COLOUR_NET_PLAYER18_DARK = 92,
|
||||||
|
HUD_COLOUR_NET_PLAYER19_DARK = 93,
|
||||||
|
HUD_COLOUR_NET_PLAYER20_DARK = 94,
|
||||||
|
HUD_COLOUR_NET_PLAYER21_DARK = 95,
|
||||||
|
HUD_COLOUR_NET_PLAYER22_DARK = 96,
|
||||||
|
HUD_COLOUR_NET_PLAYER23_DARK = 97,
|
||||||
|
HUD_COLOUR_NET_PLAYER24_DARK = 98,
|
||||||
|
HUD_COLOUR_NET_PLAYER25_DARK = 99,
|
||||||
|
HUD_COLOUR_NET_PLAYER26_DARK = 100,
|
||||||
|
HUD_COLOUR_NET_PLAYER27_DARK = 101,
|
||||||
|
HUD_COLOUR_NET_PLAYER28_DARK = 102,
|
||||||
|
HUD_COLOUR_NET_PLAYER29_DARK = 103,
|
||||||
|
HUD_COLOUR_NET_PLAYER30_DARK = 104,
|
||||||
|
HUD_COLOUR_NET_PLAYER31_DARK = 105,
|
||||||
|
HUD_COLOUR_NET_PLAYER32_DARK = 106,
|
||||||
|
HUD_COLOUR_BRONZE = 107,
|
||||||
|
HUD_COLOUR_SILVER = 108,
|
||||||
|
HUD_COLOUR_GOLD = 109,
|
||||||
|
HUD_COLOUR_PLATINUM = 110,
|
||||||
|
HUD_COLOUR_GANG1 = 111,
|
||||||
|
HUD_COLOUR_GANG2 = 112,
|
||||||
|
HUD_COLOUR_GANG3 = 113,
|
||||||
|
HUD_COLOUR_GANG4 = 114,
|
||||||
|
HUD_COLOUR_SAME_CREW = 115,
|
||||||
|
HUD_COLOUR_FREEMODE = 116,
|
||||||
|
HUD_COLOUR_PAUSE_BG = 117,
|
||||||
|
HUD_COLOUR_FRIENDLY = 118,
|
||||||
|
HUD_COLOUR_ENEMY = 119,
|
||||||
|
HUD_COLOUR_LOCATION = 120,
|
||||||
|
HUD_COLOUR_PICKUP = 121,
|
||||||
|
HUD_COLOUR_PAUSE_SINGLEPLAYER = 122,
|
||||||
|
HUD_COLOUR_FREEMODE_DARK = 123,
|
||||||
|
HUD_COLOUR_INACTIVE_MISSION = 124,
|
||||||
|
HUD_COLOUR_DAMAGE = 125,
|
||||||
|
HUD_COLOUR_PINKLIGHT = 126,
|
||||||
|
HUD_COLOUR_PM_MITEM_HIGHLIGHT = 127,
|
||||||
|
HUD_COLOUR_SCRIPT_VARIABLE = 128,
|
||||||
|
HUD_COLOUR_YOGA = 129,
|
||||||
|
HUD_COLOUR_TENNIS = 130,
|
||||||
|
HUD_COLOUR_GOLF = 131,
|
||||||
|
HUD_COLOUR_SHOOTING_RANGE = 132,
|
||||||
|
HUD_COLOUR_FLIGHT_SCHOOL = 133,
|
||||||
|
HUD_COLOUR_NORTH_BLUE = 134,
|
||||||
|
HUD_COLOUR_SOCIAL_CLUB = 135,
|
||||||
|
HUD_COLOUR_PLATFORM_BLUE = 136,
|
||||||
|
HUD_COLOUR_PLATFORM_GREEN = 137,
|
||||||
|
HUD_COLOUR_PLATFORM_GREY = 138,
|
||||||
|
HUD_COLOUR_FACEBOOK_BLUE = 139,
|
||||||
|
HUD_COLOUR_INGAME_BG = 140,
|
||||||
|
HUD_COLOUR_DARTS = 141,
|
||||||
|
HUD_COLOUR_WAYPOINT = 142,
|
||||||
|
HUD_COLOUR_MICHAEL = 143,
|
||||||
|
HUD_COLOUR_FRANKLIN = 144,
|
||||||
|
HUD_COLOUR_TREVOR = 145,
|
||||||
|
HUD_COLOUR_GOLF_P1 = 146,
|
||||||
|
HUD_COLOUR_GOLF_P2 = 147,
|
||||||
|
HUD_COLOUR_GOLF_P3 = 148,
|
||||||
|
HUD_COLOUR_GOLF_P4 = 149,
|
||||||
|
HUD_COLOUR_WAYPOINTLIGHT = 150,
|
||||||
|
HUD_COLOUR_WAYPOINTDARK = 151,
|
||||||
|
HUD_COLOUR_PANEL_LIGHT = 152,
|
||||||
|
HUD_COLOUR_MICHAEL_DARK = 153,
|
||||||
|
HUD_COLOUR_FRANKLIN_DARK = 154,
|
||||||
|
HUD_COLOUR_TREVOR_DARK = 155,
|
||||||
|
HUD_COLOUR_OBJECTIVE_ROUTE = 156,
|
||||||
|
HUD_COLOUR_PAUSEMAP_TINT = 157,
|
||||||
|
HUD_COLOUR_PAUSE_DESELECT = 158,
|
||||||
|
HUD_COLOUR_PM_WEAPONS_PURCHASABLE = 159,
|
||||||
|
HUD_COLOUR_PM_WEAPONS_LOCKED = 160,
|
||||||
|
HUD_COLOUR_END_SCREEN_BG = 161,
|
||||||
|
HUD_COLOUR_CHOP = 162,
|
||||||
|
HUD_COLOUR_PAUSEMAP_TINT_HALF = 163,
|
||||||
|
HUD_COLOUR_NORTH_BLUE_OFFICIAL = 164,
|
||||||
|
HUD_COLOUR_SCRIPT_VARIABLE_2 = 165,
|
||||||
|
HUD_COLOUR_H = 166,
|
||||||
|
HUD_COLOUR_HDARK = 167,
|
||||||
|
HUD_COLOUR_T = 168,
|
||||||
|
HUD_COLOUR_TDARK = 169,
|
||||||
|
HUD_COLOUR_HSHARD = 170,
|
||||||
|
HUD_COLOUR_CONTROLLER_MICHAEL = 171,
|
||||||
|
HUD_COLOUR_CONTROLLER_FRANKLIN = 172,
|
||||||
|
HUD_COLOUR_CONTROLLER_TREVOR = 173,
|
||||||
|
HUD_COLOUR_CONTROLLER_CHOP = 174,
|
||||||
|
HUD_COLOUR_VIDEO_EDITOR_VIDEO = 175,
|
||||||
|
HUD_COLOUR_VIDEO_EDITOR_AUDIO = 176,
|
||||||
|
HUD_COLOUR_VIDEO_EDITOR_TEXT = 177,
|
||||||
|
HUD_COLOUR_HB_BLUE = 178,
|
||||||
|
HUD_COLOUR_HB_YELLOW = 179
|
||||||
|
}
|
||||||
|
export default HudColor;
|
||||||
36
client/includes/nativeui/types/items/UIMenuAutoListItem.d.ts
vendored
Normal file
36
client/includes/nativeui/types/items/UIMenuAutoListItem.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import BadgeStyle from "../enums/BadgeStyle";
|
||||||
|
import ResText from "../modules/ResText";
|
||||||
|
import Sprite from "../modules/Sprite";
|
||||||
|
import UIMenuItem from "./UIMenuItem";
|
||||||
|
export default class UIMenuAutoListItem extends UIMenuItem {
|
||||||
|
protected _itemText: ResText;
|
||||||
|
protected _arrowLeft: Sprite;
|
||||||
|
protected _arrowRight: Sprite;
|
||||||
|
private _currentOffset;
|
||||||
|
private _leftMoveThreshold;
|
||||||
|
private _rightMoveThreshold;
|
||||||
|
private _lowerThreshold;
|
||||||
|
private _upperThreshold;
|
||||||
|
private _preCaptionText;
|
||||||
|
private _postCaptionText;
|
||||||
|
private _selectedValue;
|
||||||
|
get PreCaptionText(): string;
|
||||||
|
set PreCaptionText(text: string);
|
||||||
|
get PostCaptionText(): string;
|
||||||
|
set PostCaptionText(text: string);
|
||||||
|
get LeftMoveThreshold(): number;
|
||||||
|
set LeftMoveThreshold(value: number);
|
||||||
|
get RightMoveThreshold(): number;
|
||||||
|
set RightMoveThreshold(value: number);
|
||||||
|
get LowerThreshold(): number;
|
||||||
|
set LowerThreshold(value: number);
|
||||||
|
get UpperThreshold(): number;
|
||||||
|
set UpperThreshold(value: number);
|
||||||
|
get SelectedValue(): number;
|
||||||
|
set SelectedValue(value: number);
|
||||||
|
constructor(text: string, description?: string, lowerThreshold?: number, upperThreshold?: number, startValue?: number, data?: any);
|
||||||
|
SetVerticalPosition(y: number): void;
|
||||||
|
SetRightLabel(text: string): this;
|
||||||
|
SetRightBadge(badge: BadgeStyle): this;
|
||||||
|
Draw(): void;
|
||||||
|
}
|
||||||
11
client/includes/nativeui/types/items/UIMenuCheckboxItem.d.ts
vendored
Normal file
11
client/includes/nativeui/types/items/UIMenuCheckboxItem.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import BadgeStyle from "../enums/BadgeStyle";
|
||||||
|
import UIMenuItem from "./UIMenuItem";
|
||||||
|
export default class UIMenuCheckboxItem extends UIMenuItem {
|
||||||
|
private readonly _checkedSprite;
|
||||||
|
Checked: boolean;
|
||||||
|
constructor(text: string, check?: boolean, description?: string);
|
||||||
|
SetVerticalPosition(y: number): void;
|
||||||
|
Draw(): void;
|
||||||
|
SetRightBadge(badge: BadgeStyle): this;
|
||||||
|
SetRightLabel(text: string): this;
|
||||||
|
}
|
||||||
34
client/includes/nativeui/types/items/UIMenuDynamicListItem.d.ts
vendored
Normal file
34
client/includes/nativeui/types/items/UIMenuDynamicListItem.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import BadgeStyle from "../enums/BadgeStyle";
|
||||||
|
import ChangeDirection from "../enums/ChangeDirection";
|
||||||
|
import ResText from "../modules/ResText";
|
||||||
|
import Sprite from "../modules/Sprite";
|
||||||
|
import UIMenuItem from "./UIMenuItem";
|
||||||
|
interface SelectionChangeHandler {
|
||||||
|
(item: UIMenuDynamicListItem, selectedValue: string, changeDirection: ChangeDirection): string;
|
||||||
|
}
|
||||||
|
export default class UIMenuDynamicListItem extends UIMenuItem {
|
||||||
|
protected _itemText: ResText;
|
||||||
|
protected _arrowLeft: Sprite;
|
||||||
|
protected _arrowRight: Sprite;
|
||||||
|
private _currentOffset;
|
||||||
|
private _precaptionText;
|
||||||
|
private _selectedValue;
|
||||||
|
private readonly _selectedStartValueHandler;
|
||||||
|
readonly SelectionChangeHandler: SelectionChangeHandler;
|
||||||
|
SelectionChangeHandlerPromise(item: UIMenuDynamicListItem, selectedValue: string, changeDirection: ChangeDirection): Promise<unknown>;
|
||||||
|
get PreCaptionText(): string;
|
||||||
|
set PreCaptionText(text: string);
|
||||||
|
get SelectedValue(): string;
|
||||||
|
set SelectedValue(value: string);
|
||||||
|
constructor(text: string, selectionChangeHandler: {
|
||||||
|
(item: UIMenuDynamicListItem, selectedValue: string, changeDirection: ChangeDirection): string;
|
||||||
|
}, description?: string, selectedStartValueHandler?: {
|
||||||
|
(): string;
|
||||||
|
}, data?: any);
|
||||||
|
SetVerticalPosition(y: number): void;
|
||||||
|
SetRightLabel(text: string): this;
|
||||||
|
SetRightBadge(badge: BadgeStyle): this;
|
||||||
|
Draw(): void;
|
||||||
|
private isVariableFunction;
|
||||||
|
}
|
||||||
|
export {};
|
||||||
51
client/includes/nativeui/types/items/UIMenuItem.d.ts
vendored
Normal file
51
client/includes/nativeui/types/items/UIMenuItem.d.ts
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import BadgeStyle from "../enums/BadgeStyle";
|
||||||
|
import NativeUI from "../NativeUi";
|
||||||
|
import ResRectangle from "../modules/ResRectangle";
|
||||||
|
import ResText from "../modules/ResText";
|
||||||
|
import Sprite from "../modules/Sprite";
|
||||||
|
import Color from "../utils/Color";
|
||||||
|
import Point from "../utils/Point";
|
||||||
|
export default class UIMenuItem {
|
||||||
|
readonly Id: string;
|
||||||
|
static readonly DefaultBackColor: Color;
|
||||||
|
static readonly DefaultHighlightedBackColor: Color;
|
||||||
|
static readonly DefaultForeColor: Color;
|
||||||
|
static readonly DefaultHighlightedForeColor: Color;
|
||||||
|
private _event;
|
||||||
|
protected _rectangle: ResRectangle;
|
||||||
|
protected _text: ResText;
|
||||||
|
protected _description: string;
|
||||||
|
protected _selectedSprite: Sprite;
|
||||||
|
protected _badgeLeft: Sprite;
|
||||||
|
protected _badgeRight: Sprite;
|
||||||
|
protected _labelText: ResText;
|
||||||
|
BackColor: Color;
|
||||||
|
HighlightedBackColor: Color;
|
||||||
|
ForeColor: Color;
|
||||||
|
HighlightedForeColor: Color;
|
||||||
|
Enabled: boolean;
|
||||||
|
Selected: boolean;
|
||||||
|
Hovered: boolean;
|
||||||
|
Data: any;
|
||||||
|
Offset: Point;
|
||||||
|
Parent: NativeUI;
|
||||||
|
get Text(): string;
|
||||||
|
set Text(text: string);
|
||||||
|
get Description(): string;
|
||||||
|
set Description(text: string);
|
||||||
|
RightLabel: string;
|
||||||
|
LeftBadge: BadgeStyle;
|
||||||
|
RightBadge: BadgeStyle;
|
||||||
|
constructor(text: string, description?: string, data?: any);
|
||||||
|
SetVerticalPosition(y: number): void;
|
||||||
|
addEvent(event: string, ...args: any[]): void;
|
||||||
|
fireEvent(): void;
|
||||||
|
Draw(): void;
|
||||||
|
SetLeftBadge(badge: BadgeStyle): void;
|
||||||
|
SetRightBadge(badge: BadgeStyle): void;
|
||||||
|
SetRightLabel(text: string): void;
|
||||||
|
BadgeToSpriteLib(badge: BadgeStyle): "commonmenu" | "mpshopsale" | "mpleaderboard";
|
||||||
|
BadgeToSpriteName(badge: BadgeStyle, selected: boolean): "" | "mp_medal_bronze" | "mp_medal_gold" | "medal_silver" | "mp_alerttriangle" | "mp_hostcrown" | "shop_ammo_icon_b" | "shop_ammo_icon_a" | "shop_armour_icon_b" | "shop_armour_icon_a" | "shop_barber_icon_b" | "shop_barber_icon_a" | "shop_clothing_icon_b" | "shop_clothing_icon_a" | "shop_franklin_icon_b" | "shop_franklin_icon_a" | "shop_garage_bike_icon_b" | "shop_garage_bike_icon_a" | "shop_garage_icon_b" | "shop_garage_icon_a" | "shop_gunclub_icon_b" | "shop_gunclub_icon_a" | "shop_health_icon_b" | "shop_health_icon_a" | "shop_lock" | "shop_makeup_icon_b" | "shop_makeup_icon_a" | "shop_mask_icon_b" | "shop_mask_icon_a" | "shop_michael_icon_b" | "shop_michael_icon_a" | "shop_new_star" | "shop_tattoos_icon_b" | "shop_tattoos_icon_a" | "shop_tick_icon" | "shop_trevor_icon_b" | "shop_trevor_icon_a" | "saleicon" | "arrowleft" | "arrowright" | "leaderboard_audio_1" | "leaderboard_audio_2" | "leaderboard_audio_3" | "leaderboard_audio_inactive" | "leaderboard_audio_mute";
|
||||||
|
IsBagdeWhiteSprite(badge: BadgeStyle): boolean;
|
||||||
|
BadgeToColor(badge: BadgeStyle, selected: boolean): Color;
|
||||||
|
}
|
||||||
30
client/includes/nativeui/types/items/UIMenuListItem.d.ts
vendored
Normal file
30
client/includes/nativeui/types/items/UIMenuListItem.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import BadgeStyle from "../enums/BadgeStyle";
|
||||||
|
import ItemsCollection from "../modules/ItemsCollection";
|
||||||
|
import ListItem from "../modules/ListItem";
|
||||||
|
import ResText from "../modules/ResText";
|
||||||
|
import Sprite from "../modules/Sprite";
|
||||||
|
import UIMenuItem from "./UIMenuItem";
|
||||||
|
export default class UIMenuListItem extends UIMenuItem {
|
||||||
|
ScrollingEnabled: boolean;
|
||||||
|
HoldTimeBeforeScroll: number;
|
||||||
|
protected _itemText: ResText;
|
||||||
|
protected _arrowLeft: Sprite;
|
||||||
|
protected _arrowRight: Sprite;
|
||||||
|
private _currentOffset;
|
||||||
|
private _itemsCollection;
|
||||||
|
get Collection(): ListItem[];
|
||||||
|
set Collection(v: ListItem[]);
|
||||||
|
set SelectedItem(v: ListItem);
|
||||||
|
get SelectedItem(): ListItem;
|
||||||
|
get SelectedValue(): any;
|
||||||
|
protected _index: number;
|
||||||
|
get Index(): number;
|
||||||
|
set Index(value: number);
|
||||||
|
constructor(text: string, description?: string, collection?: ItemsCollection, startIndex?: number, data?: any);
|
||||||
|
setCollection(collection: ItemsCollection): void;
|
||||||
|
setCollectionItem(index: number, item: ListItem | string, resetSelection?: boolean): void;
|
||||||
|
SetVerticalPosition(y: number): void;
|
||||||
|
SetRightLabel(text: string): this;
|
||||||
|
SetRightBadge(badge: BadgeStyle): this;
|
||||||
|
Draw(): void;
|
||||||
|
}
|
||||||
19
client/includes/nativeui/types/items/UIMenuSliderItem.d.ts
vendored
Normal file
19
client/includes/nativeui/types/items/UIMenuSliderItem.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import BadgeStyle from "../enums/BadgeStyle";
|
||||||
|
import UIMenuItem from "./UIMenuItem";
|
||||||
|
export default class UIMenuSliderItem extends UIMenuItem {
|
||||||
|
private _arrowLeft;
|
||||||
|
private _arrowRight;
|
||||||
|
private _rectangleBackground;
|
||||||
|
private _rectangleSlider;
|
||||||
|
private _rectangleDivider;
|
||||||
|
private _items;
|
||||||
|
private _index;
|
||||||
|
get Index(): number;
|
||||||
|
set Index(value: number);
|
||||||
|
constructor(text: string, items: any[], index: number, description?: string, divider?: boolean, data?: any);
|
||||||
|
SetVerticalPosition(y: number): void;
|
||||||
|
IndexToItem(index: number): any;
|
||||||
|
Draw(): void;
|
||||||
|
SetRightBadge(badge: BadgeStyle): void;
|
||||||
|
SetRightLabel(text: string): void;
|
||||||
|
}
|
||||||
14
client/includes/nativeui/types/modules/BigMessage.d.ts
vendored
Normal file
14
client/includes/nativeui/types/modules/BigMessage.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import HudColor from '../enums/HudColor';
|
||||||
|
import Message from './Message';
|
||||||
|
export default class BigMessage extends Message {
|
||||||
|
static Initialize(scaleForm: string, transitionOutAnimName: string): void;
|
||||||
|
static ShowMissionPassedMessage(msg: string, subtitle?: string, time?: number): void;
|
||||||
|
static ShowColoredShard(msg: string, desc: string, textColor: HudColor, bgColor: HudColor, time?: number): void;
|
||||||
|
static ShowOldMessage(msg: string, time?: number): void;
|
||||||
|
static ShowSimpleShard(title: string, subtitle?: string, time?: number): void;
|
||||||
|
static ShowRankupMessage(msg: string, subtitle: string, rank: number, time?: number): void;
|
||||||
|
static ShowPlaneMessage(title: string, planeName: string, planeHash: number, time?: number): void;
|
||||||
|
static ShowWeaponPurchasedMessage(bigMessage: string, weaponName: string, weaponHash: number, time?: number): void;
|
||||||
|
static ShowWastedMessage(title: string, message: string, color: HudColor, darkenBackground: boolean, time?: number): void;
|
||||||
|
static ShowMpMessageLarge(msg: string, subtitle?: string, time?: number): void;
|
||||||
|
}
|
||||||
10
client/includes/nativeui/types/modules/Container.d.ts
vendored
Normal file
10
client/includes/nativeui/types/modules/Container.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import Size from "../utils/Size";
|
||||||
|
import Rectangle from "./Rectangle";
|
||||||
|
import Point from '../utils/Point';
|
||||||
|
import Color from '../utils/Color';
|
||||||
|
export default class Container extends Rectangle {
|
||||||
|
Items: any[];
|
||||||
|
constructor(pos: Point, size: Size, color: Color);
|
||||||
|
addItem(item: any): void;
|
||||||
|
Draw(offset?: Size): void;
|
||||||
|
}
|
||||||
4
client/includes/nativeui/types/modules/IElement.d.ts
vendored
Normal file
4
client/includes/nativeui/types/modules/IElement.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export default class IElement {
|
||||||
|
Enabled: boolean;
|
||||||
|
constructor();
|
||||||
|
}
|
||||||
13
client/includes/nativeui/types/modules/InstructionalButton.d.ts
vendored
Normal file
13
client/includes/nativeui/types/modules/InstructionalButton.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import UIMenuItem from "../items/UIMenuItem";
|
||||||
|
import Control from '../enums/Control';
|
||||||
|
export default class InstructionalButton {
|
||||||
|
Text: string;
|
||||||
|
get ItemBind(): UIMenuItem;
|
||||||
|
private _itemBind;
|
||||||
|
private readonly _buttonString;
|
||||||
|
private readonly _buttonControl;
|
||||||
|
private readonly _usingControls;
|
||||||
|
constructor(text: string, control: Control, buttonString?: string);
|
||||||
|
BindToItem(item: UIMenuItem): void;
|
||||||
|
GetButtonId(): string;
|
||||||
|
}
|
||||||
7
client/includes/nativeui/types/modules/ItemsCollection.d.ts
vendored
Normal file
7
client/includes/nativeui/types/modules/ItemsCollection.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import ListItem from "../modules/ListItem";
|
||||||
|
export default class ItemsCollection {
|
||||||
|
private items;
|
||||||
|
constructor(items: ListItem[] | string[] | number[]);
|
||||||
|
length(): number;
|
||||||
|
getListItems(): any[];
|
||||||
|
}
|
||||||
6
client/includes/nativeui/types/modules/ListItem.d.ts
vendored
Normal file
6
client/includes/nativeui/types/modules/ListItem.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export default class ListItem {
|
||||||
|
readonly Id: string;
|
||||||
|
DisplayText: string;
|
||||||
|
Data: any;
|
||||||
|
constructor(text?: string, data?: any);
|
||||||
|
}
|
||||||
23
client/includes/nativeui/types/modules/Message.d.ts
vendored
Normal file
23
client/includes/nativeui/types/modules/Message.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import Scaleform from '../utils/Scaleform';
|
||||||
|
export default class Message {
|
||||||
|
private static _messageVisible;
|
||||||
|
private static _transitionOutTimeout;
|
||||||
|
private static _transitionOutFinishedTimeout;
|
||||||
|
private static _delayedTransitionInTimeout;
|
||||||
|
private static _scaleform;
|
||||||
|
private static _transitionOutTimeMs;
|
||||||
|
private static _transitionOutAnimName;
|
||||||
|
protected static Initialize(scaleForm: string, transitionOutAnimName: string): void;
|
||||||
|
static get IsVisible(): boolean;
|
||||||
|
protected static get Scaleform(): Scaleform;
|
||||||
|
private static Load;
|
||||||
|
private static SetDelayedTransition;
|
||||||
|
static ShowCustomShard(funcName: string, time?: number, ...funcArgs: any[]): void;
|
||||||
|
static ShowComplexCustomShard(messageHandler: {
|
||||||
|
(): void;
|
||||||
|
}, time?: number): void;
|
||||||
|
protected static TransitionOut(): void;
|
||||||
|
private static TransitionIn;
|
||||||
|
private static SetTransitionOutTimer;
|
||||||
|
protected static Render(): void;
|
||||||
|
}
|
||||||
9
client/includes/nativeui/types/modules/MidsizedMessage.d.ts
vendored
Normal file
9
client/includes/nativeui/types/modules/MidsizedMessage.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import HudColor from '../enums/HudColor';
|
||||||
|
import Message from './Message';
|
||||||
|
export default class MidsizedMessage extends Message {
|
||||||
|
static Initialize(scaleForm: string, transitionOutAnimName: string): void;
|
||||||
|
static ShowMidsizedMessage(title: string, message?: string, time?: number): void;
|
||||||
|
static ShowBridgesKnivesProgress(title: string, totalToDo: number, message: string, info: string, completed: number, time?: number): void;
|
||||||
|
static ShowCondensedShardMessage(title: string, message: string, bgColor: HudColor, useDarkerShard: boolean, time?: number): void;
|
||||||
|
static ShowMidsizedShardMessage(title: string, message: string, bgColor: HudColor, useDarkerShard: boolean, useCondensedShard: boolean, time?: number): void;
|
||||||
|
}
|
||||||
11
client/includes/nativeui/types/modules/Rectangle.d.ts
vendored
Normal file
11
client/includes/nativeui/types/modules/Rectangle.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import Color from "../utils/Color";
|
||||||
|
import Point from "../utils/Point";
|
||||||
|
import Size from "../utils/Size";
|
||||||
|
import IElement from "./IElement";
|
||||||
|
export default class Rectangle extends IElement {
|
||||||
|
Pos: Point;
|
||||||
|
Size: Size;
|
||||||
|
Color: Color;
|
||||||
|
constructor(pos: Point, size: Size, color: Color);
|
||||||
|
Draw(pos: Point | Size, size: Size, color: Color): void;
|
||||||
|
}
|
||||||
10
client/includes/nativeui/types/modules/ResRectangle.d.ts
vendored
Normal file
10
client/includes/nativeui/types/modules/ResRectangle.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import Point from "../utils/Point";
|
||||||
|
import Size from "../utils/Size";
|
||||||
|
import Rectangle from "./Rectangle";
|
||||||
|
import Color from '../utils/Color';
|
||||||
|
export default class ResRectangle extends Rectangle {
|
||||||
|
constructor(pos: Point, size: Size, color: Color);
|
||||||
|
Draw(): void;
|
||||||
|
Draw(offset: any): void;
|
||||||
|
Draw(pos: Point | Size, size: Size, color: Color): void;
|
||||||
|
}
|
||||||
17
client/includes/nativeui/types/modules/ResText.d.ts
vendored
Normal file
17
client/includes/nativeui/types/modules/ResText.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import Alignment from "../enums/Alignment";
|
||||||
|
import Color from "../utils/Color";
|
||||||
|
import Point from "../utils/Point";
|
||||||
|
import Size from "../utils/Size";
|
||||||
|
import Text from "./Text";
|
||||||
|
export default class ResText extends Text {
|
||||||
|
TextAlignment: Alignment;
|
||||||
|
DropShadow: boolean;
|
||||||
|
Outline: boolean;
|
||||||
|
Wrap: number;
|
||||||
|
get WordWrap(): Size;
|
||||||
|
set WordWrap(value: Size);
|
||||||
|
constructor(caption: string, pos: Point, scale: number, color?: Color, font?: number, centered?: Alignment);
|
||||||
|
Draw(): void;
|
||||||
|
Draw(offset: Size): void;
|
||||||
|
Draw(caption: Size, pos: Point, scale: number, color: Color, font: string | number, arg2: any): void;
|
||||||
|
}
|
||||||
19
client/includes/nativeui/types/modules/Sprite.d.ts
vendored
Normal file
19
client/includes/nativeui/types/modules/Sprite.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import Color from "../utils/Color";
|
||||||
|
import Point from "../utils/Point";
|
||||||
|
import Size from "../utils/Size";
|
||||||
|
export default class Sprite {
|
||||||
|
TextureName: string;
|
||||||
|
Pos: Point;
|
||||||
|
Size: Size;
|
||||||
|
Heading: number;
|
||||||
|
Color: Color;
|
||||||
|
Visible: boolean;
|
||||||
|
private _textureDict;
|
||||||
|
constructor(textureDict: string, textureName: string, pos: Point, size: Size, heading?: number, color?: Color);
|
||||||
|
LoadTextureDictionary(): void;
|
||||||
|
private requestTextureDictPromise;
|
||||||
|
set TextureDict(v: string);
|
||||||
|
get TextureDict(): string;
|
||||||
|
get IsTextureDictionaryLoaded(): boolean;
|
||||||
|
Draw(textureDictionary?: string, textureName?: string, pos?: Point, size?: Size, heading?: number, color?: Color, loadTexture?: boolean): void;
|
||||||
|
}
|
||||||
16
client/includes/nativeui/types/modules/Text.d.ts
vendored
Normal file
16
client/includes/nativeui/types/modules/Text.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import Color from "../utils/Color";
|
||||||
|
import Point from "../utils/Point";
|
||||||
|
import IElement from "./IElement";
|
||||||
|
import Size from '../utils/Size';
|
||||||
|
export default class Text extends IElement {
|
||||||
|
Caption: string;
|
||||||
|
Pos: Point;
|
||||||
|
Scale: number;
|
||||||
|
Color: Color;
|
||||||
|
Font: number;
|
||||||
|
Centered: boolean;
|
||||||
|
constructor(caption: string, pos: Point, scale: number, color: Color, font: number, centered: boolean);
|
||||||
|
Draw(caption: Size, pos: Point, scale: number, color: Color, font: string | number, centered: boolean): void;
|
||||||
|
static AddLongString(text: string): void;
|
||||||
|
}
|
||||||
|
export { Text };
|
||||||
12
client/includes/nativeui/types/utils/Color.d.ts
vendored
Normal file
12
client/includes/nativeui/types/utils/Color.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
export default class Color {
|
||||||
|
static Empty: Color;
|
||||||
|
static Transparent: Color;
|
||||||
|
static Black: Color;
|
||||||
|
static White: Color;
|
||||||
|
static WhiteSmoke: Color;
|
||||||
|
R: number;
|
||||||
|
G: number;
|
||||||
|
B: number;
|
||||||
|
A: number;
|
||||||
|
constructor(r: number, g: number, b: number, a?: number);
|
||||||
|
}
|
||||||
3
client/includes/nativeui/types/utils/Common.d.ts
vendored
Normal file
3
client/includes/nativeui/types/utils/Common.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default class Common {
|
||||||
|
static PlaySound(audioName: string, audioRef: string): void;
|
||||||
|
}
|
||||||
21
client/includes/nativeui/types/utils/LiteEvent.d.ts
vendored
Normal file
21
client/includes/nativeui/types/utils/LiteEvent.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
interface ILiteEvent {
|
||||||
|
on(handler: {
|
||||||
|
(...args: any[]): void;
|
||||||
|
}): void;
|
||||||
|
off(handler: {
|
||||||
|
(...args: any[]): void;
|
||||||
|
}): void;
|
||||||
|
}
|
||||||
|
export default class LiteEvent implements ILiteEvent {
|
||||||
|
private handlers;
|
||||||
|
on(handler: {
|
||||||
|
(...args: any[]): void;
|
||||||
|
}): void;
|
||||||
|
off(handler: {
|
||||||
|
(...args: any[]): void;
|
||||||
|
}): void;
|
||||||
|
emit(...args: any[]): void;
|
||||||
|
expose(): ILiteEvent;
|
||||||
|
count(): number;
|
||||||
|
}
|
||||||
|
export {};
|
||||||
1
client/includes/nativeui/types/utils/Number.d.ts
vendored
Normal file
1
client/includes/nativeui/types/utils/Number.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export declare const fixFloat: (n: number) => number;
|
||||||
10
client/includes/nativeui/types/utils/Point.d.ts
vendored
Normal file
10
client/includes/nativeui/types/utils/Point.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export default class Point {
|
||||||
|
X: number;
|
||||||
|
Y: number;
|
||||||
|
constructor(x: number, y: number);
|
||||||
|
static Parse(point: number[]): Point;
|
||||||
|
static Parse(point: {
|
||||||
|
X: number;
|
||||||
|
Y: number;
|
||||||
|
}): Point;
|
||||||
|
}
|
||||||
14
client/includes/nativeui/types/utils/Scaleform.d.ts
vendored
Normal file
14
client/includes/nativeui/types/utils/Scaleform.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
export default class Scaleform {
|
||||||
|
private _handle;
|
||||||
|
private scaleForm;
|
||||||
|
constructor(scaleForm: string);
|
||||||
|
get handle(): number;
|
||||||
|
get isValid(): boolean;
|
||||||
|
get isLoaded(): boolean;
|
||||||
|
private callFunctionHead;
|
||||||
|
callFunction(funcName: string, ...args: any[]): void;
|
||||||
|
callFunctionReturn(funcName: string, ...args: any[]): number;
|
||||||
|
render2D(): void;
|
||||||
|
recreate(): void;
|
||||||
|
destroy(): void;
|
||||||
|
}
|
||||||
15
client/includes/nativeui/types/utils/Screen.d.ts
vendored
Normal file
15
client/includes/nativeui/types/utils/Screen.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import Font from "../enums/Font";
|
||||||
|
import Point from "./Point";
|
||||||
|
import Size from "./Size";
|
||||||
|
export default class Screen {
|
||||||
|
static Width: number;
|
||||||
|
static Height: number;
|
||||||
|
static get ResolutionMaintainRatio(): Size;
|
||||||
|
static MousePosition(relative?: boolean): {
|
||||||
|
X: number;
|
||||||
|
Y: number;
|
||||||
|
};
|
||||||
|
static IsMouseInBounds(topLeft: Point, boxSize: Size): boolean;
|
||||||
|
static GetTextWidth(text: string, font: Font, scale: number): number;
|
||||||
|
static GetLineCount(text: string, position: Point, font: Font, scale: number, wrap: number): number;
|
||||||
|
}
|
||||||
5
client/includes/nativeui/types/utils/Size.d.ts
vendored
Normal file
5
client/includes/nativeui/types/utils/Size.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export default class Size {
|
||||||
|
Width: number;
|
||||||
|
Height: number;
|
||||||
|
constructor(w?: number, h?: number);
|
||||||
|
}
|
||||||
1
client/includes/nativeui/types/utils/UUIDV4.d.ts
vendored
Normal file
1
client/includes/nativeui/types/utils/UUIDV4.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export default function UUIDV4(): string;
|
||||||
@ -1,5 +1,29 @@
|
|||||||
import * as alt from 'alt'
|
import * as alt from 'alt'
|
||||||
import * as native from 'natives'
|
import * as native from 'natives'
|
||||||
|
import * as NativeUI from './includes/nativeui/nativeui.min.js'
|
||||||
|
|
||||||
|
import './ui.mjs'
|
||||||
|
|
||||||
|
alt.setMsPerGameMinute(30000)
|
||||||
|
|
||||||
|
alt.onServer('player:death', () => {
|
||||||
|
native.animpostfxPlay('DeathFailNeutralIn', 5000, false)
|
||||||
|
NativeUI.BigMessage.ShowWastedMessage('Мертв', 'Вы умерли', NativeUI.HudColor.HUD_COLOUR_RED, 5000)
|
||||||
|
})
|
||||||
|
|
||||||
|
alt.onServer('player:notify', message => {
|
||||||
|
native.beginTextCommandThefeedPost('STRING')
|
||||||
|
native.addTextComponentSubstringPlayerName(message)
|
||||||
|
native.endTextCommandThefeedPostTicker(false, false)
|
||||||
|
})
|
||||||
|
|
||||||
|
alt.onServer('player:setInvincible', () => {
|
||||||
|
native.setEntityInvincible(alt.Player.local.scriptID, true)
|
||||||
|
})
|
||||||
|
|
||||||
|
alt.onServer('player:delInvincible', () => {
|
||||||
|
native.setEntityInvincible(alt.Player.local.scriptID, false)
|
||||||
|
})
|
||||||
|
|
||||||
alt.onServer('vehicle:setInto', (newVehicle) => {
|
alt.onServer('vehicle:setInto', (newVehicle) => {
|
||||||
const localPlayer = alt.Player.local.scriptID
|
const localPlayer = alt.Player.local.scriptID
|
||||||
@ -12,3 +36,7 @@ alt.onServer('vehicle:setInto', (newVehicle) => {
|
|||||||
alt.onServer('admin:setStat', () => {
|
alt.onServer('admin:setStat', () => {
|
||||||
alt.setStat('shooting_ability', 99999)
|
alt.setStat('shooting_ability', 99999)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
alt.onServer('admin:setInvincible', toggle => {
|
||||||
|
native.setEntityInvincible(alt.Player.local.scriptID, toggle)
|
||||||
|
})
|
||||||
116
client/ui.mjs
Normal file
116
client/ui.mjs
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
import alt from 'alt-client'
|
||||||
|
import * as native from 'natives'
|
||||||
|
import * as NativeUI from "./includes/nativeui/nativeui.min.js"
|
||||||
|
|
||||||
|
// NativeUI.MidsizedMessage.ShowMidsizedShardMessage("Menu opened", "Awesome", NativeUI.HudColor.HUD_COLOUR_BLACK, true, true)
|
||||||
|
// NativeUI.MidsizedMessage.ShowMidsizedMessage('~r~Вы саспект!', 'Уйдите от полиции', 1000)
|
||||||
|
|
||||||
|
const Menu = NativeUI.Menu
|
||||||
|
const UIMenuItem = NativeUI.UIMenuItem
|
||||||
|
const UIMenuListItem = NativeUI.UIMenuListItem
|
||||||
|
const ItemsCollection = NativeUI.ItemsCollection
|
||||||
|
const UIMenuCheckboxItem = NativeUI.UIMenuCheckboxItem
|
||||||
|
const Point = NativeUI.Point
|
||||||
|
|
||||||
|
const menuPos = new Point(1450, 150)
|
||||||
|
const locations = ['airport', 'spawn', 'fibroof', 'epsilon', 'policestation', 'yankton']
|
||||||
|
|
||||||
|
let subMenuActive = false
|
||||||
|
|
||||||
|
const adminMenu = new Menu("Админ Панель", "Выполняйте админ-функции", menuPos)
|
||||||
|
const kickPlayerMenu = new Menu("Кикнуть игрока", "Сервер кикнет любого игрока", menuPos)
|
||||||
|
const banPlayerMenu = new Menu('Забанить игрока', "Сервер забанит игрока", menuPos)
|
||||||
|
const killPlayerMenu = new Menu('Убить игрока', "Сервер моментально убьет игрока", menuPos)
|
||||||
|
const carSpawnMenu = new Menu("Заспавнить машину", "Сервер заспавнит машину", menuPos)
|
||||||
|
const teleportToLocationMenu = new Menu("Телепорт к локации", "Телепортируйтесь на выбранную локацию", menuPos)
|
||||||
|
const myPersonMenu = new Menu("Мой персонаж", "Выберите что-то", menuPos)
|
||||||
|
const weaponsMenu = new Menu("Оружие", "Выберите оружие", menuPos)
|
||||||
|
const teleportToPlayerMenu = new Menu("Телепорт к игроку", "Вы телепортируетесь к игроку", menuPos)
|
||||||
|
const teleportToMeMenu = new Menu("Телепорт к себе", "Вы телепортируете игрока к себе", menuPos)
|
||||||
|
|
||||||
|
const kickItem = new UIMenuItem('Кикнуть игрока',`Сервер кикнет игрока`)
|
||||||
|
const banItem = new UIMenuItem('Забанить игрока',`Сервер заблокирует игрока`)
|
||||||
|
const killItem = new UIMenuItem('Убить игрока',`Убейте моментально любого игрока`)
|
||||||
|
const spawnCarItem = new UIMenuItem('Заспавнить машину',`Сервер заспавнит машину перед вами`)
|
||||||
|
const teleportToLocationItem = new UIMenuItem('Телепорт к локации',`Телепортируйтесь к выбранной локации`)
|
||||||
|
const myPersonItem = new UIMenuItem('Мой персонаж', `Выдайте себе здоровье или станьте неуязвимым`)
|
||||||
|
const weaponsItem = new UIMenuItem('Выдать себе оружие',`Выдайте любое оружие себе`)
|
||||||
|
const teleportToPlayerItem = new UIMenuItem('Телепорт к игроку',`Телепортируйтесь к игроку`)
|
||||||
|
const teleportToMeItem = new UIMenuItem('Телепорт игрока к себе', `Телепортируйте игрока к себе`)
|
||||||
|
|
||||||
|
const playersListItem = new UIMenuListItem(
|
||||||
|
"Игроки",
|
||||||
|
"Выберите игрока",
|
||||||
|
new ItemsCollection(alt.Player.all.map(_player => _player.name))
|
||||||
|
)
|
||||||
|
|
||||||
|
myPersonMenu.AddItem(new UIMenuCheckboxItem(
|
||||||
|
"Неуязвимость",
|
||||||
|
false,
|
||||||
|
"Делает вашего персонажа неуязвимым"
|
||||||
|
))
|
||||||
|
myPersonMenu.AddItem(new UIMenuItem('Восстановить здоровье', `Восстанавливает 100hp`))
|
||||||
|
|
||||||
|
kickPlayerMenu.AddItem(playersListItem)
|
||||||
|
alt.setInterval(() => playersListItem.Collection = new ItemsCollection(alt.Player.all.map(_player => `[${_player.id}]:${_player.name}`)).getListItems(), 300)
|
||||||
|
|
||||||
|
adminMenu.BindMenuToItem(myPersonMenu, myPersonItem)
|
||||||
|
adminMenu.BindMenuToItem(kickPlayerMenu, kickItem)
|
||||||
|
adminMenu.BindMenuToItem(banPlayerMenu, banItem)
|
||||||
|
adminMenu.BindMenuToItem(killPlayerMenu, killItem)
|
||||||
|
adminMenu.BindMenuToItem(carSpawnMenu, spawnCarItem)
|
||||||
|
adminMenu.BindMenuToItem(teleportToLocationMenu, teleportToLocationItem)
|
||||||
|
adminMenu.BindMenuToItem(weaponsMenu, weaponsItem)
|
||||||
|
adminMenu.BindMenuToItem(teleportToPlayerMenu, teleportToPlayerItem)
|
||||||
|
adminMenu.BindMenuToItem(teleportToMeMenu, teleportToMeItem)
|
||||||
|
|
||||||
|
|
||||||
|
adminMenu.ItemSelect.on(item => {
|
||||||
|
if (item instanceof UIMenuItem) subMenuActive = true
|
||||||
|
})
|
||||||
|
|
||||||
|
myPersonMenu.ItemSelect.on(item => {
|
||||||
|
if (item.Text.toLowerCase() === 'восстановить здоровье') alt.emitServer('getHealth')
|
||||||
|
})
|
||||||
|
|
||||||
|
myPersonMenu.CheckboxChange.on(item => {
|
||||||
|
if (item.Text.toLowerCase() === 'неуязвимость') alt.emitServer('godMode', item.Checked)
|
||||||
|
})
|
||||||
|
|
||||||
|
kickPlayerMenu.ItemSelect.on(item => {
|
||||||
|
alt.emitServer("kickPlayer", item.SelectedItem.DisplayText);
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
alt.on('keyup', key => {
|
||||||
|
if (key === 113) { // F2
|
||||||
|
alt.emitServer('showAdminPanel')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
alt.onServer('ui:showAdminPanel', () => {
|
||||||
|
if (
|
||||||
|
kickPlayerMenu.Visible
|
||||||
|
|| banPlayerMenu.Visible
|
||||||
|
|| killPlayerMenu.Visible
|
||||||
|
|| carSpawnMenu.Visible
|
||||||
|
|| teleportToLocationMenu.Visible
|
||||||
|
|| myPersonMenu.Visible
|
||||||
|
|| weaponsMenu.Visible
|
||||||
|
|| teleportToPlayerMenu.Visible
|
||||||
|
|| teleportToMeMenu.Visible
|
||||||
|
)
|
||||||
|
{
|
||||||
|
kickPlayerMenu.Close()
|
||||||
|
banPlayerMenu.Close()
|
||||||
|
killPlayerMenu.Close()
|
||||||
|
carSpawnMenu.Close()
|
||||||
|
teleportToLocationMenu.Close()
|
||||||
|
myPersonMenu.Close()
|
||||||
|
weaponsMenu.Close()
|
||||||
|
teleportToPlayerMenu.Close()
|
||||||
|
teleportToMeMenu.Close()
|
||||||
|
}
|
||||||
|
|
||||||
|
adminMenu.Visible ? adminMenu.Close() : adminMenu.Open()
|
||||||
|
})
|
||||||
@ -6,6 +6,7 @@ client-files: [
|
|||||||
client/*
|
client/*
|
||||||
]
|
]
|
||||||
deps: [
|
deps: [
|
||||||
chat
|
chat,
|
||||||
altv-os-global-textlabels
|
altv-os-global-textlabels,
|
||||||
|
altv-os-nametags
|
||||||
]
|
]
|
||||||
|
|||||||
@ -2,6 +2,12 @@
|
|||||||
Events
|
Events
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Admin ui
|
||||||
|
import './modules/events/ui/showAdminPanel.mjs'
|
||||||
|
import './modules/events/ui/getHealth.mjs'
|
||||||
|
import './modules/events/ui/godMode.mjs'
|
||||||
|
import './modules/events/ui/kickPlayer.mjs'
|
||||||
|
|
||||||
import './modules/events/playerConnect.mjs'
|
import './modules/events/playerConnect.mjs'
|
||||||
import './modules/events/playerDisconnect.mjs'
|
import './modules/events/playerDisconnect.mjs'
|
||||||
import './modules/events/playerDeath.mjs'
|
import './modules/events/playerDeath.mjs'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import alt from 'alt-server'
|
import alt from 'alt-server'
|
||||||
import { registerCmd, send } from 'chat'
|
import { registerCmd, broadcast, send } from 'chat'
|
||||||
import { isPlayerAdmin } from '../../helpers/helpers.mjs'
|
import { isPlayerAdmin } from '../../helpers/helpers.mjs'
|
||||||
|
|
||||||
registerCmd('kick', (player, args) => {
|
registerCmd('kick', (player, args) => {
|
||||||
@ -15,5 +15,8 @@ registerCmd('kick', (player, args) => {
|
|||||||
return send(player, `{EE9A00}[SERVER]: {FFF}Игрок с ID: "${args[0]}" не найден`);
|
return send(player, `{EE9A00}[SERVER]: {FFF}Игрок с ID: "${args[0]}" не найден`);
|
||||||
}
|
}
|
||||||
|
|
||||||
target.kick()
|
alt.emitClient(target, 'player:notify', `Вы были кикнуты с этого сервера`)
|
||||||
|
|
||||||
|
alt.setTimeout(() => target.kick(), 300)
|
||||||
|
broadcast(`{EE9A00}[SERVER]: {FFF}Игрок {1CD8FD}${target.name} {FFF}был кикнут с сервера`)
|
||||||
})
|
})
|
||||||
@ -6,8 +6,15 @@ import skins from '../../skins.json'
|
|||||||
|
|
||||||
alt.on('playerConnect', (player) => {
|
alt.on('playerConnect', (player) => {
|
||||||
broadcast(`{EE9A00}[SERVER]: {1CD8FD}👋 ${player.name} {FFF}присоеденился к серверу`)
|
broadcast(`{EE9A00}[SERVER]: {1CD8FD}👋 ${player.name} {FFF}присоеденился к серверу`)
|
||||||
|
const date = new Date()
|
||||||
|
|
||||||
|
player.setSyncedMeta('NAME', `[${player.id}]: ${player.name}`);
|
||||||
|
player.setDateTime(date.getDay(), date.getMonth(), date.getFullYear(), date.getHours(), date.getMinutes(), date.getSeconds())
|
||||||
player.model = skins[Math.floor(Math.random() * (skins.length - 1 - 0) + 0)]
|
player.model = skins[Math.floor(Math.random() * (skins.length - 1 - 0) + 0)]
|
||||||
player.spawn(config.spawn.x, config.spawn.y,config.spawn.z)
|
player.spawn(config.spawn.x, config.spawn.y,config.spawn.z)
|
||||||
player.dimension = 0
|
player.dimension = 0
|
||||||
|
|
||||||
|
|
||||||
|
alt.emitClient(player, 'player:setInvincible')
|
||||||
|
alt.emitClient(player, 'player:notify', '~g~Добро пожаловать на сервер!')
|
||||||
})
|
})
|
||||||
@ -4,8 +4,9 @@ import config from '../../config.mjs'
|
|||||||
|
|
||||||
alt.on('playerDeath', (player) => {
|
alt.on('playerDeath', (player) => {
|
||||||
alt.emitClient(player, 'player:death')
|
alt.emitClient(player, 'player:death')
|
||||||
|
alt.Player.all.forEach(_player => alt.emitClient(_player, 'player:notify', `Игрок <C>${player.name}</C> погиб`))
|
||||||
alt.setTimeout(() => {
|
alt.setTimeout(() => {
|
||||||
player.spawn(config.spawn.x, config.spawn.y,config.spawn.z)
|
player.spawn(config.spawn.x, config.spawn.y,config.spawn.z)
|
||||||
player.removeAllWeapons()
|
player.removeAllWeapons()
|
||||||
}, 3000)
|
}, 5000)
|
||||||
})
|
})
|
||||||
9
server/modules/events/ui/getHealth.mjs
Normal file
9
server/modules/events/ui/getHealth.mjs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import alt from 'alt-server'
|
||||||
|
import { isPlayerAdmin } from '../../helpers/helpers.mjs'
|
||||||
|
|
||||||
|
alt.onClient('getHealth', player => {
|
||||||
|
if (!isPlayerAdmin(player)) return false
|
||||||
|
|
||||||
|
player.health = 200
|
||||||
|
alt.emitClient(player, 'player:notify', 'Ваше здоровье было восстановлено')
|
||||||
|
})
|
||||||
14
server/modules/events/ui/godMode.mjs
Normal file
14
server/modules/events/ui/godMode.mjs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import alt from 'alt-server'
|
||||||
|
import { isPlayerAdmin } from '../../helpers/helpers.mjs'
|
||||||
|
|
||||||
|
alt.onClient('godMode', (player, checked) => {
|
||||||
|
if (!isPlayerAdmin(player)) return false
|
||||||
|
|
||||||
|
if (checked) {
|
||||||
|
alt.emitClient(player, 'admin:setInvincible', checked)
|
||||||
|
alt.emitClient(player, 'player:notify', 'Неуязвимость: вкл')
|
||||||
|
} else {
|
||||||
|
alt.emitClient(player, 'admin:setInvincible', checked)
|
||||||
|
alt.emitClient(player, 'player:notify', 'Неуязвимость: выкл')
|
||||||
|
}
|
||||||
|
})
|
||||||
12
server/modules/events/ui/kickPlayer.mjs
Normal file
12
server/modules/events/ui/kickPlayer.mjs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import alt from 'alt-server'
|
||||||
|
import { broadcast } from 'chat'
|
||||||
|
import { isPlayerAdmin } from '../../helpers/helpers.mjs'
|
||||||
|
|
||||||
|
alt.onClient('kickPlayer', (player, targetId) => {
|
||||||
|
if (!isPlayerAdmin(player)) return false
|
||||||
|
const target = alt.Player.getByID(+/\d+/.exec(targetId.split(':')[0]))
|
||||||
|
alt.emitClient(target, 'player:notify', `Вы были кикнуты с этого сервера`)
|
||||||
|
|
||||||
|
alt.setTimeout(() => target.kick(), 300)
|
||||||
|
broadcast(`{EE9A00}[SERVER]: {FFF}Игрок {1CD8FD}${target.name} {FFF}был кикнут с сервера`)
|
||||||
|
})
|
||||||
8
server/modules/events/ui/showAdminPanel.mjs
Normal file
8
server/modules/events/ui/showAdminPanel.mjs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import alt from 'alt-server'
|
||||||
|
import { isPlayerAdmin } from '../../helpers/helpers.mjs'
|
||||||
|
|
||||||
|
alt.onClient('showAdminPanel', player => {
|
||||||
|
if (!isPlayerAdmin(player)) return false
|
||||||
|
|
||||||
|
alt.emitClient(player, 'ui:showAdminPanel')
|
||||||
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user