Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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 | chip programmers | 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