mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 09:09:30 -07:00
add scanlines
This commit is contained in:
@@ -33,6 +33,12 @@ const init = () => {
|
||||
[1.5, 'Very Slow'],
|
||||
],
|
||||
});
|
||||
settings.scanLines = new Setting('scanLines', {
|
||||
name: 'Scan Lines',
|
||||
defaultValue: false,
|
||||
changeAction: scanLineChange,
|
||||
sticky: true,
|
||||
});
|
||||
settings.units = new Setting('units', {
|
||||
name: 'Units',
|
||||
type: 'select',
|
||||
@@ -85,6 +91,18 @@ const kioskChange = (value) => {
|
||||
}
|
||||
};
|
||||
|
||||
const scanLineChange = (value) => {
|
||||
const container = document.getElementById('container');
|
||||
const navIcons = document.getElementById('ToggleScanlines');
|
||||
if (value) {
|
||||
container.classList.add('scanlines');
|
||||
navIcons.classList.add('on');
|
||||
} else {
|
||||
container.classList.remove('scanlines');
|
||||
navIcons.classList.remove('on');
|
||||
}
|
||||
};
|
||||
|
||||
const unitChange = () => {
|
||||
// reload the data at the top level to refresh units
|
||||
// after the initial load
|
||||
|
||||
Reference in New Issue
Block a user