Example #1
0
// ScreenScale returns the current screen scale.
//
// If Run is not called, this returns 0.
//
// This function is concurrent-safe.
func ScreenScale() float64 {
	return ui.ScreenScale()
}
Example #2
0
func (t touch) Position() (int, int) {
	// TODO: Is this OK to adjust the position here?
	return int(float64(t.position.x) / ui.ScreenScale()),
		int(float64(t.position.y) / ui.ScreenScale())
}