diff --git a/hrp/internal/version/VERSION b/hrp/internal/version/VERSION index 57dde1ca..44b4ae6d 100644 --- a/hrp/internal/version/VERSION +++ b/hrp/internal/version/VERSION @@ -1 +1 @@ -v5.0.0+2411232210 +v5.0.0+2412021645 diff --git a/hrp/pkg/uixt/ai.go b/hrp/pkg/uixt/ai.go index ff63f4c5..613dfc18 100644 --- a/hrp/pkg/uixt/ai.go +++ b/hrp/pkg/uixt/ai.go @@ -71,6 +71,13 @@ type OCRText struct { Rect image.Rectangle } +func (t OCRText) Size() Size { + return Size{ + Width: t.Rect.Dx(), + Height: t.Rect.Dy(), + } +} + func (t OCRText) Center() PointF { return getRectangleCenterPoint(t.Rect) } diff --git a/hrp/pkg/uixt/swipe.go b/hrp/pkg/uixt/swipe.go index 61c00ef6..af0bf98c 100644 --- a/hrp/pkg/uixt/swipe.go +++ b/hrp/pkg/uixt/swipe.go @@ -68,7 +68,7 @@ func (dExt *DriverExt) LoopUntil(findAction, findCondition, foundAction Action, for i := 0; i < maxRetryTimes; i++ { // wait interval between each findAction - time.Sleep(time.Duration(1000*interval) * time.Millisecond) + time.Sleep(time.Duration(interval) * time.Second) if err := findCondition(dExt); err == nil { // do action after found