mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-27 01:39:34 +02:00
Disable A button on blank slots
Pressing A on a slot for a file that doesn't have a log does nothing
This commit is contained in:
parent
898a153104
commit
a5335e1cc8
@ -110,6 +110,7 @@ export default class LogSelectUiHandler extends MessageUiHandler {
|
|||||||
const originalCallback = this.selectCallback;
|
const originalCallback = this.selectCallback;
|
||||||
const cursor = this.cursor + this.scrollCursor;
|
const cursor = this.cursor + this.scrollCursor;
|
||||||
var k = this.sessionSlots[cursor].key
|
var k = this.sessionSlots[cursor].key
|
||||||
|
if (k != undefined) {
|
||||||
var file = JSON.parse(localStorage.getItem(k)) as LoggerTools.DRPD;
|
var file = JSON.parse(localStorage.getItem(k)) as LoggerTools.DRPD;
|
||||||
console.log(k, file)
|
console.log(k, file)
|
||||||
LoggerTools.generateEditHandlerForLog(this.scene, this.sessionSlots[cursor].logIndex, () => {
|
LoggerTools.generateEditHandlerForLog(this.scene, this.sessionSlots[cursor].logIndex, () => {
|
||||||
@ -117,6 +118,7 @@ export default class LogSelectUiHandler extends MessageUiHandler {
|
|||||||
originalCallback(k)
|
originalCallback(k)
|
||||||
})()
|
})()
|
||||||
success = true;
|
success = true;
|
||||||
|
}
|
||||||
} else if (button === Button.CANCEL) {
|
} else if (button === Button.CANCEL) {
|
||||||
this.quitCallback(undefined);
|
this.quitCallback(undefined);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user