Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (AndrewAMD, Grant, valino), 3,361 guests, and 13 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 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