D4D clear screen

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

D4D clear screen

1,067 次查看
shany
Contributor II

Hello,

I'm working with D4D eGUI on coldfire V1 mcu.

I don't understand how to clear the displayed features? 

When I'm switching screens - I'm using the function d4d_ActivateScreen and than the d4d_Poll() draws it.

The problem is that the old screen's fetures are not removed so both screens are displayed.

Is there a clear screen command?

How can I generate an empty screen ?

Thanks,

Shany 

标签 (1)
标记 (1)
0 项奖励
5 回复数

668 次查看
LuisCasado
NXP Employee
NXP Employee

Hello,

 

I understand that in your application, the new screen is smaller than the prevoius active screen, right? In normal applications when you activate a new smaller screen is because it will be a pop-up screen and you don't want to remove the contents on the previous active screen and in the case you want to redraw all in the new screen, you can use the full size LCD for the new screen.

I hope this helps.

 

 

Best Regards,

 

Luis

0 项奖励

668 次查看
shany
Contributor II

Hello,

I'm not sure I understand - when I draw "new" objects from one screen when "old" objects still exist on the display - they are both displayed on screen - the old ones are not removed. I tried to generate an empty screen on the full scale of the LCD - but it didn't erase the old objects. 

I'm attaching here 2 files of 2 different screens - can you please tell me how to switch between them?

Thanks alot,

Shany

     

0 项奖励

668 次查看
shany
Contributor II

Here is the second file...

0 项奖励

668 次查看
LuisCasado
NXP Employee
NXP Employee

Hello,

 

First, you don't need call D4D_ShowObject( &xxxx); in onActivate if the show property is not changing, but ina any case that is not the issue.

 

I guess, you are calling the function D4D_Init(&scr_home);  to activate the Home screen in the init code of your application. That is the active screen now.

 

In the scr_home objects you need to include the code to switch to the new screen, for example, in a callback button function, you could have:

 

//Buttons Keyboard Callback
static void OnClick_Btn_Keyboard(D4D_OBJECT* pThis)
{
 if(pThis==&butn_3L)
 {
          D4D_ActivateScreen(&scr_Place, D4D_FALSE); 
 }

}

 

Then, now the active screen is scr_Place, libray will take care ot redraw the new screen and hide the old objects .

scr_Place will need some event to go back to the previous screen, for example a button:

 

        if(pThis==&btn_end)
        {
         D4D_EscapeScreen();
        }

In your code I don't see any D4D_ActivateScreen or D4D_EscapeScreen

 

I assume, you have the screens with background color enabled or some bitmap. In the eGUI demos, you will see for example that Menu window hide the objects  behind the Menu window.

 

Best Regards,

 

Luis 

 

 

 

 

668 次查看
shany
Contributor II

Hello,

I apologize it took me this long to respond - I was sick...

I'm calling  the activate and escape functions in my main function - does it matter?

Do I have to call them from the screen's objects themselves?

 

Thanks alot,

Shany  

 

0 项奖励