forked from mia/Aegisub
Make audio color schemes selectable in the preferences dialog
Originally committed to SVN as r5950.
This commit is contained in:
parent
1a4d116617
commit
fa15f0800e
2 changed files with 15 additions and 6 deletions
|
@ -31,6 +31,10 @@
|
||||||
},
|
},
|
||||||
"Type" : 1
|
"Type" : 1
|
||||||
},
|
},
|
||||||
|
"Colour Schemes" : [
|
||||||
|
{ "string" : "Green" },
|
||||||
|
{ "string" : "Icy Blue" }
|
||||||
|
],
|
||||||
"Display Height" : 200,
|
"Display Height" : 200,
|
||||||
"Display" : {
|
"Display" : {
|
||||||
"Draw" : {
|
"Draw" : {
|
||||||
|
|
|
@ -58,6 +58,12 @@
|
||||||
#include "audio_player_portaudio.h"
|
#include "audio_player_portaudio.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static wxArrayString vec_to_arrstr(std::vector<std::string> const& vec) {
|
||||||
|
wxArrayString arrstr;
|
||||||
|
std::copy(vec.begin(), vec.end(), std::back_inserter(arrstr));
|
||||||
|
return arrstr;
|
||||||
|
}
|
||||||
|
|
||||||
#define CLASS_PAGE(name) \
|
#define CLASS_PAGE(name) \
|
||||||
class name: public OptionPage { \
|
class name: public OptionPage { \
|
||||||
public: \
|
public: \
|
||||||
|
@ -162,6 +168,11 @@ Audio::Audio(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _(
|
||||||
OptionAdd(display, _("Karaoke keyframes"), "Audio/Display/Draw/Keyframes in Karaoke Mode");
|
OptionAdd(display, _("Karaoke keyframes"), "Audio/Display/Draw/Keyframes in Karaoke Mode");
|
||||||
OptionAdd(display, _("Video position"), "Audio/Display/Draw/Video Position");
|
OptionAdd(display, _("Video position"), "Audio/Display/Draw/Video Position");
|
||||||
|
|
||||||
|
wxFlexGridSizer *color = PageSizer(_("Color Schemes"));
|
||||||
|
wxArrayString schemes = vec_to_arrstr(OPT_GET("Audio/Colour Schemes")->GetListString());
|
||||||
|
OptionChoice(color, _("Spectrum"), schemes, "Colour/Audio Display/Spectrum");
|
||||||
|
OptionChoice(color, _("Waveform"), schemes, "Colour/Audio Display/Waveform");
|
||||||
|
|
||||||
SetSizerAndFit(sizer);
|
SetSizerAndFit(sizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,12 +443,6 @@ Advanced_Interface::Advanced_Interface(wxTreebook *book, Preferences *parent): O
|
||||||
SetSizerAndFit(sizer);
|
SetSizerAndFit(sizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static wxArrayString vec_to_arrstr(std::vector<std::string> const& vec) {
|
|
||||||
wxArrayString arrstr;
|
|
||||||
std::copy(vec.begin(), vec.end(), std::back_inserter(arrstr));
|
|
||||||
return arrstr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Advanced Audio preferences subpage
|
/// Advanced Audio preferences subpage
|
||||||
Advanced_Audio::Advanced_Audio(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _("Audio"), PAGE_SUB) {
|
Advanced_Audio::Advanced_Audio(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _("Audio"), PAGE_SUB) {
|
||||||
wxFlexGridSizer *expert = PageSizer(_("Expert"));
|
wxFlexGridSizer *expert = PageSizer(_("Expert"));
|
||||||
|
|
Loading…
Reference in a new issue