Skip to content

Commit 44180ef

Browse files
committed
Changed the visibility of a method that might be useful to users.
1 parent cbb9e91 commit 44180ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

input_menu.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func GetSelectionFromHorizontalMenuByIndex(layerAlias string, styleEntry memory.
312312
}
313313

314314
/*
315-
drawVerticalMenu allows you to obtain a user selection from a horizontal menu.
315+
DrawVerticalMenu allows you to obtain a user selection from a horizontal menu.
316316
In addition, the following information should be noted:
317317
318318
- If the location to draw a menu item falls outside of the range of the text
@@ -322,7 +322,7 @@ layer, then only the visible portion of your menu item will be drawn.
322322
drawn. This is useful for menus sizes which are significantly larger than
323323
the visible display area allocated for the menu.
324324
*/
325-
func drawVerticalMenu(layerAlias string, styleEntry memory.TuiStyleEntryType, selectionEntry memory.SelectionEntryType, xLocation int, yLocation int, menuWidth int, menuHeight int, viewportPosition int, itemSelected int) {
325+
func DrawVerticalMenu(layerAlias string, styleEntry memory.TuiStyleEntryType, selectionEntry memory.SelectionEntryType, xLocation int, yLocation int, menuWidth int, menuHeight int, viewportPosition int, itemSelected int) {
326326
layerEntry := memory.GetLayer(layerAlias)
327327
menuAttributeEntry := memory.NewAttributeEntry()
328328
menuAttributeEntry.ForegroundColor = styleEntry.MenuForegroundColor
@@ -382,7 +382,7 @@ func GetSelectionFromVerticalMenuByIndex(layerAlias string, styleEntry memory.Tu
382382
if defaultItemSelected < 0 || defaultItemSelected >= len(selectionEntry.SelectionValue) {
383383
panic(fmt.Sprintf("The specified default item selected of '%d' is invalid for a selection range of 0 to %d!", defaultItemSelected, len(selectionEntry.SelectionValue)))
384384
}
385-
drawVerticalMenu(layerAlias, styleEntry, selectionEntry, xLocation, yLocation, menuWidth, menuHeight, viewportPosition, selectedItem)
385+
DrawVerticalMenu(layerAlias, styleEntry, selectionEntry, xLocation, yLocation, menuWidth, menuHeight, viewportPosition, selectedItem)
386386
UpdateDisplay()
387387
for isItemSelected == false {
388388
currentKeyPressed := Inkey()
@@ -434,7 +434,7 @@ func GetSelectionFromVerticalMenuByIndex(layerAlias string, styleEntry memory.Tu
434434
if selectedItem >= len(selectionEntry.SelectionValue) {
435435
selectedItem = len(selectionEntry.SelectionValue) - 1
436436
}
437-
drawVerticalMenu(layerAlias, styleEntry, selectionEntry, xLocation, yLocation, menuWidth, menuHeight, viewportPosition, selectedItem)
437+
DrawVerticalMenu(layerAlias, styleEntry, selectionEntry, xLocation, yLocation, menuWidth, menuHeight, viewportPosition, selectedItem)
438438
UpdateDisplay()
439439
previouslySelectedItem = selectedItem
440440
}

0 commit comments

Comments
 (0)