mirror of
https://github.com/AR2000AR/openComputers_codes.git
synced 2025-09-06 21:51:14 +02:00
102 lines
3.6 KiB
Plaintext
102 lines
3.6 KiB
Plaintext
libGUI
|
|
http://odp.tuxfamily.org/plantuml?hLR1SjiW4Brd9l_04JTslg27JDrcx4idKtVYP38vO44b9XWy23bsa_nxWGL9I3Xjf_L5rjkto-w-1N5L6w9DinNdPuKWTOrMXMPCefVpCsH_5-4TJ-1zXlQyvXl1q4Of4J4cYOLeWXKL5xH6nbbQJF3YQK4a5KpZbT5SbeZjcJHVoPPDKK2QXjCfujAW0poEyDWqnYZPqdQ279bsdfEOwrvnYcfcRY57xFA92QSao1W8yB-rUupNCSOG_mAruZGUeNJk2iPhJajcNaCNVHDIfas-B6tvbvUNgO5gyjn5XVOzF288U7xs5WLQRad9hhcLeDMeXM9JTyHKhM8xhNPCc-F3Oulm0nFnzI8sr2vpummOMkyxdwPeuyZC4XTU7kjkSpKL7g8BnilAZE0L_-cxQmlRaUB9Le2UVQsnBhAfZIQ5GL3tEZ52AC1mVrOcdNs63Wxh0ySXK10XDdPvzAEHXU5Azerkcdor_JNZaDse-jJ27UaEA5dRFJxjDmzfOPUV6xWsqOGUMdc7S-Zz29q6YqiziTNj12mf7YSqdjdUbYYK49oopDJq8hn4CT-IEN-31mZyZHM6oB8RRF1lOJm-4fxTmC7VoayP_BSfAPqCWYSEjGUNqKGuvnJiTB43Ly6y-OXPxSAyTqbbMNxyOw1o-Xlst2M5SxNbDrzYIJVWQ1hYHXpvmQ8vgRwpms0dEkGl1MfFScDz4xKS48nzUClbEgVZbXpMtD0npkKYAx5ro1jyNlRG7QxT2U7hpEVTtqQUbbNoMcbMQjL8YWDzh6WNfyVEHljaJuG_ZzPZvrHTobqpaDL3_wBh53rqt-k2BPIWJCyheXyJnVT4D2mZ-S3f7M5k7BFopAXFOJsoNRjrgqMMNpgXzRw7wVBu10tYPLlglio3bZfeqDBnDnMu_tzhlt_x2G5SXf-98V6A44g2OZxCPjs50mpXq_pnDPh6S7kAWwaxwxtLRHSm-9C50hdHyzU3S9bI5eoteIicgR-q_W80
|
|
@startuml
|
|
class Screen {
|
|
+ Screen()
|
|
- visible bool
|
|
- enabled bool
|
|
- childs table
|
|
- clickHandler(String eventName, String uuid, int x, int y, int button, String playerName)
|
|
+ void setVisible(bool visible)
|
|
+ void enable(bool enable)
|
|
+ bool isVisible()
|
|
+ bool isEnabled()
|
|
+ void addChild(Widget|Screen child)
|
|
+ void trigger(...)
|
|
+ void draw(bool useBuffer)
|
|
+ childs[] Widget
|
|
}
|
|
class ImageFile {
|
|
+ ImageFile(String path)
|
|
- property[]
|
|
- pixel[]
|
|
+ String getPixel(int x,int y)
|
|
+ void open(String path)
|
|
+ int getWidth()
|
|
+ int getHeight()
|
|
+ int getSize()
|
|
}
|
|
package widget {
|
|
abstract class Widget {
|
|
+ Widget(int x, int y)
|
|
- x int
|
|
- y int
|
|
- callback function
|
|
- id string
|
|
+ void setPos(int x, int y)
|
|
+ void setX(int x)
|
|
+ void setY(int y)
|
|
+ void setCallback(callable callback)
|
|
+ int getX()
|
|
+ int getY()
|
|
+ int,int getPos()
|
|
+ string getId()
|
|
+ void trigger(...)
|
|
+ bool collide(int x,int y)
|
|
+ void {abstract} draw()
|
|
}
|
|
class Rectangle {
|
|
+ Rectangle(int x, int y, int width, int height, int color)
|
|
- width int
|
|
- height int
|
|
- color int
|
|
+ void setWidht(int width)
|
|
+ void setHeight(int height)
|
|
+ void setSize(int widtg,int height)
|
|
+ void setColor(int color)
|
|
+ int getWidth()
|
|
+ int getHeight()
|
|
+ int,int getSize()
|
|
+ int getColor()
|
|
}
|
|
class Text {
|
|
+ Text(int x, int y, int width, int height, int color, String text)
|
|
- text String
|
|
- minWidth int
|
|
- maxWitdh int
|
|
- minHeight int
|
|
- maxHeight int
|
|
- color[] String
|
|
+ void setText(String text)
|
|
+ string getText()
|
|
+ void setForeground(string color)
|
|
+ string getForeground()
|
|
+ void setBackground(string color)
|
|
+ string getBackground()
|
|
}
|
|
class Input {
|
|
+ Input(int x, int y, int width, int height, int color, String text, [String placeHolderChar])
|
|
- value String
|
|
- placeHolderChar String
|
|
+ void setPlaceholder(String char)
|
|
+ void setValue(String value)
|
|
+ String getPlaceHolderChar()
|
|
+ String getValue()
|
|
}
|
|
class Image {
|
|
+ Image(int x, int y, String path)
|
|
+ int getWidth()
|
|
+ int getHeight()
|
|
+ int,int getSize()
|
|
+ void enable(bool enable)
|
|
+ imageData[]
|
|
}
|
|
Image *-- ImageFile
|
|
Widget <|-- Image
|
|
Widget <|-- Rectangle
|
|
Rectangle <|-- Text
|
|
Text <|-- Input
|
|
}
|
|
Screen o-- Widget
|
|
@enduml
|