窗口位置限制

Signed-off-by: fong <wuwenfengmi@outlook.com>
This commit is contained in:
fong
2024-01-01 02:31:28 +08:00
parent 42092b6422
commit 616b596fb7
5 changed files with 6224 additions and 6190 deletions
+7
View File
@@ -424,6 +424,13 @@ void UI_Server(UI *ui)
temp_window=ui->moveed_windwos;
temp_window->x=(t_x-ui->move_x);
temp_window->y=(t_y-ui->move_y);
if(temp_window->x<0){temp_window->x=0;}
if(temp_window->y<0){temp_window->y=0;}
if(temp_window->x+temp_window->width>320){temp_window->x=320-temp_window->width;}
if(temp_window->y+temp_window->high>240){temp_window->y=240-temp_window->high;}
temp_window->refresh_windows_flag=1;
ui->refresh_ui_flag=1;
//发生了变化 刷新ui的显示