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

Function ClickedOutRect

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

Source from the content-addressed store, hash-verified

253}
254
255func ClickedOutRect(rect *sdl.FRect, worldSpace bool) bool {
256 if worldSpace && !globals.Mouse.OverGUI {
257 return globals.Mouse.Button(sdl.BUTTON_LEFT).Pressed() && !globals.Mouse.WorldPosition().Inside(rect)
258 }
259 return globals.Mouse.Button(sdl.BUTTON_LEFT).Pressed() && !globals.Mouse.Position().Inside(rect)
260}
261
262type CorrectingRect struct {
263 X1, Y1, X2, Y2 float32

Callers 1

UpdateMethod · 0.85

Calls 5

ButtonMethod · 0.80
InsideMethod · 0.80
WorldPositionMethod · 0.80
PressedMethod · 0.45
PositionMethod · 0.45

Tested by

no test coverage detected