Closed Fantoom closed 1 year ago
I am not against that, but why would we need that, provided the game window is resizeable?
By default it is 1200x800 and when I start it, the window edges are out of my screen. I can not resize :)
Win+Arrows
should make it manageable.1) I will try it, but I think, that many people do not know about it 2) What default value do you suggest?
max theSizeWeWant userScreenSize
Ok, Win+Arrows
helped me, but I still think, that we should provide some way for that
max theSizeWeWant userScreenSize
What these values are? Is userScreenSize
the acutal size of user's screen or the size user provided (as argument or whatever)? And what value for theSizeWeWant
do we want? A predefined constant?
theSizeWeWant
is the default, 1200×1600 or whatever.
userScreenSize
is the actual size of the screen we'll show our window on, we should investigate how to get that on Raylib's windowing system.
For userScreenSize
, see Raylib's GetMonitorWidth(int)
and such.
max theSizeWeWant userScreenSize
are you sure that we want the max? If the user has a lower resolution, the window will go out of the screen bounds
Ah, yeah, we want min
actually, sorry for the confusion.
and what about GetScreenWidth(void)
and GetScreenHeight(void)
?
This is dubious: which screen do they use? Will it be the screen the game window is on?
https://www.raylib.com/cheatsheet/cheatsheet.html
//Get current screen width
"The current screen" is not a very definitive term, is it?
Is int GetCurrentMonitor(void); // Get current connected monitor
more definitive? I don't think so :)
Of course it is! It literally gives a definition for what is "the current monitor". It is the one returned by GetCurrentMonitor
. Which we can read the sources to know more 😅
I have read sources and found out that GetScreenWidth
returns CORE.Window.screen.width
which is the width of used render area
. So we need GetCurrentMonitor
I think that we need a way to set screen width and height. We can do it as command line argument (--width and --height)