Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1.49 KB

README.md

File metadata and controls

61 lines (41 loc) · 1.49 KB

[CRC][TS] alt:V Instructional Buttons

Supported by CRC

This is considered a utility component for rendering instructional buttons through events.

Requires

Highly recommended to get the extension, for better event handling.

Installation

  1. Create a folder in your src folder called crc-instructional-buttons.

  2. Add the TypeScript files from this resource, to that folder.

  3. Modify server.toml and ensure it loads whatever you named the folder.

In the case of the example above it should be crc-login.

resources = [ 
    'crc-db',
    'crc-instructional-buttons',
    'crc-login',
    'core',
    'dbg_reconnect'
]

Your resource structure may vary

Usage

Showing Buttons

alt.emit('crc-instructional-buttons', {
    set: [
        { text: 'Back / Exit', input: '~INPUT_FRONTEND_RRIGHT~' },
        { text: 'Enter', input: '~INPUT_FRONTEND_RDOWN~' },
        { text: 'Change', input: '~INPUTGROUP_CELLPHONE_NAVIGATE_LR~' },
        { text: 'Navigate', input: '~INPUTGROUP_CELLPHONE_NAVIGATE_UD~' },
    ],
});

Hiding Buttons

alt.emit('crc-instructional-buttons', { clear: true });

Preview