PhysicalConnectivity/src/main/kotlin/net/shadowfacts/cacao
Shadowfacts b2e794e5a4 Add REI sync mode for terminal search field 2021-12-23 14:41:55 -05:00
..
geometry Fix crash showing tooltip when mouse was on the edge between two tabs 2021-03-06 15:47:27 -05:00
util Initial update to 1.18.1 2021-12-22 22:12:11 -05:00
view Initial update to 1.18.1 2021-12-22 22:12:11 -05:00
viewcontroller Fix terminal search field not unfocusing when REI focused 2021-12-23 11:36:46 -05:00
window Cacao: Misc things 2021-03-20 14:48:59 -04:00
AbstractCacaoScreen.kt Fix terminal search field not unfocusing when REI focused 2021-12-23 11:36:46 -05:00
CacaoHandledScreen.kt Fix terminal search field not unfocusing when REI focused 2021-12-23 11:36:46 -05:00
CacaoScreen.kt Add REI sync mode for terminal search field 2021-12-23 14:41:55 -05:00
LayoutVariable.kt Cacao: Add layout guides 2021-03-20 11:40:00 -04:00
README.md Add Cacao 2021-02-18 23:12:43 -05:00
Responder.kt Cacao: More docs 2021-02-28 12:19:09 -05:00

README.md

Cacao

Cacao is a UI framework for Fabric/Minecraft mods based on Apple's [Cocoa](https://en.wikipedia.org/wiki/Cocoa_(API) UI toolkit.

Architecture

Screen

A CacaoScreen is the object that acts as the interface between Minecraft GUI code and the Cacao framework.

The CacaoScreen draws Cacao views on screen and passes Minecraft input events to the appropriate Views. The CacaoScreen owns a group of Window objects which are displayed on screen, one on top of the other.

Window

A Window object has a root View Controller that it displays on screen.

The Window occupies the entire screen space and translates events from the screen to the root View Controller's View. It owns a Solver object that manages layout constraints. The window also handles screen resizing and re-lays out the view hierarchy.

View Controller

A ViewController object owns a view, receives lifecycle events for it, and is generally used to control the view.

Each View Controller has a single root View which in turn may have subviews.

View

A View object represents a single view on screen. It handles drawing, positioning, and directly handles input.