Adding modding folder with a hacked build.

This commit is contained in:
ml
2026-09-26 08:53:08 +02:00
parent cdb960dc71
commit c91080aba7
755 changed files with 50424 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
package input
// Modifier is a collection of currently pressed modifier keys.
type Modifier uint32
// Constants for common modifier.
const (
ModNone = Modifier(0x00000000)
ModShift = Modifier(0x00000001)
ModControl = Modifier(0x00000002)
ModAlt = Modifier(0x00000004)
ModSuper = Modifier(0x00000008)
)
// IsClear returns true if nothing is set.
func (mod Modifier) IsClear() bool {
return mod == ModNone
}
// With returns a combination of this modifier and the given one.
func (mod Modifier) With(other Modifier) Modifier {
return Modifier(uint32(mod) | uint32(other))
}
// Without returns the result of this modifier without the given one.
func (mod Modifier) Without(other Modifier) Modifier {
return Modifier(uint32(mod) & ^uint32(other))
}
// Has returns true if the given modifier is included in this set.
// This modifier can have more keys set than the requested and still return true.
func (mod Modifier) Has(other Modifier) bool {
return (uint32(mod) | uint32(other)) == uint32(mod)
}