OpenScreen()

Just starting out? Need help? Post your questions and find answers here.
Thomas
Enthusiast
Enthusiast
Posts: 112
Joined: Sat Apr 26, 2003 8:45 pm

OpenScreen()

Post by Thomas »

Where is the mouse pointer?

Code: Select all

InitSprite()
If OpenScreen(9999,9999,32,"Test")=0
  MessageRequester("Test","Error opening screen")
EndIf
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: OpenScreen()

Post by Kaeru Gaman »

where is the bug report?

if you post, use more words and more sentences.
oh... and have a nice day.
case
Enthusiast
Enthusiast
Posts: 141
Joined: Thu Aug 07, 2003 11:09 am

Re: OpenScreen()

Post by case »

Code: Select all

OpenScreen(9999,9999,32,"Test")
the purebasic documentation state that screen resolution must have standards height and width like : 640*480, 800*600, 1024*768...

9999,9999 are not standard screen résolutions...
User avatar
Demivec
Addict
Addict
Posts: 4270
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: OpenScreen()

Post by Demivec »

@Kaeru: I think the OpenScreen() statement is designed to fail in the sample code so that it demonstrates the problem. The problem is that when the message requester is displayed the mouse pointer disappears when it is placed over it.

It would have been simpler if Thomas had just said that. :wink:
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: OpenScreen()

Post by Kaeru Gaman »

I seen that after I tested the code.
... but this does not make this a bug report.

"where is the mouse pointer"... that's not enough for a line in a chat... what should be the answer... "your mama"...?

nevertheless this reveals an interesting problem...
seems that the function first switches off the mousepointer, and does not properly return before opening the requester.
I never happened to see this before, and I did test a lot of failstarts over the years.
oh... and have a nice day.
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: OpenScreen()

Post by djes »

Maybe brutal for prudish ears, but, in french forums, when one's asking where is something, the answer is always the same...

[censured by Fred] :P
Thomas
Enthusiast
Enthusiast
Posts: 112
Joined: Sat Apr 26, 2003 8:45 pm

Re: OpenScreen()

Post by Thomas »

For those who know a bit about programming, no more words are needed. By running the code the problem should be obvious. Even if standard resolutions are required, the failing of the command should not hide the mouse pointer.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: OpenScreen()

Post by Kaeru Gaman »

For those who know a bit about netiquette, so few words are hardly acceptable.
you didn't spend enough time to write three explaining sentences what was the matter.
so why should we spend a second to even copy your code to the IDE?
we're not the bloody service hotline, we are fellow programmers.
spend at least that little time you want your colleques to spend.

learn more
oh... and have a nice day.
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: OpenScreen()

Post by djes »

djes wrote:Maybe brutal for prudish ears, but, in french forums, when one's asking where is something, the answer is always the same...

[censured by Fred] :P
:lol:
Thomas
Enthusiast
Enthusiast
Posts: 112
Joined: Sat Apr 26, 2003 8:45 pm

Re: OpenScreen()

Post by Thomas »

The best programmers don't say a single word, they just know. You guys are just a bad joke. :twisted:
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: OpenScreen()

Post by luis »

Thomas wrote:The best programmers don't say a single word, they just know.
Self-casting a vote to yourself as the best programmer doesn't count.

I see a lot of votes about being lazy tough !

I agree the meaning of your post was understandable, but agree a lot more with Kaeru Gaman on principle. But as programmer I'm only moderately good and probably you don't give a damn about all this :wink:
"Have you tried turning it off and on again ?"
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: OpenScreen()

Post by Rescator »

Code: Select all

InitSprite()
If OpenScreen(9999,9999,32,"Test")=0

  ShowCursor_(#True)
  ;ReleaseMouse(#True) ;If you use InitMouse() and ExamineMouse() you should release it as well.

  MessageRequester("Test","Error opening screen")

  ShowCursor_(#False) ;these two are not really needed if the game quits at this point
  ;ReleaseMouse(#False) ;grab the mouse again.
EndIf
That's all there is to it. Why so many games fail to do this I have no idea.
I've often "lost" the mousepointer due to a error dialog like that in games.

Even worse is that some games bring up an error dialog like that,
but you can't see it and have to alt-tab to the desktop/window to find it,
and the pointer may STILL be hidden.
So showing the cursor when you fire up a error like that is a must IMO.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: OpenScreen()

Post by Trond »

Thomas wrote:The best programmers don't say a single word, they just know. You guys are just a bad joke. :twisted:
If you just knew, why did you ask in the first place?

Anyways, this is documented on the page of OpenScreen(): "Also, the Requester functions cannot be used on screens created with OpenScreen."
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Re: OpenScreen()

Post by dobro »

djes wrote:Maybe brutal for prudish ears, but, in french forums, when one's asking where is something, the answer is always the same...

[censured by Fred] :P
?? c'etait quoi la réponse ? :twisted:
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: OpenScreen()

Post by djes »

dobro wrote:
djes wrote:Maybe brutal for prudish ears, but, in french forums, when one's asking where is something, the answer is always the same...

[censured by Fred] :P
?? c'etait quoi la réponse ? :twisted:
It was a direction Image
Post Reply