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

Username:   Password: 
 RegisterRegister   
 RGB and GUI collide
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Flikerator




PostPosted: Sun Jan 01, 2006 8:32 pm   Post subject: RGB and GUI collide

RGB and GUI mixed. Ive never used RGB and GUI is a joke. So I decided to combine them XD Enjoy.

code:

import GUI

var Setred, Setgreen, Setblue : int := 1
var Color : int := 25

View.Set ("graphics:300;300,nobuttonbar")
var scrollBar : int

procedure Blue (value : int)
    Setblue := value
    Text.Locate (4, 10)
    color (blue)
    put "Blue Value: ", Setblue : 4
end Blue

procedure Green (value : int)
    Setgreen := value
    Text.Locate (10, 10)
    colour (green)
    put "Green Value: ", Setgreen : 4
end Green

procedure Red (value : int)
    Setred := value
    Text.Locate (17, 10)
    colour (red)
    put "Red Value: ", Setred : 4
end Red

scrollBar := GUI.CreateHorizontalScrollBar (10, 210, 250, 1, 256, 1, Blue)
scrollBar := GUI.CreateHorizontalScrollBar (10, 110, 250, 1, 256, 1, Green)
scrollBar := GUI.CreateHorizontalScrollBar (10, 10, 250, 1, 256, 1, Red)

loop
    exit when GUI.ProcessEvent
    RGB.SetColor (Color, Setred, Setgreen, Setblue)
    locate (1, 1)
    color (Color)
    put "COLOR"
end loop
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Tue Jan 03, 2006 12:09 am   Post subject: (No subject)

I think you have the values backwards. See how when blue is at the max the text is not blue? It's more like 256 green and 256 red combined. In your program, having the slider at 0 is like having that RGB value at 256.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: