io/pointer: add forth and fifth buttons

Signed-off-by: Marc <marc.leroy@samantree.com>
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Marc
2025-05-27 10:33:22 +02:00
committed by Elias Naur
parent 1a17e9ea37
commit 0eac4f2c6a
+12
View File
@@ -219,6 +219,12 @@ const (
ButtonSecondary
// ButtonTertiary is the tertiary button, usually the middle button.
ButtonTertiary
// ButtonQuaternary is the fourth button, usually used for browser
// navigation (back)
ButtonQuaternary
// ButtonQuinary is the fifth button, usually used for browser
// navigation (forward)
ButtonQuinary
)
func (s ScrollRange) Union(s2 ScrollRange) ScrollRange {
@@ -326,6 +332,12 @@ func (b Buttons) String() string {
if b.Contain(ButtonTertiary) {
strs = append(strs, "ButtonTertiary")
}
if b.Contain(ButtonQuaternary) {
strs = append(strs, "ButtonQuaternary")
}
if b.Contain(ButtonQuinary) {
strs = append(strs, "ButtonQuinary")
}
return strings.Join(strs, "|")
}