This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
2016-05-09 14:05:08 +00:00
|
|
|
#ifndef CODE_LAYERLOCK_H
|
|
|
|
#define CODE_LAYERLOCK_H
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <Code.h>
|
2016-05-28 21:16:32 +00:00
|
|
|
#include "LayerState.h"
|
2016-05-09 14:05:08 +00:00
|
|
|
|
2016-05-28 21:16:32 +00:00
|
|
|
/* Code_LayerLock calls LayerState when pressed to change activeLayer.
|
2016-05-09 14:05:08 +00:00
|
|
|
*/
|
|
|
|
class Code_LayerLock : public Code
|
|
|
|
{
|
|
|
|
private:
|
2016-09-20 01:46:03 +00:00
|
|
|
const uint8_t layerId;
|
2016-05-28 21:16:32 +00:00
|
|
|
LayerState& refLayerState;
|
2016-05-09 14:05:08 +00:00
|
|
|
public:
|
2016-09-20 01:46:03 +00:00
|
|
|
Code_LayerLock(const uint8_t layerId, LayerState& refLayerState)
|
|
|
|
: layerId(layerId), refLayerState(refLayerState) {}
|
2016-05-09 14:05:08 +00:00
|
|
|
virtual void press();
|
|
|
|
virtual void release();
|
|
|
|
};
|
|
|
|
#endif
|