fixed window highlight inconsistency

This commit is contained in:
minjaesong
2025-01-04 19:42:06 +09:00
parent 73d79eaaef
commit f7c03cf950

View File

@@ -498,9 +498,18 @@ function drawTitle() {
function drawFilePanel() {
windows[0].forEach((panel, i)=>{
panel.isHighlighted = (i == 2 * windowMode)
})
// set highlight status
const currentTopPanel = windowFocus.last()
if (currentTopPanel == 0) {
windows[0].forEach((panel, i)=>{
panel.isHighlighted = (i == 2 * windowMode)
})
}
else {
windows[0].forEach((panel, i)=>{
panel.isHighlighted = false
})
}
if (windowMode) {
RIGHTPANEL.drawContents()
RIGHTPANEL.drawFrame()
@@ -571,8 +580,6 @@ while (!exit) {
firstRunLatch = false
}
else {
serial.println(`current windowFocus: ${windowFocus}; last() = ${windowFocus.last()}`)
windows[windowFocus.last()].forEach(it => {
if (it.isHighlighted) { // double input processing without this? wtf?!
it.processInput(event)