mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-03 17:57:26 +00:00
Merge branch 'master' of https://github.com/tildearrow/furnace into k053260
This commit is contained in:
commit
e8203f453b
6 changed files with 13 additions and 3 deletions
|
@ -53,8 +53,8 @@
|
|||
#define EXTERN_BUSY_BEGIN_SOFT e->softLocked=true; e->isBusy.lock();
|
||||
#define EXTERN_BUSY_END e->isBusy.unlock(); e->softLocked=false;
|
||||
|
||||
#define DIV_VERSION "dev145"
|
||||
#define DIV_ENGINE_VERSION 145
|
||||
#define DIV_VERSION "dev147"
|
||||
#define DIV_ENGINE_VERSION 147
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
#define DIV_VERSION_FC 0xff02
|
||||
|
|
|
@ -32,6 +32,13 @@ const unsigned char avRequest[15]={
|
|||
|
||||
void FurnaceGUI::doAction(int what) {
|
||||
switch (what) {
|
||||
case GUI_ACTION_NEW:
|
||||
if (modified) {
|
||||
showWarning("Unsaved changes! Save changes before creating a new song?",GUI_WARN_NEW);
|
||||
} else {
|
||||
displayNew=true;
|
||||
}
|
||||
break;
|
||||
case GUI_ACTION_OPEN:
|
||||
if (modified) {
|
||||
showWarning("Unsaved changes! Save changes before opening another file?",GUI_WARN_OPEN);
|
||||
|
|
|
@ -3581,7 +3581,7 @@ bool FurnaceGUI::loop() {
|
|||
if (!mobileUI) {
|
||||
ImGui::BeginMainMenuBar();
|
||||
if (ImGui::BeginMenu("file")) {
|
||||
if (ImGui::MenuItem("new...")) {
|
||||
if (ImGui::MenuItem("new...",BIND_FOR(GUI_ACTION_NEW))) {
|
||||
if (modified) {
|
||||
showWarning("Unsaved changes! Save changes before creating a new song?",GUI_WARN_NEW);
|
||||
} else {
|
||||
|
|
|
@ -417,6 +417,7 @@ enum FurnaceGUIFMAlgs {
|
|||
|
||||
enum FurnaceGUIActions {
|
||||
GUI_ACTION_GLOBAL_MIN=0,
|
||||
GUI_ACTION_NEW,
|
||||
GUI_ACTION_OPEN,
|
||||
GUI_ACTION_OPEN_BACKUP,
|
||||
GUI_ACTION_SAVE,
|
||||
|
|
|
@ -463,6 +463,7 @@ const FurnaceGUIColors fxColors[256]={
|
|||
// format: ("ACTION_ENUM", "Action name", defaultBind)
|
||||
const FurnaceGUIActionDef guiActions[GUI_ACTION_MAX]={
|
||||
D("GLOBAL_MIN", "---Global", NOT_AN_ACTION),
|
||||
D("NEW", "New", FURKMOD_CMD|SDLK_n),
|
||||
D("OPEN", "Open file", FURKMOD_CMD|SDLK_o),
|
||||
D("OPEN_BACKUP", "Restore backup", 0),
|
||||
D("SAVE", "Save file", FURKMOD_CMD|SDLK_s),
|
||||
|
|
|
@ -2093,6 +2093,7 @@ void FurnaceGUI::drawSettings() {
|
|||
if (ImGui::TreeNode("Global hotkeys")) {
|
||||
KEYBIND_CONFIG_BEGIN("keysGlobal");
|
||||
|
||||
UI_KEYBIND_CONFIG(GUI_ACTION_NEW);
|
||||
UI_KEYBIND_CONFIG(GUI_ACTION_OPEN);
|
||||
UI_KEYBIND_CONFIG(GUI_ACTION_OPEN_BACKUP);
|
||||
UI_KEYBIND_CONFIG(GUI_ACTION_SAVE);
|
||||
|
|
Loading…
Reference in a new issue