This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Tobias SN's profile picture

Searching APIs for a multi-purpose framework

Started by Tobias SN, 24 May 2016 - 05:30 AM
Tobias SN #1
Posted 24 May 2016 - 07:30 AM
I'm looking for people with APIs to include said APIs in a framework codenamed AllExtend. Requirements include, but are not limited to:
  • Must not require the person to change anything about their program, except the usual
    
    os.loadAPI("api")
    
    Or
    
    api = dofile("api")
    
  • Must not break the DK law or the law in whatever country you live in
Please note that requirements might change as time goes.

You should (But not required):
  • Have a GitHub account
  • Be able to contribute to your part of the framework
Lupus590 #2
Posted 24 May 2016 - 12:43 PM
You could have a look in here: https://github.com/lupus590/CC-Random-Code

I'm not sure how useful it all will be though, also it's not all mine but I have tried to put links to sources.
Tobias SN #3
Posted 25 May 2016 - 08:47 AM
The thing about those are that they're easily done in own code
Lupus590 #4
Posted 25 May 2016 - 12:27 PM
Have a look through the API section of the forums and find some you like, then message the owners for permission to include it in this project.
Tobias SN #5
Posted 26 May 2016 - 11:09 AM
Alright. I'll try your suggestion
jv110 #6
Posted 28 May 2016 - 11:38 PM
I've been working on a UI API for my projects. It's really flexible, and currently it has labels, textboxes, checkboxes, imageviews, layouts and progressbars.

In fact, it's so flexible that it doesn't even have buttons, as they're the exact same thing as labels.

Check it out, hope you can include it!

http://github.com/jv110/Gray (inside "dependencies/ui")
Edited on 28 May 2016 - 09:39 PM
Cloud Ninja #7
Posted 28 May 2016 - 11:40 PM
Take a look through my stuff, i have networking API's you could use, maybe some other stuff. Just credit me.
KingofGamesYami #8
Posted 28 May 2016 - 11:48 PM
I also have several APIs you might want.

http://pastebin.com/CTrVdFK9
http://pastebin.com/3eMtT5vX
http://pastebin.com/V455UuCr
http://pastebin.com/h0eW3iEA
http://pastebin.com/aE66gE86
http://pastebin.com/gbxiZJtc

If you've got questions about what they do, google the url and the forum post should come up.
jv110 #9
Posted 29 May 2016 - 12:04 AM
Also, forgot to mention, there's pic, which is a image format that supports text and text colors. It's also lighter than the default and is supported by my UI.
Spoilerwidth,height;colors;textcolors;text

ex.:
2,2;a1d3;1a3d;uiui
(That must've looked horrible)

There's also make, which isn't an API but you could use it to build your project.
Edited on 28 May 2016 - 10:08 PM
Tobias SN #10
Posted 30 May 2016 - 10:04 AM
I've been working on a UI API for my projects. It's really flexible, and currently it has labels, textboxes, checkboxes, imageviews, layouts and progressbars.

In fact, it's so flexible that it doesn't even have buttons, as they're the exact same thing as labels.

Check it out, hope you can include it!

http://github.com/jv110/Gray (inside "dependencies/ui")
The thing is, I can only include it if you provide me with information on how it works
Take a look through my stuff, i have networking API's you could use, maybe some other stuff. Just credit me.
Alright. I'll check it out
I also have several APIs you might want.

http://pastebin.com/CTrVdFK9
http://pastebin.com/3eMtT5vX
http://pastebin.com/V455UuCr
http://pastebin.com/h0eW3iEA
http://pastebin.com/aE66gE86
http://pastebin.com/gbxiZJtc

If you've got questions about what they do, google the url and the forum post should come up.
I'll check them out
Also, forgot to mention, there's pic, which is a image format that supports text and text colors. It's also lighter than the default and is supported by my UI.
Spoilerwidth,height;colors;textcolors;text

ex.:
2,2;a1d3;1a3d;uiui
(That must've looked horrible)

There's also make, which isn't an API but you could use it to build your project.
I'm not yet sure how I'll put everything together
jv110 #11
Posted 31 May 2016 - 11:20 PM
Everything's object-oriented, so you can just look at each file to see it, but here's a very incomplete explanation on how to use it:

(It looks a lot like Android's API)

SpoilerMost parameters are not necessary.

Layout:
Spoilerlayout.new(x, y, width, height)
Creates a layout at determined position.
Other objects can later be added using mylayoutobj:addWidget(obj). Their position will be offsetted by the layout's position, and certain parts won't render if out of bounds.

Widget (valid for all)
Spoilerwidget.new(x, y, width, height, etc [depends on widget])

myobj:setText(txt) or myobj.text = txt

myobj.multiline = ismultiline

myobj.backgroundcolor = bc

myobj.textcolor = tc

You can set the onclick, onscroll, onkey or onchar this way:

mylabelobj.onclick = function(button, x, y)

end
Tobias SN #12
Posted 01 June 2016 - 08:43 AM
Alright. However, do I just use os.loadApi for each I want to use or is there some other way?
jv110 #13
Posted 04 June 2016 - 02:46 AM
UI is designed for use with make, using @include n stuff, but you can also prebuild it then use os.loadAPI and use ui.xxx on each object

Here's make's topic for more info:
http://www.computercraft.info/forums2/index.php?/topic/26048-lua-make-lua-pre-processor-for-computercraft/page__view__getnewpost
Edited on 04 June 2016 - 12:50 AM
jv110 #14
Posted 04 June 2016 - 03:08 AM
Aaaaaand there's VertexGL, a library for vectorial 3D drawing (nothing says it can't be used for 2D). Textures don't work yet and it has a killer bug (crash) related to low Z coordinates, but it's very complete, having support for textures (albeit they don't work), shaders (vertex & fragment, can't be used for 3D lighting tho), projection matrices & etc. Also contains definitions for vec3 (alias for vector), vec4, quaternion and mat4x4.
Basically, it's a complete graphics library.

That one's supposed to be used with os.loadAPI, will be rolling an update for make in a sec
http://www.computercraft.info/forums2/index.php?/topic/26034-vertexgl-3d-rendering-api-with-polygons-textures-and-shaders/page__view__getnewpost
Tobias SN #15
Posted 07 June 2016 - 05:45 AM
UI is designed for use with make, using @include n stuff, but you can also prebuild it then use os.loadAPI and use ui.xxx on each object

Here's make's topic for more info:
http://www.computerc...iew__getnewpost

I took a look at make, and it makes a lot more sense now