Code: Select all
screenres 800,600,32
dim as integer x,y,b
do
getmouse(x,y,,b)
screenlock
cls
circle(x,y),4,&hffff00
line (10,10)-(100,100),,B
screenunlock
sleep(16,1)
loop until multikey (&h01)
end
Code: Select all
screenres 800,600,32
dim as integer x,y,b
do
getmouse(x,y,,b)
screenlock
cls
circle(x,y),4,&hffff00
line (10,10)-(100,100),,B
screenunlock
sleep(16,1)
loop until multikey (&h01)
end
I'm sorry, I mean the circle should be visible and follow the mouse.fxm wrote:Are you talking about the text cursor?
The text cursor is never visible in graphics mode (only in console mode).
Thanks, I'll take a look.paul doe wrote:Hi nimdays,
You may want to have a look at this topic: viewtopic.php?f=7&t=26018. Some other member has had the same inquiry, and a solution was implemented. See if it helps.
Regards,
Paul
Code: Select all
screenres 800,600,32
dim as integer mx,my,mb
dim as integer x,y
do
if getmouse(mx,my,,mb)=0 then
x=mx : y=my
end if
screenlock
cls
circle(x,y),4,&hffff00
screenunlock
sleep(16,1)
loop until multikey (&h01)
It doesn't work without XD.J.Peters wrote:Code: Select all
screenres 800,600,32 dim as integer mx,my,mb dim as integer x,y do if getmouse(mx,my,,mb)=0 then x=mx : y=my end if screenlock cls circle(x,y),4,&hffff00 screenunlock sleep(16,1) loop until multikey (&h01)
Code: Select all
dim as integer mx,my,mb
dim as integer x,y
dim as integer w,h,b
screeninfo w,h,b
var ret = screenres(w,h,b)
if ret then
print "error: can't set mode: " & w & " x " & h & " " & b
beep : sleep : end 1
end if
do
if getmouse(mx,my,,mb)=0 then
x=mx : y=my
end if
screenlock
cls
circle(x,y),4,&hffff00
screenunlock
sleep(16,1)
loop until multikey (&h01)
Thanks a bunch Man, It works :)D.J.Peters wrote:Tested on Slackware 32 and 64-bit and It works.
The key are you must use the same bit depth as the frame buffer device !
(you can use screeninfo to get the bit depth of your frame buffer)
JoshyCode: Select all
dim as integer mx,my,mb dim as integer x,y dim as integer w,h,b screeninfo w,h,b var ret = screenres(w,h,b) if ret then print "error: can't set mode: " & w & " x " & h & " " & b beep : sleep : end 1 end if do if getmouse(mx,my,,mb)=0 then x=mx : y=my end if screenlock cls circle(x,y),4,&hffff00 screenunlock sleep(16,1) loop until multikey (&h01)
Code: Select all
title Tiny Core 8
kernel /boot/vmlinuz vga=792 tce=sda1
initrd /boot/tiny.gz