Results 1 to 4 of 4

Thread: Rounding variables to the nearest integer in RR (Custom Sliders)

  1. #1
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463

    Rounding variables to the nearest integer in RR (Custom Sliders)

    I am trying to get the custom slider function working well so I can implement a custom color scheme changer. The sliders have a range from 0-65,535, but I only want a range of 0-255, so to do this i would take the slider's position and divide by 257. I only want it to return integers though (numbers with no decimals) so that it can be used in the skin somewhere.
    VB has the Int() code, but the syntax is wrong for RR. What would I need to do to get this to work right?

    (I posted a similar question on my skin thread, but this thread will be for quicker answer to the issue)
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  2. #2
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    I know I may be a little impatient with this, but does any one know how to do this? It's not a crazy important thing, but it would be a great thing to use to show others how to use the custom slider function.

    I got it kinda working to only show the first three digits by making the label area smaller.

    For some reason, numbers below about 140 work just fine, no decimals or anything, but anything over that shows the decimal...

    If someone knows the answer please help. (guino? - I know you're very busy, so please take your time with this.)
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  3. #3
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    Sorry, just use \ instead of / and your results will always be round integers.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  4. #4
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    what if i wanted to convert the number to a hex format on the fly? is it possible?
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

Similar Threads

  1. RR 10-26-2007.. iLists & Custom stuff..
    By guino in forum Road Runner
    Replies: 106
    Last Post: 12-28-2007, 11:23 PM
  2. Replies: 0
    Last Post: 06-11-2006, 05:49 PM
  3. Sending girder variables to display in RR?
    By silencery in forum Road Runner
    Replies: 4
    Last Post: 02-14-2006, 02:16 AM
  4. Custom RR skin request :buddy:
    By jthiani in forum FP Skins
    Replies: 0
    Last Post: 09-15-2005, 08:46 PM
  5. status update....
    By 0l33l in forum PowerVoice
    Replies: 17
    Last Post: 05-05-2005, 12:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •