Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 02:32
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, kzhao, qin), 21,501 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 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