ui icon indicating copy to clipboard operation
ui copied to clipboard

How to get *screen size* platform independence.

Open changrui opened this issue 4 years ago • 5 comments

I want to know the max screen width and max screen height under Android, IOS, Linux, Windows, MacOS, etc, anyone can help me? Thanks a lot.

changrui avatar Jan 25 '21 15:01 changrui

Actually you never want to know just max screen width and height (assuming millimeters). You additionally need to know either DPI (or alternatively number of pixels horizontally and number of pixels vertically). For explanation etc. see https://github.com/vurtun/nuklear/issues/283#issuecomment-271161978 (I'd strongly recommend reading the whole thread).

dumblob avatar Jan 25 '21 15:01 dumblob

And they should be implemented in gg.

ghost avatar Jan 25 '21 15:01 ghost

But I want to draw a fullscreen window for my app, I get gg.screen_size() function but no file of X11/Xlib.h, though I also install libXi-dev and mesa-common-dev package, why?

changrui avatar Jan 25 '21 15:01 changrui

You mean this? https://github.com/vlang/v/blob/master/vlib/gg/gg.v#L640

ghost avatar Jan 25 '21 15:01 ghost

OIC, not imple

You mean this? https://github.com/vlang/v/blob/master/vlib/gg/gg.v#L640

oh, I see, not yet.

changrui avatar Jan 25 '21 16:01 changrui