mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 14:51:48 +01:00
Update Screen system
Added FuelScreen (Working buttons) Added SellScreen (Nothing working)
This commit is contained in:
@@ -705,6 +705,17 @@ Point2f utils::GetMousePos() {
|
||||
//TODO: make the screen size a global or something
|
||||
return Point2f { float(x), float(500.f - y) };
|
||||
}
|
||||
bool utils::IsMouseButtonDown(int button) {
|
||||
const Uint32 pStates = SDL_GetMouseState(nullptr, nullptr);
|
||||
if (pStates & SDL_BUTTON(button)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
static Point2f ViewportSize{ 900.f, 500.f }; //TODO: somehow move this (Ask teacher)
|
||||
Point2f utils::GetViewport() {
|
||||
return ViewportSize;
|
||||
}
|
||||
|
||||
bool utils::isMouseDown(int button) {
|
||||
const Uint32 pStates = SDL_GetMouseState(nullptr, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user