Mouse Problem [Solved]

Posted By: Secret_V

Mouse Problem [Solved] - 11/08/08 18:37

Can anyone tell me what's wrong with this script?

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

////////////////////////////////////////////////////////////////////
var speed = 50;

BMAP* mouse_pcx = "mouse.pcx"; // bitmap used for the mouse pointer

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

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

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

PANEL* main_pan =
{
bmap = "main2.pcx";
pos_x = 250;
pos_y = 200;
vslider (16, 71, 90, "slider.pcx", 0, 100, speed);
digits (15, 50, 3, *, 1, speed);
flags = OVERLAY | VISIBLE;
}

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

This script came with the lite-c tutorial, so it should work. But I can't even see my mouse. Let alone use the slider.
Posted By: croman

Re: Mouse Problem - 11/08/08 18:39

try putting a mouse_mode = 1; instead of 4
are you sure you have that mouse bitmap in your project folder?
Posted By: Secret_V

Re: Mouse Problem - 11/08/08 18:46

That doesn't work. And I'm sure that mouse bitmap is in the right folder, double checked it. If it weren't, SED would give me an error when I try Test Play, but it doesn't. Plus, this is one of the scripts included in the tutorial, which I downloaded from the official 3DGS site...
Posted By: falagar8

Re: Mouse Problem - 11/08/08 19:51


I've had a similar problem.
It works when the screen is in windowed mode
but the mouse doesn't show nor appear in fullscreen
mode.
And by that I mean:

when I hit the alt+enter keys to alternate back and forth between windowed and full screen modes.
Also when I manually set for a fullscreen mode in the function main.

And I have used all the modes for mouse_mode too.
I wonder if there is some sort of Show_Mouse and Hide_Mouse commands that I have to call when in fullscreen mode??
Posted By: Secret_V

Re: Mouse Problem - 11/08/08 19:57

Well, my mouse doesn't show up at all. Whether I'm in windowed mode or fullscreen mode, it doesn't matter.
Posted By: falagar8

Re: Mouse Problem - 11/08/08 20:08


Let me try one more time.
Posted By: DJBMASTER

Re: Mouse Problem - 11/08/08 20:14

try this...

Code:
#include <acknex.h>
#include <default.c>

////////////////////////////////////////////////////////////////////
var speed = 50;

BMAP* mouse_pcx = "mouse.pcx"; // bitmap used for the mouse pointer

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

function main()
{
video_mode = 7; 
screen_color.blue = 150;
mouse_map = mouse_pcx;
mouse_mode=1;

while(1) 
{
mouse_pos.x = mouse_cursor.x;    // snap mouse
mouse_pos.y = mouse_cursor.y;    // snap mouse
wait(1);
}
}

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

PANEL* main_pan =
{
bmap = "main2.pcx";
pos_x = 250; 
pos_y = 200; 
vslider (16, 71, 90, "slider.pcx", 0, 100, speed); 
digits (15, 50, 3, *, 1, speed); 
flags = OVERLAY | VISIBLE;
}

Posted By: falagar8

Re: Mouse Problem - 11/08/08 20:23


Thank you for helping.

It does work in windowed screen mode.
But again, does not work in fullscreen mode by switching with alt+enter keys or even by a manual set to fullscreen in the main function. :\
Posted By: Secret_V

Re: Mouse Problem - 11/08/08 20:33

Problem solved, thank you very much! It even works in full screen mode with me... I'm sorry Falagar8, I can't help you...
Posted By: falagar8

Re: Mouse Problem - 11/08/08 20:40


Its cool and okay.
Its for the learning.

I got a weird mouse icon anyway.
Its a seashell and makes a mermaid sound when I click. smile
© 2024 lite-C Forums