mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
- Added circular item focus in ShortcutsWindow.
- Version bump for 0.20.1
This commit is contained in:
parent
9a8a305848
commit
28d43f2111
@ -1,3 +1,9 @@
|
|||||||
|
0.21.1
|
||||||
|
|
||||||
|
* arrow keys can now select items in the shortcuts window while focused.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
0.20.0
|
0.20.0
|
||||||
|
|
||||||
* added play queue "hot-swap". you can now swap a different list of tracks
|
* added play queue "hot-swap". you can now swap a different list of tracks
|
||||||
|
@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.0)
|
|||||||
project(musikbox)
|
project(musikbox)
|
||||||
set (musikbox_VERSION_MAJOR 0)
|
set (musikbox_VERSION_MAJOR 0)
|
||||||
set (musikbox_VERSION_MINOR 20)
|
set (musikbox_VERSION_MINOR 20)
|
||||||
set (musikbox_VERSION_PATCH 0)
|
set (musikbox_VERSION_PATCH 1)
|
||||||
set (musikbox_VERSION "${musikbox_VERSION_MAJOR}.${musikbox_VERSION_MINOR}.${musikbox_VERSION_PATCH}")
|
set (musikbox_VERSION "${musikbox_VERSION_MAJOR}.${musikbox_VERSION_MINOR}.${musikbox_VERSION_PATCH}")
|
||||||
|
|
||||||
include(CMakeToolsHelpers OPTIONAL)
|
include(CMakeToolsHelpers OPTIONAL)
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 20
|
#define VERSION_MINOR 20
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 1
|
||||||
#define VERSION "0.20.0"
|
#define VERSION "0.20.1"
|
||||||
|
@ -107,20 +107,28 @@ void ShortcutsWindow::SetChangedCallback(ChangedCallback callback) {
|
|||||||
|
|
||||||
bool ShortcutsWindow::KeyPress(const std::string& key) {
|
bool ShortcutsWindow::KeyPress(const std::string& key) {
|
||||||
if (this->changedCallback && this->IsFocused()) {
|
if (this->changedCallback && this->IsFocused()) {
|
||||||
|
int count = (int) this->entries.size();
|
||||||
|
if (count > 0) {
|
||||||
if (key == "KEY_RIGHT") {
|
if (key == "KEY_RIGHT") {
|
||||||
int active = getActiveIndex();
|
int active = getActiveIndex();
|
||||||
if (active >= 0 && active + 1 < (int) this->entries.size()) {
|
if (active >= 0 && active + 1 < count) {
|
||||||
this->activeKey = this->entries[active + 1]->key;
|
this->activeKey = this->entries[active + 1]->key;
|
||||||
this->Redraw();
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this->activeKey = this->entries[0]->key;
|
||||||
|
}
|
||||||
|
this->Redraw();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (key == "KEY_LEFT") {
|
else if (key == "KEY_LEFT") {
|
||||||
int active = getActiveIndex();
|
int active = getActiveIndex();
|
||||||
if (active > 0) {
|
if (active > 0) {
|
||||||
this->activeKey = this->entries[active - 1]->key;
|
this->activeKey = this->entries[active - 1]->key;
|
||||||
this->Redraw();
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this->activeKey = this->entries[count - 1]->key;
|
||||||
|
}
|
||||||
|
this->Redraw();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (key == "KEY_ENTER") {
|
else if (key == "KEY_ENTER") {
|
||||||
@ -133,6 +141,7 @@ bool ShortcutsWindow::KeyPress(const std::string& key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user