You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though the window calls UiContext.registerItem(id, windowArea, passive = true), this only stops the input if the window is defined first, as in:
onTop(window(...))
button(...)
However, it's much more natural to do the opposite:
button(...)
window(...)
While I think it should be possible to address the button click, the hot button is unfixable with the current model (as, by the time the window code runs, the button already decided that it's hot).
One alternative that can be explored is to delay everything by one frame, namely:
The UiContext keeps both the hot/active/selected state and a scratch state
registerItem updates the scratch state and returns the ItemStatus based on the current state
Before the next frame, the UiContext updates the state with the content of the scratch
It's possible that I'm missing some obvious issue with this approach, but I think with this the components would never see invalid intermediate values of InputStatus.
The text was updated successfully, but these errors were encountered:
Imagine a situation like this
Even though the window calls
UiContext.registerItem(id, windowArea, passive = true)
, this only stops the input if the window is defined first, as in:However, it's much more natural to do the opposite:
While I think it should be possible to address the button click, the hot button is unfixable with the current model (as, by the time the window code runs, the button already decided that it's hot).
One alternative that can be explored is to delay everything by one frame, namely:
UiContext
keeps both the hot/active/selected state and a scratch stateregisterItem
updates the scratch state and returns theItemStatus
based on the current stateUiContext
updates the state with the content of the scratchIt's possible that I'm missing some obvious issue with this approach, but I think with this the components would never see invalid intermediate values of
InputStatus
.The text was updated successfully, but these errors were encountered: