Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
psy0rz committed Dec 31, 2024
1 parent ce54c09 commit f13a475
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
21 changes: 11 additions & 10 deletions ledder/ControlGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ export default class ControlGroup extends Control {
private __loadedValues: Values


public __addCallbacks:CallbackManager< ()=>void>
public __resetCallbacks:CallbackManager< ()=>void>
public __addCallbacks: CallbackManager<() => void>
public __resetCallbacks: CallbackManager<() => void>


constructor(name: string = 'root', restartOnChange: boolean = false, collapsed = false) {
super(name, 'controls', restartOnChange)

this.__resetCallbacks=new CallbackManager()
this.__addCallbacks=new CallbackManager()
this.__resetCallbacks = new CallbackManager()
this.__addCallbacks = new CallbackManager()

this.meta.collapsed = collapsed
this.__clear()
Expand Down Expand Up @@ -150,16 +150,17 @@ export default class ControlGroup extends Control {
const controlGroup = new ControlGroup(name, restartOnChange, collapsed)
this.__add(controlGroup)

const resetCallbacks=this.__resetCallbacks
const addCallbacks=this.__addCallbacks

//pass through
controlGroup.__resetCallbacks.register( ()=>
{
this.__resetCallbacks.trigger()
controlGroup.__resetCallbacks.register(() => {
resetCallbacks.trigger()

})

controlGroup.__addCallbacks.register( ()=>
{
this.__addCallbacks.trigger()
controlGroup.__addCallbacks.register(() => {
addCallbacks.trigger()
})

}
Expand Down
8 changes: 3 additions & 5 deletions ledder/server/AnimationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class AnimationManager {
public animationClass: typeof Animator
private animation: Animator

public changedCallbacks:CallbackManager<(animationName:string, presetName:string)=>void>
public changedCallbacks: CallbackManager<(animationName: string, presetName: string) => void>

//parents
public readonly box: PixelBox
Expand All @@ -55,7 +55,7 @@ export default class AnimationManager {

this.createProxies()

this.changedCallbacks=new CallbackManager()
this.changedCallbacks = new CallbackManager()

}

Expand Down Expand Up @@ -156,9 +156,7 @@ export default class AnimationManager {
try {
this.animationName = animationAndPresetPath.match(RegExp("(^.*)/"))[1]
this.presetName = animationAndPresetPath.match(RegExp("[^/]+$"))[0]
}
catch (e)
{
} catch (e) {
console.error(`Invalid name: ${animationAndPresetPath}`)
return
}
Expand Down
6 changes: 3 additions & 3 deletions presets/Countdown/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"enabled": true
},
"Warning time (min)": {
"value": 60
"value": 10
},
"Font": {
"Font": {
Expand All @@ -31,7 +31,7 @@
"value": 0
},
"Font width": {
"value": 0
"value": 5
},
"X": {
"value": 0
Expand All @@ -51,7 +51,7 @@
"value": 0
},
"Text": {
"text": ""
"text": "Glitchy 2025 countdown dinges"
},
"Text color": {
"r": 33,
Expand Down
4 changes: 2 additions & 2 deletions presets/Text/Marquee/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"value": 0
},
"Text": {
"text": "ip=%i"
"text": "Marquee"
},
"Text color": {
"r": 33,
Expand Down Expand Up @@ -64,7 +64,7 @@
},
"Scrolling": {
"Enabled": {
"enabled": true
"enabled": false
},
"FPS": {
"value": 60
Expand Down

0 comments on commit f13a475

Please sign in to comment.