Tractor Mod

Tractor Mod

130k Downloads

[Chests Anywhere] add option to edit chest from default UI

Pathoschild opened this issue ยท 1 comments

commented

Imported from Pathoschild/ChestsAnywhere#1. Original date: 2016-10-05 22:04 UTC.


The mod lets you edit chests through the Chests Anywhere screen:

edit chest UI

...but there's no way to edit a chest from the game's default UI:
view chest

Add a button to the default UI to access the chest's edit screen.

Discussed in the forums.

commented

Imported from Pathoschild/ChestsAnywhere#1. Original date: 2016-10-07 05:20 UTC.


Done in the upcoming 1.5 release (note the little icon over the chest):
sample chest UI

This uses a generic overlay system introduced by d0d24ea, which floats components on top of the existing UI (including the active clickable menu). Overlays are self-perpetuating components which can receive clicks, draw themselves, etc. An overlay can have a keep-alive lambda, which destroys the overlay when it stops returning true (e.g. if you only want to float a component as long as a particular menu is open).

tl;dr: extending existing UI for future features is much easier now.