mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: add note/value input repeat option
This commit is contained in:
parent
2fa4364638
commit
e1d58d97cb
3 changed files with 14 additions and 1 deletions
|
@ -1529,7 +1529,7 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
|
|||
}
|
||||
// pattern input otherwise
|
||||
if (mapped&(FURKMOD_ALT|FURKMOD_CTRL|FURKMOD_META|FURKMOD_SHIFT)) break;
|
||||
if (!ev.key.repeat) {
|
||||
if (!ev.key.repeat || settings.inputRepeat) {
|
||||
if (cursor.xFine==0) { // note
|
||||
auto it=noteKeys.find(ev.key.keysym.scancode);
|
||||
if (it!=noteKeys.cend()) {
|
||||
|
|
|
@ -1864,6 +1864,7 @@ class FurnaceGUI {
|
|||
int vsync;
|
||||
int frameRateLimit;
|
||||
int displayRenderTime;
|
||||
int inputRepeat;
|
||||
unsigned int maxUndoSteps;
|
||||
float vibrationStrength;
|
||||
int vibrationLength;
|
||||
|
@ -2104,6 +2105,7 @@ class FurnaceGUI {
|
|||
vsync(1),
|
||||
frameRateLimit(60),
|
||||
displayRenderTime(0),
|
||||
inputRepeat(0),
|
||||
maxUndoSteps(100),
|
||||
vibrationStrength(0.5f),
|
||||
vibrationLength(20),
|
||||
|
|
|
@ -2431,6 +2431,12 @@ void FurnaceGUI::drawSettings() {
|
|||
settingsChanged=true;
|
||||
}
|
||||
|
||||
bool inputRepeatB=settings.inputRepeat;
|
||||
if (ImGui::Checkbox("Keyboard note/value input repeat (hold key to input continuously)",&inputRepeatB)) {
|
||||
settings.inputRepeat=inputRepeatB;
|
||||
settingsChanged=true;
|
||||
}
|
||||
|
||||
ImGui::Text("Effect input behavior:");
|
||||
ImGui::Indent();
|
||||
if (ImGui::RadioButton("Move down##eicb0",settings.effectCursorDir==0)) {
|
||||
|
@ -4229,6 +4235,8 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
settings.insTypeMenu=conf.getInt("insTypeMenu",1);
|
||||
|
||||
settings.selectAssetOnLoad=conf.getInt("selectAssetOnLoad",1);
|
||||
|
||||
settings.inputRepeat=conf.getInt("inputRepeat",0);
|
||||
}
|
||||
|
||||
if (groups&GUI_SETTINGS_FONT) {
|
||||
|
@ -4624,6 +4632,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
clampSetting(settings.displayRenderTime,0,1);
|
||||
clampSetting(settings.vibrationStrength,0.0f,1.0f);
|
||||
clampSetting(settings.vibrationLength,10,500);
|
||||
clampSetting(settings.inputRepeat,0,1);
|
||||
|
||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
@ -4776,6 +4785,8 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
conf.set("insTypeMenu",settings.insTypeMenu);
|
||||
|
||||
conf.set("selectAssetOnLoad",settings.selectAssetOnLoad);
|
||||
|
||||
conf.set("inputRepeat",settings.inputRepeat);
|
||||
}
|
||||
|
||||
// font
|
||||
|
|
Loading…
Reference in a new issue