-
Notifications
You must be signed in to change notification settings - Fork 11
Home
vini2003 edited this page Jan 16, 2020
·
12 revisions
Contents:
-
BaseRenderer
- in-house rendering utilities, exposed publicly. -
BaseScreen
- extension of Vanilla screen, implements methods used by Spinnery, and overrides default behaviour.extend
this if you need extra functionality. -
BaseContainer
- extension of Vanilla container, implements methods used by Spinnery, and overrides default behaviour.extend
this if you need extra functionality. -
WWidget
- base class that any and all widgets build/should build upon.extend
this if you need extra functionality; though Spinnery, by default, provides some extensions:-
WPanel
- all widgets must be linked to a panel, but not necessarily be located on top of it. -
WButton
- implements a simple self-resetting button. Optionally, provides a label. -
WToggle
- implements a simple non-self-resetting toggle. Optionally, provides a label. -
WDropdown
- implements a simple drop-down panel. Optionally, provides a label. Internally, widgets are stored in a two-dimensional array, implemented through aList
ofList
s. -
WList
- implements a simple list, with smooth scrolling. Optionally, provides a label. Internally, widgets are stored in a two-dimensional array, implemented through aList
ofList
s. -
WDynamicText
- implements a complete textbox, with support forCtrl + C
,Ctrl + V
,Ctrl + A
,Ctrl + D
,Shift + Left (A)
,Shift + Right (D)
,Delete
,Left (A)
,Right (D)
andBackspace
, alongside text culling allowing for longer-than-textbox texts. Optionally, provides a label/default text. -
WStaticText
- implements a simple static text object, with no default text wrapping by default. -
WSlot
- reimplementsSlot
class to be decent.Shift + RMB + Drag
will place1
item in slots the cursor is dragged on top of.Shift + LMB + Drag
will evenly distribute items through the same slots. -
WStaticImage
- implements a static image object that displays the selected image. -
WDynamicImage
- implements a dynamic image object that displays a sequence of images. Work in progress.
-
-
Theme
- handles theme loading, parsing, building, and management. Themes are JSONs located under./minecraft/resources/spinnery
. A default one is provided. Themes have anID
, which is aString
. ATheme
can be retrieved from theResourceRegistry
withResourceRegistry.get(theme)
. A sub-theme (for a specific widget) can be obtained with.get(theme).getXTheme()
.WColor
is a class that holdsAlpha
,Red
,Green
andBlue
members used for drawing. Strings in the JSON are parsed toWColor
s, which are stored inside the sub-theme. AWColor
element can be obtained with.get(theme).getXTheme().getXPart()
. RawRGB
integer values can be obtained with.RGB
. Any themes located in./minecraft/resources/spinnery
will automatically be loaded on resource load/reload (supportingF3 + T
).
Spinnery is licensed under the LGPL-3.0 license.