tranleduy2000 / pascalnide

Pascal Compiler for Android
92 stars 25 forks source link

[CRT unit] ScreenWidth and ScreenHeight functions are missing #4

Closed pakLebah closed 7 years ago

pakLebah commented 7 years ago

In CRT unit, ScreenWidth() and ScreenHeight() functions are missing. Both functions return console's screen width and height respectively, in character. The compiler already has had this information shown after compilation. So, it's just a matter of exposing them into these appropriate functions.

In the old CRT unit, both are constants taken from the OS configuration. But as we are on mobile, they should be function because we need them from the OS dynamically i.e. screen orientation change on runtime. They're similar to getMaxX() and getMaxY() functions in the Graph unit.

tranleduy2000 commented 7 years ago

I added ScreenWidth and ScreenHeight function in version 4.4.0 https://github.com/tranleduy2000/pascalnide/releases/tag/v4.0.0