NssPadLock
How to use
ES6 module import
import {NssPadLock} from "nui://nss_libs/ui/NssPadLock/NssPadLock.js";Create simple padlock
import {NssPadLock} from "nui://nss_libs/ui/NssPadLock/NssPadLock.js";
const dummy_code = '0042'; // The code is variable of length, currently 4 digits
const padlock = new NssPadLock(dummy_code);
const on_open = (/**NssPadLock*/opened_padlock) => {
// Do your stuff here...
};
padlock
.setTimePenalty(3000)
.setTranslationUnlock('Unlock')
.setTranslationLock('Lock')
.onOpen(on_open)
.show();Create custom padlock
Create padlock with "cache"
Last updated
Was this helpful?