Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, ozgur), 1,415 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Buttons not reacting #213324
06/27/08 03:19
06/27/08 03:19
Joined: Apr 2004
Posts: 23
B
BOK Offline OP
Newbie
BOK  Offline OP
Newbie
B

Joined: Apr 2004
Posts: 23
So I'm having a bit of a problem trying to make the main menu for my game. For some reason, the buttons won't react at all to the mouse. They react and work perfectly in the pause menu, but the exact same code doesn't work in the main menu.

The way I have the main menu set up is a single panel with a background image that takes up the entire screen. The buttons are positioned within this large panel. I use the same method for the pause menu, which works (the background doesn't take up the whole screen in the pause panel though). Also, it made no difference when I tried to move the buttons to a separate panel. There are currently no other panels displayed when the main menu is displayed, and its layer is the highest of any panel in the game.

I once tried using the in-game debug command line to display the main menu during the middle of the game. Oddly, it worked perfectly.

Does anyone have any ideas? I'm at a complete loss here.

Re: Buttons not reacting [Re: BOK] #213328
06/27/08 04:26
06/27/08 04:26
Joined: Jun 2008
Posts: 19
H
halfpint Offline
Newbie
halfpint  Offline
Newbie
H

Joined: Jun 2008
Posts: 19
im pretty new to c-script but i know that what you have said is very vague and maybe showing us the code or something more then that will help.

I have made a working menu already so i can probably help you out.

Re: Buttons not reacting [Re: halfpint] #213330
06/27/08 05:16
06/27/08 05:16
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Quoting BOK.
Quote:
(the background doesn't take up the whole screen in the pause panel though)

1. make sure version supports selected resolution
2. try setting main menu image to image of same size as pause menu
3. check mouse mode
4. change declared flags for panel

Re: Buttons not reacting [Re: halfpint] #213331
06/27/08 05:17
06/27/08 05:17
Joined: Apr 2004
Posts: 23
B
BOK Offline OP
Newbie
BOK  Offline OP
Newbie
B

Joined: Apr 2004
Posts: 23
Sorry if I was vague. There's just not much more to it- the buttons don't work. They won't change their bitmaps or execute functions on hover or click. Here's the code for the main menu panel with a single button:

Code:
panel main_menu{
	pos_x=0;
	pos_y=0;

	bmap=mainmenuback;
	alpha=0; //will be faded in later
	layer=950;

	button(400,400,button_start,button_start,button_start2,init_level,null,null);

	flags=refresh,translucent;
}


That's basically it, I think. If there's any other code you think would be helpful to see, let me know. Thanks.


EDIT: That's it! It was the mouse mode. I set the mouse mode in the init_level function, which would be executed by the start button in the menu. Thanks, testDummy! I was pulling my hair out for over an hour trying to solve this... I knew it was going to be something stupid on my part smile

Last edited by BOK; 06/27/08 05:26.
Re: Buttons not reacting [Re: BOK] #213351
06/27/08 08:45
06/27/08 08:45
Joined: Jun 2008
Posts: 19
H
halfpint Offline
Newbie
halfpint  Offline
Newbie
H

Joined: Jun 2008
Posts: 19
well at least you were able to fix it...

Re: Buttons not reacting [Re: BOK] #213539
06/28/08 19:39
06/28/08 19:39
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline
Senior Member
xbox  Offline
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
@BOK, i couldn't help but notice that one line of code reads "alpha = 0; //to be faded in later". I have been trying to get the fading part to work for about a month now, Have you had any luck with this?

Re: Buttons not reacting [Re: xbox] #213540
06/28/08 19:42
06/28/08 19:42
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
xbox are you trying to fade the panel or create like a black fade in to different menus etc. I built one like this ages ago...i'll try and find it...

Last edited by DJBMASTER; 06/28/08 19:42.
Re: Buttons not reacting [Re: DJBMASTER] #213572
06/29/08 04:23
06/29/08 04:23
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline
Senior Member
xbox  Offline
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
i'm trying to fade a black based panel away to a completely black screen for a second or two, then fade back into a menu that is also based on a black background. If you would like some screen shots of what i am trying to do, just let me know.


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