Files
ox_lib/web/src/features/dev/debug/context.ts

82 lines
2.3 KiB
TypeScript
Raw Normal View History

import { ContextMenuProps } from '../../../typings';
2022-08-27 15:58:36 +02:00
import { debugData } from '../../../utils/debugData';
export const debugContext = () => {
debugData<ContextMenuProps>([
{
2022-08-27 15:58:36 +02:00
action: 'showContext',
data: {
2022-08-27 15:58:36 +02:00
title: 'Vehicle garage',
options: [
2022-08-27 15:58:36 +02:00
{ title: 'Empty button' },
{
title: 'Karin Kuruma',
image: 'https://cdn.discordapp.com/attachments/1063098499027173461/1064276343585505330/screenshot.jpg',
arrow: true,
colorScheme: 'blue',
metadata: [
{
['label']: 'Body',
['value']: '55%',
['progress']: 55,
},
{
['label']: 'Engine',
['value']: '100%',
['progress']: 100,
},
{
['label']: 'Oil',
['progress']: 11,
},
{
['label']: 'Fuel',
['progress']: 87,
},
],
},
{
2022-08-27 15:58:36 +02:00
title: 'Example button',
description: 'Example button description',
icon: 'inbox',
image: 'https://i.imgur.com/YAe7k17.jpeg',
metadata: [{ label: 'Value 1', value: 300 }],
2022-11-06 11:01:39 +01:00
disabled: true,
},
{
title: 'Oil Level',
description: 'Vehicle oil level',
progress: 30,
icon: 'oil-can',
metadata: [{ label: 'Remaining Oil', value: '30%' }],
arrow: true,
},
{
title: 'Durability',
progress: 80,
icon: 'car-side',
metadata: [{ label: 'Durability', value: '80%' }],
colorScheme: 'blue',
},
{
2022-08-27 15:58:36 +02:00
title: 'Menu button',
icon: 'bars',
menu: 'other_example_menu',
arrow: false,
2022-08-27 15:58:36 +02:00
description: 'Takes you to another menu',
metadata: ['It also has metadata support'],
},
{
2022-08-27 15:58:36 +02:00
title: 'Event button',
description: 'Open a menu and send event data',
icon: 'check',
arrow: true,
2022-08-27 15:58:36 +02:00
event: 'some_event',
args: { value1: 300, value2: 'Other value' },
},
],
},
},
]);
};