Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Markup language parser - takes in a string and parses the tags and data in it into a
- displayable page for users to view. A lot of this will have similarities with HTML, CSS, and JS
- just because I have worked with them before.
- Used for network site browser
- Takes in a string and processes it into a visual for a device to display
- Uses a basic markup language with tags for defining sections
- Uses opening and closing tags like HTML.
- Text is automatically wrapped to a new line if it extends too far
- Page has scroll functionality
- Buttons/clickable items to run code or changes to the site
- Tag list:
- <head></head> - The head of the file where variables are defined
- <body></body> - Where the text and sections are defined
- <text></text> - Where text is displayed
- <image></image> - Displays an image on screen (not working on v1)
- <style></style> - Defines style information for the page
- <script></script> - Defines scripting on the page (not working on v1)
- Modifiers on tags:
- id - Gives an id to a section, can be used to give it a color or other modifiers
- align:left - Aligns it to the left
- align:center - Aligns it to the center
- align:right - Aligns it to the right
- onClick:id - Runs a function with an ID when clicked on
- show:true/false - If true, the tag is rendered. If false, the tag is not rendered
- href:string - Holds a link to a page, has different behaviors depending on the tag
- Styling for tags (like CSS but not):
- backgroundColor = color - Sets the background color of the section to the specified color. Can only use the
- colors that computer craft screens supports
- textColor = color - Sets the text color to the specified color. Can only use the colors that
- computer craft screens supports
- textSize = number - Sets the text to the size listed, only uses numbers from 0.5 to 5 (Only has support on monitors)
- borderColor = color - Sets a border of a color to the section. Can only use the colors that computer craft
- screens supports. None is an option to disable the border
- --]]
- version = "1.0"
- dataString = ""
- defaultStyling = {
- ["backgroundColor"] = colors.black,
- ["textColor"] = colors.white,
- ["borderColor"] = "none",
- ["textSize"] = 1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement