Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

DimitarBogdanov/CommonUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ComputerCraft CommonUI


This is a little OOP framework for UI in ComputerCraft.

Examples: Header:

local header = DefaultControls:Header()
header.Text = "Welcome!"
header.TextColour = colors.black
header.DrawPriority = 1
CommonUI:AddComponent(header)

Button:

local button = DefaultControls:BigButton()
button.PosX = 2
button.PosY = 13
button.SizeX = 6
button.SizeY = 1
button.Text = "End!"
button.Colour = colors.blue
button.TextColour = colors.white
button.DrawPriority = 2
button.OnClick = function()
    CommonUI:EndEventLoop()
    CommonUI:ClearScreen()
end

CommonUI:AddComponent(button)
CommonUI:BeginEventLoop() -- starts listening for events e.g. mouse click

About

ComputerCraft CommonUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages