@@ -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的显示
|
||||
|
||||
+8
-8
@@ -12,10 +12,10 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t x;
|
||||
uint16_t y;
|
||||
uint16_t width;
|
||||
uint16_t high;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int high;
|
||||
COLOR_16 background;
|
||||
char title[16];
|
||||
uint8_t refresh_windows_flag;
|
||||
@@ -35,10 +35,10 @@ typedef struct windows_stack
|
||||
typedef struct
|
||||
{
|
||||
COLOR_16 background;
|
||||
uint16_t x;
|
||||
uint16_t y;
|
||||
uint16_t width;
|
||||
uint16_t high;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int high;
|
||||
windows_stack *windows;
|
||||
windows_stack *last_windows;
|
||||
window *moveed_windwos;//¼Ç¼ÕýÔÚ±»Òƶ¯µÄ´°¿Ú
|
||||
|
||||
Reference in New Issue
Block a user