Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help with scrolling off the winidow
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sanzo44




PostPosted: Thu Jan 06, 2005 11:46 am   Post subject: help with scrolling off the winidow

I created one big map for my game, instead of a bunch small ones. I don't want to use the scrollbars that the turing window creates but instead use the mouse to scroll. Can anyone help with this?
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Thu Jan 06, 2005 4:19 pm   Post subject: (No subject)

Here's an idea for you to play around with. It's not scrollbars, true. You'll have to do that Smile
code:

setscreen ("offscreenonly")
var mx, my, btn : int
for i : 1 .. 100
    drawfilloval (Rand.Int (0, maxx), Rand.Int (0, maxy), 8, 8, cyan)
end for
var picture := Pic.New (0, 0, maxx, maxy)
var picX, picY := 0
loop
    Mouse.Where (mx, my, btn)
    if mx < 50 and btn ~= 0 then
        picX += 1
    end if
    if mx > maxx - 50 and btn ~= 0 then
        picX -= 1
    end if
    if my < 50 and btn ~= 0 then
        picY += 1
    end if
    if my > maxy - 50 and btn ~= 0 then
        picY -= 1
    end if
    cls
    Pic.Draw (picture, picX, picY, picCopy)
    View.Update
    delay (10)
end loop
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: