Skip to content

Styles, resources and static elements.

Marc Hermans edited this page Sep 9, 2018 · 3 revisions

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.

Styles. The what and the who now?

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.

Enough talk about styles. How do i make them?

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.

Style creation, resources and resource types.

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.

BlockOut Wiki

General

Welcome

Guides

Controls.

New control guides:

Guide 1: Creating a new Control

Guide 2: Creating a new Controlfactory

Guide 3: Creating a new ControlConstructionDataBuilder

Guide 4: Registering your new Control to BlockOut

Existing controls:

Simple Controls

Hosting Controls

UIs and Containers:

Section to be created

Styles and Resources:

Guide 1: Styles, resources and static elements.

Debugging BlockOut

Guide 1: Debugging BlockOut

General Information:

Styles and Resources:

Collection 1: Resource types.

Clone this wiki locally