Thread: Scroll

Results 1 to 4 of 4
  1. #1
    OneCa's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    0

    Scroll

    Hey there
    Could you guys help me please,with a simple d3d which scroll down when you reach the last shown text ?

    Thanks

  2. #2
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by OneCa View Post
    Hey there
    Could you guys help me please,with a simple d3d which scroll down when you reach the last shown text ?

    Thanks
    Please explain more, what do u mean "scroll down when you reach the last shown text"? Do u want it to scroll down to the last text or when u select a text and some is off, it scrolls to show the whole text of the selected item.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  3. #3
    OneCa's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by topblast View Post
    Please explain more, what do u mean "scroll down when you reach the last shown text"? Do u want it to scroll down to the last text or when u select a text and some is off, it scrolls to show the whole text of the selected item.
    I mean something like if selected item is less that the scroll meanin that the selected item is not drawn on the screen decrease scroll until it is shown
    so that if I have 50 items in menu only 10 are shown and when you reach the last one and press down first item will invisibile and a new item is shown

    thanks for your help

  4. #4
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    i hope i understand correctly, but what you could do is a for loop for 10 items and an offset value.

    So lets say u have 50 items, and you're showing 10
    Code:
    //I dont know, all code below if just a rush example
    int offset = 20;
    for(int i = offset; i <  (offset + min(10, noItems)); i++)
    {
          if ( i >= noItems)
                 i -= noItems;
         
          DrawItem( x, y  + i * 13, ......);
    }
    Using the offset to skip the values not drawn and if u want to draw the first item below that for a continuous loop the if statement should help with that.
    If you selected item is at the bottom and you press down, u can increase the offset by 1.

    I hope you understand, if not I released a menu and hack base using scroll a while back, click here. It used the mouse wheel for the scroll, please forgive the messy code.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

Similar Threads

  1. Scrolling Text [TUT]
    By Zoom in forum Visual Basic Programming
    Replies: 8
    Last Post: 11-08-2009, 03:52 PM
  2. You like the elder scrolls 4 oblivion?
    By Mugam3r in forum General
    Replies: 39
    Last Post: 08-31-2009, 10:14 AM
  3. Rate my scroll
    By radnomguywfq3 in forum Art & Graphic Design
    Replies: 13
    Last Post: 06-27-2008, 06:04 PM
  4. scroll thing...
    By ZeaS in forum Visual Basic Programming
    Replies: 5
    Last Post: 09-09-2007, 11:35 AM
  5. Elder Scrolls oblivion!
    By jadedfrog in forum General Gaming
    Replies: 23
    Last Post: 07-03-2006, 09:32 PM