-
-
Notifications
You must be signed in to change notification settings - Fork 2
Styles, resources and static elements.
BlockOut requires, just as any GUI library, as well as Minecraft itself, resources that it renders on screen. These resources are managed by BlockOuts styles.
Well styles are a collection of resource types and their instances. When a BlockOut element requires a Resource like a texture it will request that resource from the StyleManager using its style id and the id of the resource it is looking for.
Well first of all you will need a styles.json
file under: assets//styles.
This file will hold a list of all your styles in a json array, like so:
[
"<modid>:<path_to_your_style.json>",
"<modid>:<path_to_another_style.json>"
]
Now you know how to register styles, lets talk about adding one ourselfs.
As stated a style needs an id and a list of resource types. BlockOut does not care were either of them are located as long as it is listed in the styles.json
list of atleast one mod. If it finds the same style (so two styles with the same id) it will try to merge them together, were the second one overrides the information from the first style if a collision occurs.
So lets create a style.
By default blockout provides several different resource types, including, but not limited to: Images, Template and ItemStacks. In a later tutorial I will teach you how to add your own static resource types.