Jump to content

Need a Completely Transparent Button


wctltya

Recommended Posts

The goal is to have an area of the screen working as a button, but displaying whatever was there.

I've the following scenario:

A page, lets call it HomePage, which covers the whole screen. Then I've a second page, lets call it MenuPage, which covers a part of the screen. So, while MenuPage is displayed, I would like to have the remaining area still displaying the part of the previous HomePage and reacting as a button.

For the button draw function, I'm using Kings2's trick: 

but, seems that gwinHide(ghHomePage) clears the screen. I've tried to not hide it, but it doesn't behaves as expected, the remaining area still cleared.

Joel, inmarket, or someone else, could you please advice me how to do it?

Link to comment
Share on other sites

Seems, I found a solution my self. Using the above page names:

- The MenuPage container must be transparent, i.e. wi.customDraw = gwinContainerDraw_Transparent;

- The previous page (HomePage) must not be hidden before displaying the MenuPage, i.e. don't invoke gwinHide(ghHomePage);

- The button must used custom draw clean, the kings2's trick, i.e. wi.customDraw = gwinButtonDraw_Clean;

- Mightbe needed to hide both pages before displaying a third one.

It works.

Edited by wctltya
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...