mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-08 08:12:57 +12:00
Better screen layout support
This commit is contained in:
parent
1c0f65c740
commit
cf321b1ed8
17 changed files with 328 additions and 186 deletions
|
@ -3,7 +3,7 @@
|
|||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#include "PICA/screen_layout.hpp"
|
||||
#include "screen_layout.hpp"
|
||||
#include "gl/context.h"
|
||||
#include "window_info.h"
|
||||
|
||||
|
@ -33,6 +33,11 @@ class ScreenWidget : public QWidget {
|
|||
// Coordinates (x/y/width/height) for the two screens in window space, used for properly handling touchscreen regardless
|
||||
// of layout or resizing
|
||||
ScreenLayout::WindowCoordinates screenCoordinates;
|
||||
// Screen layouts and sizes
|
||||
ScreenLayout::Layout screenLayout = ScreenLayout::Layout::Default;
|
||||
float topScreenSize = 0.5f;
|
||||
|
||||
void reloadScreenLayout(ScreenLayout::Layout newLayout, float newTopScreenSize);
|
||||
|
||||
private:
|
||||
std::unique_ptr<GL::Context> glContext = nullptr;
|
||||
|
@ -44,4 +49,6 @@ class ScreenWidget : public QWidget {
|
|||
int scaledWindowWidth() const;
|
||||
int scaledWindowHeight() const;
|
||||
std::optional<WindowInfo> getWindowInfo();
|
||||
|
||||
void reloadScreenCoordinates();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue