Commit Graph
8 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 759ca7f055 WorldTileRectangle/Size
Adds a custom sized type for the world tile rectagle.

This allows us to better express intent.
It also allows us to make certain globals smaller, e.g. `THEME_LOC`.
2022-10-16 03:53:26 +01:00
ephphatha c68fcf3cb1 Apply MethodCase config to Rectangle::Contains
Also included Circle and VirtualButton classes due to the shared use.
2022-06-24 00:39:55 +02:00
Andrew James 13a3424ff0 Add helpers for creating/using Rectangles in UI contexts (#4734)
* Add MakeRectangle helper to convert from SDL_Rect

* Add Rectangle::inset method for shrinking a rectangle

Turns out some of the other use cases I though this could apply to were actually doing something based on a fixed region

* Simplify initialisation of settings menu rects
2022-06-19 15:18:48 +02:00
ephphathaandGleb Mazovetskiy c4c664c6be Add class to allow iterating over all points in a rectangle
Co-authored-by: Gleb Mazovetskiy <[email protected]>
2022-01-19 03:05:27 +01:00
Juliano Leal Goncalves f90d3239e5 ✨ Add 'Center()' method on 'Rectangle' 2021-08-30 06:45:51 +02:00
Gleb Mazovetskiy 3faeb5628a Fix Rectangle::Contains bounds check 2021-07-03 09:09:48 +01:00
Juliano Leal Goncalves d93e1fdf07 ✨ Add 'Contains' function for 'Rectangle'
This will be useful for various bound checks throughout the code.
2021-06-27 16:37:20 +02:00
Gleb Mazovetskiy 1bc9c3973f 🚚 engine.h: Extract Rectangle 2021-06-21 02:34:28 -07:00