mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-12 23:54:04 +09:00
another try at tui
This commit is contained in:
35
assets/disk0/tvdos/tuidev/doc.md
Normal file
35
assets/disk0/tvdos/tuidev/doc.md
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
DATA STRUCTURE
|
||||
|
||||
```
|
||||
[
|
||||
[main Window Objects],
|
||||
[popup Window Objects]
|
||||
]
|
||||
```
|
||||
|
||||
Window Object
|
||||
|
||||
```javascript
|
||||
{
|
||||
"isFocused": false,
|
||||
"inputProcessor": (this, inputEvent) => { ... },
|
||||
"drawFrame": (this) => { ... },
|
||||
"drawContents": (this) => { ... },
|
||||
"width": 20,
|
||||
"height": 12,
|
||||
"x": 1,
|
||||
"y": 3,
|
||||
"title": undefined
|
||||
}
|
||||
```
|
||||
|
||||
BEHAVIOUR
|
||||
|
||||
1. Key event is parsed
|
||||
2. If key is Tab, move focus to the next Window Object within the current window
|
||||
3. If not, pass the event to the currently focused Window Object
|
||||
|
||||
No key combination will allow navigating between windows
|
||||
e.g. Tabbing on the question popup will just loop through the Ok/Cancel buttons, until the buttons are pressed.
|
||||
|
||||
Reference in New Issue
Block a user