diff options
author | kdx <kdx@42l.fr> | 2023-01-20 04:33:02 +0100 |
---|---|---|
committer | kdx <kdx@42l.fr> | 2023-01-20 04:33:02 +0100 |
commit | 3731cdb6702ff382b0b756fce09d5c3cb0625737 (patch) | |
tree | 02c3535de4aae778af870a6f141907ac78a01cf6 | |
parent | c7849ff44b237bb8b7a8576569ede1f7576086ea (diff) | |
download | 005-3731cdb6702ff382b0b756fce09d5c3cb0625737.tar.gz |
be less stupid
-rw-r--r-- | Menu.cpp | 5 | ||||
-rw-r--r-- | Table.cpp | 5 |
2 files changed, 5 insertions, 5 deletions
@@ -1,6 +1,7 @@ #include "Menu.hpp" #include "lzr.h" #include "cfg.hpp" +#include "input.h" #include <stdlib.h> Menu::Menu() : _was_down(false), _hovered(-1), _selected(1) @@ -9,6 +10,10 @@ Menu::Menu() : _was_down(false), _hovered(-1), _selected(1) void Menu::update(const Cursor &cursor) { + if (input_pressed(K_O)) { + _selected += 1; + _selected %= _entries; + } if (cursor.x < 0 || cursor.x >= CFG_DWIDTH || cursor.y < _ybegin || cursor.y > _yend) { _hovered = -1; @@ -3,7 +3,6 @@ #include "cfg.hpp" #include "util.hpp" #include "lzr.h" -#include "input.h" #include <stdlib.h> Table::Table() : _notes(), _strength(), _edited(-1), _layer(0) @@ -25,10 +24,6 @@ void Table::update(const Cursor& cursor) } } } - if (input_pressed(K_O)) { - _layer += 1; - _layer %= _depth; - } _hovered = -1; if (cursor.y < 0) return; |