added Draw Function for expanded View
The Draw function is decided with the help of the InsidePlaylist boolean value.
This commit is contained in:
parent
1fa411fb1d
commit
e137dc6c1e
9
main.go
9
main.go
@ -36,6 +36,15 @@ func main() {
|
|||||||
Random, _ = strconv.ParseBool(_v["random"])
|
Random, _ = strconv.ParseBool(_v["random"])
|
||||||
Repeat, _ = strconv.ParseBool(_v["repeat"])
|
Repeat, _ = strconv.ParseBool(_v["repeat"])
|
||||||
|
|
||||||
|
UI.expandedView.SetDrawFunc(func(s tcell.Screen, x, y, width, height int) (int, int, int, int) {
|
||||||
|
if InsidePlaylist {
|
||||||
|
UpdatePlaylist(*conn, UI.expandedView)
|
||||||
|
} else {
|
||||||
|
Update(*conn, dirTree.children, UI.expandedView)
|
||||||
|
}
|
||||||
|
return UI.expandedView.GetInnerRect()
|
||||||
|
})
|
||||||
|
|
||||||
UI.expandedView.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey {
|
UI.expandedView.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey {
|
||||||
switch e.Rune() {
|
switch e.Rune() {
|
||||||
case 108: // L : Key
|
case 108: // L : Key
|
||||||
|
Loading…
Reference in New Issue
Block a user