Open_popup() fix dropdown outside of the screen
This commit is contained in:
parent
ea7fdb1927
commit
6e6f8ca3f4
@ -2301,6 +2301,11 @@ void Open_popup(word x_pos, word y_pos, word width,word height)
|
|||||||
{
|
{
|
||||||
Windows_open++;
|
Windows_open++;
|
||||||
|
|
||||||
|
if (height > Screen_height)
|
||||||
|
height = Screen_height;
|
||||||
|
if (y_pos + height > Screen_height) // fix dropdown that would get bellow the screen
|
||||||
|
y_pos = Screen_height - height;
|
||||||
|
|
||||||
Window_width=width;
|
Window_width=width;
|
||||||
Window_height=height;
|
Window_height=height;
|
||||||
Window_pos_X=x_pos;
|
Window_pos_X=x_pos;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user