Skip to content

Commit 62867d8

Browse files
committed
GUI - autocomplete use_/with_random_source choices
This pops up autocompletion options for the types of noise that people can pick when setting the random number source through use_random_source or with_random_source.
1 parent a396163 commit 62867d8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/gui/qt/utils/scintilla_api.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ ScintillaAPI::ScintillaAPI(QsciLexer *lexer)
4040
keywords[Tuning] << ":just" << ":pythagorean" << ":meantone" << ":equal";
4141

4242
keywords[MidiParam] << "sustain:" << "velocity:" << "vel:" << "velocity_f:" << "vel_f:" << "port:" << "channel:";
43+
44+
keywords[RandomSource] << ":white" << ":light_pink" << ":pink" << ":dark_pink" << ":perlin";
4345
}
4446

4547

@@ -127,7 +129,8 @@ void ScintillaAPI::updateAutoCompletionList(const QStringList &context,
127129
ctx = Synth;
128130
} else if (last == "load_example") {
129131
ctx = Examples;
130-
132+
} else if (last == "use_random_source" || last == "with_random_source") {
133+
ctx = RandomSource;
131134
// autocomplete the second arg of scale/chord
132135
} else if (lastButOne == "scale") {
133136
ctx = Scale;

app/gui/qt/utils/scintilla_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class ScintillaAPI : public QsciAbstractAPIs
1818
{
1919
public:
20-
enum { Func, FX, Synth, Sample, Chord, Scale, MCBlock, PlayParam, SampleParam, Tuning, Examples, MidiParam, MidiOuts, CuePath, NContext};
20+
enum { Func, FX, Synth, Sample, Chord, Scale, MCBlock, PlayParam, SampleParam, Tuning, Examples, MidiParam, MidiOuts, CuePath, RandomSource, NContext};
2121

2222
ScintillaAPI(QsciLexer *lexer);
2323

0 commit comments

Comments
 (0)