MCPcopy Create free account
hub / github.com/SolarLune/masterplan / RawClickedInRect

Function RawClickedInRect

utils.go:248–253  ·  view source on GitHub ↗
(rect *sdl.FRect, worldSpace bool)

Source from the content-addressed store, hash-verified

246}
247
248func RawClickedInRect(rect *sdl.FRect, worldSpace bool) bool {
249 if worldSpace && !globals.Mouse.OverGUI {
250 return globals.Mouse.Button(sdl.BUTTON_LEFT).Pressed() && globals.Mouse.RawWorldPosition().Inside(rect)
251 }
252 return globals.Mouse.Button(sdl.BUTTON_LEFT).Pressed() && globals.Mouse.RawPosition().Inside(rect)
253}
254
255func ClickedOutRect(rect *sdl.FRect, worldSpace bool) bool {
256 if worldSpace && !globals.Mouse.OverGUI {

Callers 1

ImmediateIconButtonFunction · 0.85

Calls 5

ButtonMethod · 0.80
InsideMethod · 0.80
RawWorldPositionMethod · 0.80
RawPositionMethod · 0.80
PressedMethod · 0.45

Tested by

no test coverage detected