Project

General

Profile

Actions

Bug #661

open

Mouse Screen isn't working. It always returns -1

Added by Brian Flanagan over 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
Start date:
02/09/2021
Due date:
% Done:

0%

Estimated time:
1:00 h
Affected version:

Description

Example:

Screen Open 1,1920,1080,32,Lowres
Palette 0,$FFFFFF : Ink 1 : Pen 1 : Paper 0 : Curs Off : Flash Off : Cls 0
Box 0,0 To 1919,1079
Do
    Locate 1,1 : Print Using "-###";Mouse Screen
    Locate 1,2 : Print Using "-####";X Mouse;
    Print " , "; :  Print Using "-####";Y Mouse 
    Wait Vbl
Loop

The above code should display the index of the current screen under the mouse, but instead, it always returns -1.
(I put the X Mouse, Y Mouse display there, to ensure the program was working.)

Actions #1

Updated by Brian Flanagan about 3 years ago

Re-tested in 1.0.0 (B7) rev 4/19
Partially working now... but only the last screen defined is reported.

Example:

'
' All 4 screens IDs should be returned.
' Only Screen 3 is working (and out of bounds: -1)
' Screen 0,1,2 are not returned.
'
Gosub SetScreen
Cls 0 : Ink 1 : Box 0,0 To 1919,1079 : Box 1,1 To 1918,1078
Paper 0 : Locate 0,1 : Centre "SCREEN 0"

Screen Open 1,400,400,32,Lowres : Gosub SetScreen
Cls 2 : Screen Display 1,100,250
Paper 2 : Locate 0,1 : Centre "SCREEN 1"

Screen Open 2,400,400,32,Lowres : Gosub SetScreen
Cls 3 : Screen Display 2,550,250
Paper 3 : Locate 0,1 : Centre "SCREEN 2"

Screen Open 3,400,400,32,Lowres : Gosub SetScreen
Cls 4 : Screen Display 3,1000,250
Paper 4 : Locate 0,1 : Centre "SCREEN 3"

Screen 0
Do
    Locate 1,1 :    Print Using "Mouse Screen: -#";Mouse Screen
    Locate 1,2 :    Print Using "X Mouse: -####";X Mouse;
    Locate 1,3 :    Print Using "Y Mouse: -####";Y Mouse
    Wait Vbl
Loop

SetScreen:
    Palette 0,$FFFFFF,$FF0000,$00FF00,$0000FF : Ink 1 : Pen 1 : Curs Off : Flash Off
Return
Actions #2

Updated by Brian Flanagan over 2 years ago

  • Status changed from New to Resolved
  • Target version set to 1.0.0 (B10) u16

Re-tested in 1.0.0 (B10) u16 (9/19)

It's working now.

Actions

Also available in: Atom PDF