Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Button problem #244691
01/06/09 10:43
01/06/09 10:43
Joined: Jan 2009
Posts: 5
S
SoulRyder Offline OP
Newbie
SoulRyder  Offline OP
Newbie
S

Joined: Jan 2009
Posts: 5
Hello,

Right now i'm doing the Lite-C Game Development workshops (http://www.conitec.net/litec/) I just arrived at workshop 6, but now i got a problem.

They tell me to run script06 file, but when i do this it should be possible to click on the Quit button, and it should change color while clicking or moving the mouse cursor over it.

Now the problem is, i can't click it, it doesn't change color while moving over or clicking on it. I didn't change anything in the code yet so that can't be the problem.

The code:

////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

////////////////////////////////////////////////////////////////////

function main()
{
video_mode = 7;
screen_color.blue = 150;
mouse_mode = 4;
}

function quit_program()
{
while (key_any) {wait (1);}
sys_exit(NULL);
}

//////////////////////////////////////////////////////////////////////

PANEL* main_pan =
{
bmap = "main.pcx";
pos_x = 250;
pos_y = 200;
button (250, 134, "quitclicked.pcx", "quitnormal.pcx", "quitover.pcx", quit_program, NULL, NULL);
flags = OVERLAY | VISIBLE;
}

//////////////////////////////////////////////////////////////////////

Does anyone know if this problem happens to more people or something.

Thanx in advance.

Re: Button problem [Re: SoulRyder] #244697
01/06/09 11:05
01/06/09 11:05
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
hey,

have you looked at mouse_mode?

Re: Button problem [Re: MrGuest] #244698
01/06/09 11:08
01/06/09 11:08
Joined: Jan 2009
Posts: 5
S
SoulRyder Offline OP
Newbie
SoulRyder  Offline OP
Newbie
S

Joined: Jan 2009
Posts: 5
"I have used three bitmaps for the "Quit" button, and I have activated the mouse through mouse_mode = 4. We will ignore the mouse details in this workshop, but we will talk a little about the tiny function that shuts down the program when we click the button."

This is what they say about it in the workshop.
I tried to change the mouse mode to 1, or delete the mouse mode but that didnt work either.

Re: Button problem [Re: SoulRyder] #244825
01/07/09 01:43
01/07/09 01:43
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
hey, i'd thought someone would of sent you another reply... but as not... if you want to send me your project jks_here@hotmail.com i'll have a further look into why it isn't working

from what you're showing at the moment unless you've saved you're .pcx files as the same file with diff names i can't see a problem

Re: Button problem [Re: MrGuest] #244959
01/07/09 18:25
01/07/09 18:25
Joined: Jan 2009
Posts: 5
S
SoulRyder Offline OP
Newbie
SoulRyder  Offline OP
Newbie
S

Joined: Jan 2009
Posts: 5
Thanx,

I downloaded the litec samples from http://server.conitec.net/down/litec.zip

But when u load the script from workshop06, load it in script editor and test run it, the Quit button is supposed to turn green or red when the mouse goes over it and the program should shut down when clicking it.

But when i try it i can't do anything with the button, i cant click it and it also doesn't change color.

Re: Button problem [Re: SoulRyder] #245005
01/07/09 22:48
01/07/09 22:48
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
You have the Pictures "quitclicked.pcx" + "quitnormal.pcx" + "quitover.pcx" in the same foulder like your script?

Re: Button problem [Re: Widi] #245020
01/08/09 01:27
01/08/09 01:27
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: Widi
You have the Pictures "quitclicked.pcx" + "quitnormal.pcx" + "quitover.pcx" in the same foulder like your script?
the map wouldn't compile if they were missing

strange, i've copied all the files and had it working without any adjustments

add into your code between button and flags the digit line, and see if your mouse is compatible and showing movement, the code is otherwise correct
Code:
	button (250, 134, "quitclicked.pcx", "quitnormal.pcx", "quitover.pcx", quit_program, NULL, NULL); 
	digits (0, 0, 4, *, 1, mouse_pos.x);
	flags = OVERLAY | VISIBLE;


Re: Button problem [Re: MrGuest] #245027
01/08/09 03:15
01/08/09 03:15
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
the code seems correct...
if running in window mode click anywhere on the game window to make sure it is focused


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Button problem [Re: Carlos3DGS] #245254
01/09/09 02:45
01/09/09 02:45
Joined: Jan 2009
Posts: 3
Z
Zetamancer Offline
Guest
Zetamancer  Offline
Guest
Z

Joined: Jan 2009
Posts: 3
Hey, I'm having the exact same problem, word for word. Any one got any advice? Adding the digits line between the button and flag lines didn't fix anything for me.

Re: Button problem [Re: Zetamancer] #245255
01/09/09 02:57
01/09/09 02:57
Joined: Aug 2008
Posts: 218
U.S.
GamerX Offline
Member
GamerX  Offline
Member

Joined: Aug 2008
Posts: 218
U.S.
what version do you have?


"You may never know what results come of your action, but if you do nothing there will be no result."
-Mahatma Gandhi
Page 1 of 2 1 2

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