refactored logging.
This commit is contained in:
parent
5eaf5f37e3
commit
c1ba8f5e10
@ -5,6 +5,9 @@ import {ControllerEventType, Controllers} from "../controllers/controllers";
|
|||||||
import {DiaSounds} from "../util/diaSounds";
|
import {DiaSounds} from "../util/diaSounds";
|
||||||
import {AbstractMenu} from "./abstractMenu";
|
import {AbstractMenu} from "./abstractMenu";
|
||||||
import {setMenuPosition} from "../util/functions/setMenuPosition";
|
import {setMenuPosition} from "../util/functions/setMenuPosition";
|
||||||
|
import log from "loglevel";
|
||||||
|
|
||||||
|
const logger = log.getLogger('ConfigMenu');
|
||||||
|
|
||||||
export class ConfigMenu extends AbstractMenu {
|
export class ConfigMenu extends AbstractMenu {
|
||||||
private sounds: DiaSounds;
|
private sounds: DiaSounds;
|
||||||
@ -33,6 +36,7 @@ export class ConfigMenu extends AbstractMenu {
|
|||||||
|
|
||||||
this.controllers.controllerObserver.add((event) => {
|
this.controllers.controllerObserver.add((event) => {
|
||||||
if (event.type == ControllerEventType.Y_BUTTON) {
|
if (event.type == ControllerEventType.Y_BUTTON) {
|
||||||
|
logger.debug('Y Button Pressed');
|
||||||
this.toggle();
|
this.toggle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -120,12 +124,13 @@ export class ConfigMenu extends AbstractMenu {
|
|||||||
selectionPanel.addGroup(radio);
|
selectionPanel.addGroup(radio);
|
||||||
for (const [index, snap] of this.gridSnaps.entries()) {
|
for (const [index, snap] of this.gridSnaps.entries()) {
|
||||||
const selected = (this.config.current.createSnap == snap.value);
|
const selected = (this.config.current.createSnap == snap.value);
|
||||||
console.log(selected);
|
logger.debug(selected);
|
||||||
radio.addRadio(snap.label, this.createVal.bind(this), selected);
|
radio.addRadio(snap.label, this.createVal.bind(this), selected);
|
||||||
}
|
}
|
||||||
this.adjustRadio(radio);
|
this.adjustRadio(radio);
|
||||||
return radio;
|
return radio;
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildFlyModeControl(selectionPanel: SelectionPanel): CheckboxGroup {
|
private buildFlyModeControl(selectionPanel: SelectionPanel): CheckboxGroup {
|
||||||
const checkbox = new CheckboxGroup("Fly Mode");
|
const checkbox = new CheckboxGroup("Fly Mode");
|
||||||
selectionPanel.addGroup(checkbox);
|
selectionPanel.addGroup(checkbox);
|
||||||
@ -133,6 +138,7 @@ export class ConfigMenu extends AbstractMenu {
|
|||||||
this.adjustRadio(checkbox);
|
this.adjustRadio(checkbox);
|
||||||
return checkbox;
|
return checkbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildRotationSnapControl(selectionPanel: SelectionPanel): RadioGroup {
|
private buildRotationSnapControl(selectionPanel: SelectionPanel): RadioGroup {
|
||||||
const radio = new RadioGroup("Rotation Snap");
|
const radio = new RadioGroup("Rotation Snap");
|
||||||
selectionPanel.addGroup(radio);
|
selectionPanel.addGroup(radio);
|
||||||
@ -143,6 +149,7 @@ export class ConfigMenu extends AbstractMenu {
|
|||||||
this.adjustRadio(radio);
|
this.adjustRadio(radio);
|
||||||
return radio;
|
return radio;
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildGridSizeControl(selectionPanel: SelectionPanel): RadioGroup {
|
private buildGridSizeControl(selectionPanel: SelectionPanel): RadioGroup {
|
||||||
const radio = new RadioGroup("Grid Snap");
|
const radio = new RadioGroup("Grid Snap");
|
||||||
selectionPanel.addGroup(radio);
|
selectionPanel.addGroup(radio);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ export function buildAvatar(scene: Scene) {
|
|||||||
m.skeleton = skel;
|
m.skeleton = skel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log("simplification done");
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user