openMSX
Layer.cc
Go to the documentation of this file.
1#include "Layer.hh"
2#include "LayerListener.hh"
3
4namespace openmsx {
5
7{
8 z = z_;
9 if (display) display->updateZ(*this);
10}
11
12
13// class ScopedLayerHider
14
16 : layer(layer_)
17 , originalCoverage(layer.getCoverage())
18{
20}
21
23{
24 layer.setCoverage(originalCoverage);
25}
26
27} // namespace openmsx
virtual void updateZ(Layer &layer) noexcept=0
Interface for display layers.
Definition: Layer.hh:12
@ COVER_NONE
Layer is not visible, that is completely transparent.
Definition: Layer.hh:39
void setZ(ZIndex z)
Changes the current Z-index of this layer.
Definition: Layer.cc:6
ZIndex
Determines stacking order of layers: layers with higher Z-indices are closer to the viewer.
Definition: Layer.hh:17
void setCoverage(Coverage coverage_)
Changes the current coverage of this layer.
Definition: Layer.hh:70
ScopedLayerHider(Layer &layer)
Definition: Layer.cc:15
This file implemented 3 utility functions:
Definition: Autofire.cc:9