Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Search the Community

Showing results for tags 'api'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Location


Interests

Found 2 results

  1. SpaceBeeGaming

    DNS system

    I have developed a sort of DNS server/client system. This is the fifth iteration of this system and finally, one which works and I'm happy with. Here is the link: https://github.com/SpaceBeeGaming/OC-DNS I know there was another "DNS" posted recently but it has not influenced mine (sounds selfish, I know; but true).
  2. Hello everyone! Direwo... eh, not quite right. Well, OpenGlasses for 1.12 is out! And I noticed there were no public button API for it, so I made one myself! I have a few functions built-in to make it easier to change stuff, but it was created with simplicity in mind. So if you simply just initialize a button and bind a function to it, it won't do any fancy stuff except for activating the function when you press it, so you have to add your own functionality to it: But with a little bit of extra code: Ok, not that big a difference, you guys are probably more creative than me! I also have a concept called "groups". When creating a button, you can specify what group it should be in. So if you want to change the color of all the buttons to the left side to pink, you can do that. Functions (in no particular order): --Needs to be called before creating any buttons, works as a reset also: gButtonAPI4.initialize() --Creating a new button element: gButtonAPI4.createNewButton(name,group,display,x,y,w,h,color: table,transparently,callback: function) --Has to be inside of your main loop: gButtonAPI4.update() --Prints all registered groups: gButtonAPI4.printGroups() --Change the visibility of the button/group: gButtonAPI4.visibility(button/group,boolean) --Change the color of the button/group: gButtonAPI4.Color(button/group[,color: table])--None for default color. --Same as color, but changes the label: gButtonAPI4.Label(button/group[,text])--None for default label. --Add a button to a group: gButtons.addToGroup(button,group) If you don't want to make a new function for each new button, you can then bind them all to the same function. And add a parameter to your function, the name of the button that was clicked will be returned: local function btniF(buttonx) gButtons.Color(buttonx,{0,255,0}) print("I am " .. buttonx .. "!") os.sleep(0.5) gButtons.Color(buttonx) end I added a Demo program that shows most of the library's functions. Oh, btw, I like the number 4. It's not like this is my fourth attempt creating this or anything! Write a reply if you have any questions, this was my first attempt to create a usable library. gButtonAPI4.lua gButtonsDemo.lua
×

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.