Notifications for recording.

This commit is contained in:
Storm Dragon
2026-05-15 20:56:46 -04:00
parent 81a928e122
commit eef7454c0f
5 changed files with 107 additions and 8 deletions
+20
View File
@@ -115,6 +115,14 @@ func (b *Barnard) OnVoiceEffectCycle(ui *uiterm.Ui, key uiterm.Key) {
}
func (b *Barnard) UpdateGeneralStatus(text string, notice bool) {
b.statusText = text
b.statusNotice = notice
b.renderGeneralStatus()
}
func (b *Barnard) renderGeneralStatus() {
text := b.statusText
notice := b.statusNotice
if notice {
b.UiStatus.Fg = uiterm.ColorWhite | uiterm.AttrBold
b.UiStatus.Bg = uiterm.ColorRed
@@ -122,6 +130,16 @@ func (b *Barnard) UpdateGeneralStatus(text string, notice bool) {
b.UiStatus.Fg = uiterm.ColorBlack
b.UiStatus.Bg = uiterm.ColorWhite
}
if b.isRecordingActive() {
switch strings.TrimSpace(text) {
case "Idle":
text = " Idle Rec "
case "Tx":
text = " Tx Rec "
case "File":
text = " File Rec "
}
}
b.UiStatus.Text = text
b.Ui.Refresh()
}
@@ -423,6 +441,8 @@ func (b *Barnard) OnUiInitialize(ui *uiterm.Ui) {
Fg: uiterm.ColorBlack,
Bg: uiterm.ColorWhite,
}
b.statusText = b.UiStatus.Text
b.statusNotice = false
ui.Add(uiViewStatus, &b.UiStatus)
b.UiInput = uiterm.Textbox{