mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
- Add in missing js functions - getCurrentRadialId - requestScaleformMove - Change up math.tohex to maintain lowercase `0x` prefix - Add missing fields - Removed extra whitespaces Co-authored-by: Luke <39926192+LukeWasTakenn@users.noreply.github.com>
23 lines
827 B
TypeScript
23 lines
827 B
TypeScript
import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types';
|
|
|
|
type RadialItem = {
|
|
id: string;
|
|
label: string;
|
|
icon: IconName | [IconPrefix, IconName];
|
|
onSelect?: (currentMenu: string | null, itemIndex: number) => void | string;
|
|
menu?: string;
|
|
};
|
|
|
|
export const addRadialItem = (items: RadialItem | RadialItem[]) => exports.ox_lib.addRadialItem(items);
|
|
|
|
export const removeRadialItem = (item: string) => exports.ox_lib.removeRadialItem(item);
|
|
|
|
export const registerRadial = (radial: { id: string; items: Omit<RadialItem, 'id'>[] }) =>
|
|
exports.ox_lib.registerRadial(radial);
|
|
|
|
export const getCurrentRadialId = () => exports.ox_lib.getCurrentRadialId();
|
|
|
|
export const hideRadial = () => exports.ox_lib.hideRadial();
|
|
|
|
export const disableRadial = (state: boolean) => exports.ox_lib.disableRadial(state);
|