Split into category packages; module github.com/ZacharyZhang-NY/MujicaUI

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 16:18:48 -04:00
1 parent 5a7e921c7e
commit 22b53e9e9e
1822 files changed
+24568 -21314

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
package overlay
import (
"time"
"github.com/egoist/mygo/ui"
)
// overlayUntil draws frames until cond holds, for at most 5 s of wall time.
func overlayUntil(tt *ui.Tester, cond func() bool) bool {
end := time.Now().Add(5 * time.Second)
for !cond() {
if time.Now().After(end) {
return false
}
time.Sleep(2 * time.Millisecond)
tt.Frame()
}
return true
}