Interface ScreenEffectLayers
public interface ScreenEffectLayers
The order screen effects are drawn in, like layers in an image editor: the first layer is drawn first, straight
over the game, and each later one processes the image the layers before it produced. So a blur above a vignette
blurs the vignette's edge too; below it, the edge stays sharp.
Every registered effect has a layer, whether it's on or not. The order starts out sorted by
priority (then registration order), and stays as rearranged once changed,
from here or by a player in the effects screen, which remembers it. Scopes come first: all WORLD effects
are drawn before any SCREEN effect, whatever their layers.
Only use it from the render thread.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidbringToTop(ScreenEffect effect) intindexOf(ScreenEffect effect) The effect's layer: 0 is the bottom.booleanWhether the order was rearranged, rather than following priorities.voidmoveDown(ScreenEffect effect) Moves it one layer down (drawn earlier), past the previous effect of its own scope.voidmoveTo(ScreenEffect effect, int index) Moves an effect to a layer, 0 being the bottom; the index is clamped.voidmoveUp(ScreenEffect effect) Moves it one layer up (drawn later), past the next effect of its own scope.order()Every effect, from the bottom layer (drawn first) to the top (drawn last).voidSorts the layers by priority again.default voidsendToBottom(ScreenEffect effect) visible(ScreenEffectScope scope) The effects in a scope that are drawn this frame, bottom to top.
-
Method Details
-
order
List<ScreenEffect> order()Every effect, from the bottom layer (drawn first) to the top (drawn last). -
visible
The effects in a scope that are drawn this frame, bottom to top. -
indexOf
The effect's layer: 0 is the bottom. -
moveTo
Moves an effect to a layer, 0 being the bottom; the index is clamped. -
moveUp
Moves it one layer up (drawn later), past the next effect of its own scope. -
moveDown
Moves it one layer down (drawn earlier), past the previous effect of its own scope. -
bringToTop
-
sendToBottom
-
isCustomized
boolean isCustomized()Whether the order was rearranged, rather than following priorities. -
resetOrder
void resetOrder()Sorts the layers by priority again.
-