Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,435 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problem with non-rectangle button #245959
01/12/09 20:00
01/12/09 20:00
Joined: Jan 2009
Posts: 9
Russia
O
Olorin Offline OP
Newbie
Olorin  Offline OP
Newbie
O

Joined: Jan 2009
Posts: 9
Russia
Hello. I need to create a button of the triangular form. I have made such panel with button:

PANEL* m_pan =
{bmap = "panel.pcx";
button (10, 80, "btn_On.pcx", "btn_of.pcx", "btn_over.pcx", On_Click, NULL, NULL);
flags = OVERLAY | VISIBLE;}

I created a button texture. The texture is rectangle. The area out of a triangle which should not be visible I has made black. The button correctly is displayed in program. But the button reacts not only to pressing mouse in a triangle, but also round a triangle, within all texture of the button (visible+invisible part of button texture). Is it possible to make so the button would react only on mouse click in a visible part?

Re: Problem with non-rectangle button [Re: Olorin] #245968
01/12/09 20:28
01/12/09 20:28
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
from manual: "Free-form buttons can be used when the button function retrieves the pixel at the mouse position through pixel_for_bmap(), and uses the pixel color or alpha value to determine whether the button was hit or not."

under panel->panel elements->buttons - remarks



Ubi bene, ibi Patria.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1