Jump to content




CCGlass v0.0001 alpha


17 replies to this topic

#1 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 17 June 2013 - 07:00 PM

Moved to programs to get more attention, aswell as it belongs in there
http://www.computerc...0002-pixel-api/

#2 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 17 June 2013 - 08:04 PM

Why is this in the media section?

#3 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 17 June 2013 - 08:08 PM

Please read the OP before asking questions, because it's explained in the OP :)


Also, added stuff to the post.

#4 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 17 June 2013 - 10:09 PM

/offtopic I agree with Bubba. Why is this in the Media section. I'd say it should be in General.

/ontopic
That GUI looks like the Plastic GUI.

#5 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 17 June 2013 - 10:21 PM

Yes, it is a bit like plastic. The home screen is anyway.(also the colors are copied from plastic's code, I don't know how to make them, so I just did that :P
For most practical applications(also the help screen) there is a function called tinyPrint that is all size 1 and allows for 5 lines on the screen. It also allows for customized colors. It's current use is Help, but it'll be super useful when I add a Books app.

#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 17 June 2013 - 10:33 PM

View PostIcanbreathecode, on 17 June 2013 - 10:21 PM, said:

also the colors are copied from plastic's code, I don't know how to make them, so I just did that :P

0xRRGGBB

where each set of two is 0-255 or 00-FF in HEX and represents either Red ( R ), Green ( G ), or Blue ( B ).

Use the hex values with a 0x in the font.

#7 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 18 June 2013 - 09:25 AM

Is there any documentation? From what I gather, this is some sort of API.

#8 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 18 June 2013 - 01:05 PM

Alright, I'll just tell you the functions & variables.
glass - The variable wrapped to the peripheral
tinyPrint("text", line, color) - prints up to 5 lines of text on the screen, like in help. Line can be 1-5
highPrint("text") - Prints texts in red like in the home screen, where it says "Welcome username!"
midPrint("text") - Prints text in green like in the home screen, where it says "Glass V0.0001"
lowPrint("text") - Prints text in light blue like in the home screen, where it says "Do $$help for help."
tinyClear() - Clears Tiny Text
bigClear() - Clears Big text(highPrint, midPrint and lowPrint text.)
bigBox - The gray box where text is printed.


ALSO: For Glass to able to launch your application it need to put in in the folder CCGlass/

C&Ping this into the OP.





View Posttiin57, on 18 June 2013 - 09:25 AM, said:

Is there any documentation? From what I gather, this is some sort of API.
This is a program for Terminal Glasses, but it does have it's own API. It's sort of like a system for the Terminal Glasses so you don't need a ton of them do do all your tasks.

#9 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 19 June 2013 - 05:53 AM

View PostIcanbreathecode, on 17 June 2013 - 10:21 PM, said:

also the colors are copied from plastic's code, I don't know how to make them, so I just did that :P
I got bored... so if you're still struggling with the HEX colours, and know RGB colours well enough, here is a function I wrote just for you :)

function rgb( _r, _g, _b )
  return bit.bor( bit.blshift( bit.bor( bit.blshift( _r, 8 ), _g ), 8 ), _b )
end


Example usage:
--# previously you did this
glcolors.blue = 0x7dd2e4
glass.addBox(160, 0, 5, 60, glcolors.blue, 0.75)
--# now you could do this
glcolors.blue = rgb(125, 210, 228)
glass.addBox(160, 0, 5, 60, glcolors.blue, 0.75)

If you're curious
Spoiler


#10 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 19 June 2013 - 07:53 AM

View Posttheoriginalbit, on 19 June 2013 - 05:53 AM, said:

View PostIcanbreathecode, on 17 June 2013 - 10:21 PM, said:

also the colors are copied from plastic's code, I don't know how to make them, so I just did that :P
I got bored... so if you're still struggling with the HEX colours, and know RGB colours well enough, here is a function I wrote just for you :)

function rgb( _r, _g, _b )
  return bit.bor( bit.blshift( bit.bor( bit.blshift( _r, 8 ), _g ), 8 ), _b )
end


Example usage:
--# previously you did this
glcolors.blue = 0x7dd2e4
glass.addBox(160, 0, 5, 60, glcolors.blue, 0.75)
--# now you could do this
glcolors.blue = rgb(125, 210, 228)
glass.addBox(160, 0, 5, 60, glcolors.blue, 0.75)

If you're curious
Spoiler

Ha, I like that!

#11 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 19 June 2013 - 08:03 AM

View PostMikeemoo, on 19 June 2013 - 07:53 AM, said:

Ha, I like that!
Thanks :)

I would have made an rgba version too, but your mod doesn't accept it in that format. :P

#12 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 19 June 2013 - 05:35 PM

Thanks. I'll probably use this later on, I know a place where I can get colors from :3
(in RGB)

#13 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 19 June 2013 - 09:42 PM

Anyone know why this only displays "Welcome (your username)" on SMP then crashes?
Also: theoriginalbit, do you mind if I add that function to the GlassAPI?

#14 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 19 June 2013 - 10:47 PM

This is why.

#15 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 19 June 2013 - 11:12 PM

View PostIcanbreathecode, on 19 June 2013 - 05:35 PM, said:

Thanks. I'll probably use this later on, I know a place where I can get colors from :3 (in RGB)

View PostIcanbreathecode, on 19 June 2013 - 09:42 PM, said:

Also: theoriginalbit, do you mind if I add that function to the GlassAPI?
That's fine. :) just put a little note like so
-- kindly created by TheOriginalBIT
:P :P

#16 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 20 June 2013 - 04:35 PM

View Posttheoriginalbit, on 19 June 2013 - 11:12 PM, said:

View PostIcanbreathecode, on 19 June 2013 - 05:35 PM, said:

Thanks. I'll probably use this later on, I know a place where I can get colors from :3 (in RGB)

View PostIcanbreathecode, on 19 June 2013 - 09:42 PM, said:

Also: theoriginalbit, do you mind if I add that function to the GlassAPI?
That's fine. :) just put a little note like so
-- kindly created by TheOriginalBIT
:P :P
Thanks! This will hopefuly make it easier for app makers to use their own custom colors! :)
I put credits to you at the top credit thing, and right before the function.

#17 1lann

  • Members
  • 516 posts
  • LocationSeattle

Posted 21 June 2013 - 03:30 AM

You know, you could just use ColorHexa to choose colors (what I did) :P. It supports RGB to hex values and vice-verca: http://www.colorhexa.com/7dd2e4

#18 GravityScore

  • Members
  • 796 posts
  • LocationLand of Meh

Posted 21 June 2013 - 08:10 PM

View Post1lann, on 21 June 2013 - 03:30 AM, said:

You know, you could just use ColorHexa to choose colors (what I did) :P. It supports RGB to hex values and vice-verca: http://www.colorhexa.com/7dd2e4

And also words :P Like "sky blue", "crimson", "deep purple", etc...





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users