mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[Update] Epsilon master
This commit is contained in:
@@ -175,9 +175,8 @@ Event getPlatformEvent() {
|
||||
while (SDL_PollEvent(&event)) {
|
||||
// The while is important: it'll do a fast-pass over all useless SDL events
|
||||
if (event.type == SDL_WINDOWEVENT) {
|
||||
if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
|
||||
Ion::Simulator::Main::relayout();
|
||||
}
|
||||
Ion::Simulator::Main::relayout();
|
||||
break;
|
||||
}
|
||||
if (event.type == SDL_QUIT) {
|
||||
result = Termination;
|
||||
|
||||
@@ -11,7 +11,7 @@ static constexpr float X(int x) { return static_cast<float>(x)/static_cast<float
|
||||
static constexpr float Y(int y) { return static_cast<float>(y)/static_cast<float>(backgroundHeight); }
|
||||
|
||||
static constexpr SDL_FRect areaOfInterest = {X(110), Y(30), X(940), Y(2150)};
|
||||
static constexpr SDL_FRect screenRect = {X(192), Y(191), X(779), Y(582)};
|
||||
static constexpr SDL_FRect screenRect = {X(192), Y(191), X(776), Y(582)};
|
||||
|
||||
static SDL_Rect sFrame;
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ void init() {
|
||||
"Omega",
|
||||
SDL_WINDOWPOS_CENTERED,
|
||||
SDL_WINDOWPOS_CENTERED,
|
||||
290, 555,
|
||||
458, 888,
|
||||
sdl_window_args
|
||||
);
|
||||
}
|
||||
@@ -153,11 +153,6 @@ void relayout() {
|
||||
sScreenRect.y = (windowHeight - sScreenRect.h) / 2;
|
||||
} else {
|
||||
Layout::recompute(windowWidth, windowHeight);
|
||||
SDL_Rect backgroundRect;
|
||||
Layout::getBackgroundRect(&backgroundRect);
|
||||
|
||||
SDL_RenderCopy(sRenderer, sBackgroundTexture, nullptr, &backgroundRect);
|
||||
SDL_RenderPresent(sRenderer);
|
||||
}
|
||||
|
||||
setNeedsRefresh();
|
||||
|
||||
Reference in New Issue
Block a user