trunk
vilmibm 2023-06-12 08:37:25 -07:00
parent 4ee66d876e
commit f8f5be36f7
2 changed files with 8 additions and 2 deletions

View File

@ -36,6 +36,7 @@ from focused node mode:
- e to edit node (subwindow with $EDITOR embedded) - e to edit node (subwindow with $EDITOR embedded)
- m to maximize node contents - m to maximize node contents
- hjkl to navigate the edges - hjkl to navigate the edges
- d to delete node
- enter to activate highlighted edge and go to connected node - enter to activate highlighted edge and go to connected node
the big open question to me is placement. i want to auto suggest a place for the big open question to me is placement. i want to auto suggest a place for

View File

@ -97,7 +97,13 @@ type Edge struct {
} }
func (e Edge) Draw(screen tcell.Screen) { func (e Edge) Draw(screen tcell.Screen) {
screen.SetContent(0, 0, '!', []rune{}, tcell.StyleDefault)
screen.SetContent(0, 0, tview.BoxDrawingsLightDiagonalUpperLeftToLowerRight, []rune{}, tcell.StyleDefault)
screen.SetContent(1, 1, tview.BoxDrawingsLightDiagonalUpperLeftToLowerRight, []rune{}, tcell.StyleDefault)
screen.SetContent(2, 2, tview.BoxDrawingsLightDiagonalUpperLeftToLowerRight, []rune{}, tcell.StyleDefault)
screen.SetContent(3, 3, tview.BoxDrawingsLightDiagonalUpperLeftToLowerRight, []rune{}, tcell.StyleDefault)
screen.SetContent(4, 4, tview.BoxDrawingsLightDiagonalUpperLeftToLowerRight, []rune{}, tcell.StyleDefault)
screen.SetContent(5, 5, tview.BoxDrawingsLightDiagonalUpperLeftToLowerRight, []rune{}, tcell.StyleDefault)
} }
func (e Edge) GetRect() (int, int, int, int) { func (e Edge) GetRect() (int, int, int, int) {
@ -183,7 +189,6 @@ func NewUI() *UI {
x += 20 x += 20
ui.Field.AddPage(fmt.Sprintf("%d", rand.Intn(10000)), b, false, true) ui.Field.AddPage(fmt.Sprintf("%d", rand.Intn(10000)), b, false, true)
} }
ui.Field.AddPage("edge", Edge{}, false, true) ui.Field.AddPage("edge", Edge{}, false, true)
app.SetBeforeDrawFunc(func(_ tcell.Screen) bool { app.SetBeforeDrawFunc(func(_ tcell.Screen) bool {