StartEditing begins inline editing of the selected string value.
()
| 103 | |
| 104 | // StartEditing begins inline editing of the selected string value. |
| 105 | func (s *SettingsOverlay) StartEditing() { |
| 106 | if s.selectedIndex < len(s.items) && s.items[s.selectedIndex].Type == SettingsItemString { |
| 107 | s.editing = true |
| 108 | s.editBuffer = s.items[s.selectedIndex].StringVal |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | // ConfirmEdit saves the edit buffer to the selected item. |
| 113 | func (s *SettingsOverlay) ConfirmEdit() { |
no outgoing calls