@@ -76,6 +76,7 @@ window *New_Window(UI *ui,uint16_t x,uint16_t y,uint16_t width,uint16_t high,COL
|
||||
temp_window->x=x;
|
||||
temp_window->y=y;
|
||||
temp_window->refresh_windows_flag=2;
|
||||
temp_window->touch_flag=0;
|
||||
for(int a=0;a<16;a++)
|
||||
{
|
||||
temp_window->title[a]=title[a];
|
||||
@@ -371,6 +372,10 @@ void UI_Server(UI *ui)
|
||||
hit_flag=Chack(temp_window,t_x,t_y); //检查触摸是否命中 直接返回命中窗口的位置
|
||||
if(hit_flag) // 命中继续
|
||||
{
|
||||
|
||||
temp_window->touch_flag=1;
|
||||
temp_window->touch_x=t_x;
|
||||
temp_window->touch_y=t_y;
|
||||
if(temp_windows_stack!=ui->last_windows) //检查是否最前端的窗口 如果不是就放最前面
|
||||
{
|
||||
if(temp_windows_stack!=ui->windows) //检查是否最后端的窗口 因为显示是从最后端往前显示的 所以ui有最后端窗口的入口
|
||||
@@ -387,6 +392,7 @@ void UI_Server(UI *ui)
|
||||
ui->last_windows->next=temp_windows_stack; //原来的最后一个指向现在的最后一个
|
||||
ui->last_windows=temp_windows_stack; //更新ui中的最后一个的入口
|
||||
ui->refresh_ui_flag=1; //发生了变化 刷新ui的显示
|
||||
temp_window->refresh_windows_flag=1;
|
||||
}
|
||||
|
||||
//检查标中窗口的什么位置
|
||||
@@ -410,6 +416,10 @@ void UI_Server(UI *ui)
|
||||
|
||||
|
||||
flag=0; //结束扫描 防止穿透当前窗口
|
||||
}else
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
temp_windows_stack=temp_windows_stack->up; //往前扫描
|
||||
}else
|
||||
|
||||
Reference in New Issue
Block a user