mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-11 07:14:04 +09:00
fixed window highlight inconsistency
This commit is contained in:
@@ -498,9 +498,18 @@ function drawTitle() {
|
|||||||
|
|
||||||
|
|
||||||
function drawFilePanel() {
|
function drawFilePanel() {
|
||||||
windows[0].forEach((panel, i)=>{
|
// set highlight status
|
||||||
panel.isHighlighted = (i == 2 * windowMode)
|
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) {
|
if (windowMode) {
|
||||||
RIGHTPANEL.drawContents()
|
RIGHTPANEL.drawContents()
|
||||||
RIGHTPANEL.drawFrame()
|
RIGHTPANEL.drawFrame()
|
||||||
@@ -571,8 +580,6 @@ while (!exit) {
|
|||||||
firstRunLatch = false
|
firstRunLatch = false
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
serial.println(`current windowFocus: ${windowFocus}; last() = ${windowFocus.last()}`)
|
|
||||||
|
|
||||||
windows[windowFocus.last()].forEach(it => {
|
windows[windowFocus.last()].forEach(it => {
|
||||||
if (it.isHighlighted) { // double input processing without this? wtf?!
|
if (it.isHighlighted) { // double input processing without this? wtf?!
|
||||||
it.processInput(event)
|
it.processInput(event)
|
||||||
|
|||||||
Reference in New Issue
Block a user