Thread: moving text?

Results 1 to 6 of 6
  1. #1
    merp.'s Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    147
    Reputation
    10
    Thanks
    301
    My Mood
    Bored

    moving text?

    I'm interested in moving D3D text in my menu. (Example of what I mean will be given)
    it's something similar to this:
    HTML Marquee Code
    I am interested in:
    Continuous scrolling text
    and
    Text Scrolling Upwards (mostly this)
    (two methods in the link above)

    How do you make it so that if you navigate up your menu, a certain amount of text/features shows up in the box you draw?
    ex in internet browsers:
    if you scroll up or down, certain parts of the pages are covered, or hidden. That is similar to what I want to know. How do you do that in D3D?
    (Let's say there's 15 features in this menu, the box is big enough to show 5 at a time.)
    if I were to draw it as usual (the way I currently do), the text would overlap out the box.
    Visual representation of what I wish to achieve:
    -----------------
    Hack1
    Hack2
    Hack3
    Hack4
    Hack5
    -----------------
    I press down to navigate now, Hack1 will be hidden from view and Hack6 will be shown along with 2-5.
    -----------------
    Hack2
    Hack3
    Hack4
    Hack5
    Hack6
    -----------------
    I press down again, Hack2 will be hidden from view, and Hack7 will be shown along with 3-6.
    -----------------
    Hack3
    Hack4
    Hack5
    Hack6
    Hack7
    -----------------

    How do you do this?

    (Sorry if this is so redundant, I didn't have a clear way to explain this :/ )

  2. #2
    Skaterforeva1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Up your ass
    Posts
    917
    Reputation
    32
    Thanks
    476
    My Mood
    Psychedelic
    Oh i understand what your trying to say. Its like how Black Cipher 5 was. I cant find a video of the menu but it was like a scroll box. The actual box was fairly small but the test would scroll with it. I'm not sure how to do it but it did look sick. I hope you can find out how.

    ^Suck it!


  3. #3
    ⁿₒₒʙ's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    14
    y u copy bc5
    Last edited by ⁿₒₒʙ; 02-10-2013 at 10:41 AM.

  4. #4
    Saltine's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    494
    Reputation
    104
    Thanks
    625
    in your render loop just iterate from currentindex-5 to currentindex instead of the beginning of the menu to the end of the menu and render those items for the listbox type deal.
    now for scrolling text make the drawtext function also take a parameter time, and modulus that time elapsed against the screen width to calculate where the text should currently be. Pseudocode:
    Code:
    void drawscrollinghorizontal(...,long t){
    //will scroll one pixel per MS
    int x  = t%screenres.x;
    DrawText(text,x,...);
    }
    now for scrolling upwards you would subtract the time%screenres.y from screenres.y for your current y position
    Last edited by Saltine; 02-10-2013 at 10:47 AM.

    Oh no! Vortex is gay!

  5. The Following User Says Thank You to Saltine For This Useful Post:

    N3OH4X (02-10-2013)

  6. #5
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Ontario, Canada
    Posts
    15,690
    Reputation
    3319
    Thanks
    11,101
    My Mood
    Happy
    Quote Originally Posted by ⁿₒₒʙ View Post
    y u copy bc5
    Your shit was the shit

    NOOB Tried to post this earlier, but just look up SEGnosis on UC and find his Auto Scrolling List Box menu release.
    Last edited by Flengo; 02-10-2013 at 11:44 AM.


    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.
     
     
    VM | PM

    Publicist Since 04.04.2015
    Middleman Since Unknown - Unknown
    Global Moderator Since 08.01.2013
    Donator Since 05.29.2013

    Minion+ Since 04.18.2013

    District 187 Minion Since 04.04.2013
    Steam Minion Since 02.26.2013
    WarRock Minion Since 02.19.2013
    A.V.A Minion Since 02.13.2013
    DayZ Minion Since 01.21.2013
    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  7. #6
    merp.'s Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    147
    Reputation
    10
    Thanks
    301
    My Mood
    Bored
    Quote Originally Posted by ⁿₒₒʙ View Post
    y u copy bc5
    It look so sexy

Similar Threads

  1. How to make your text moving
    By Eddwiinn in forum Tutorials
    Replies: 10
    Last Post: 04-12-2015, 07:34 AM
  2. [Help Request] Displaying Text/Forms & moving mouse in a Direct3D environment ?
    By leejw29 in forum Visual Basic Programming
    Replies: 8
    Last Post: 10-28-2012, 01:08 PM
  3. Green Text
    By sealteam4 in forum WarRock - International Hacks
    Replies: 4
    Last Post: 09-05-2006, 03:35 PM
  4. Stylish Text Tutorial
    By Bull3t in forum Tutorials
    Replies: 13
    Last Post: 08-15-2006, 11:25 PM
  5. Simple Reflective Text
    By Chronologix in forum Tutorials
    Replies: 4
    Last Post: 05-20-2006, 06:56 AM