[Update] Epsilon master

This commit is contained in:
Quentin Guidée
2020-07-02 19:07:29 +02:00
3 changed files with 4 additions and 10 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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();