Merge branch 'misc' into feature
This commit is contained in:
commit
86dfadb852
3 changed files with 13 additions and 12 deletions
|
@ -165,7 +165,7 @@ class WordSplitter {
|
|||
bool valid = true;
|
||||
for (size_t k = 0; k < tokens[j].length; k++) {
|
||||
char c = text[dpos + k];
|
||||
if (!((c >= '0' && c <= '9') || c == '.' || c == '-' || c == 'e')) {
|
||||
if (!((c >= '0' && c <= '9') || c == '.' || c == '+' || c == '-' || c == 'e' || c == 'E')) {
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ void MarkDrawings(std::string const& str, std::vector<DialogueToken> &tokens) {
|
|||
goto tag_p;
|
||||
if (!drawing_start)
|
||||
drawing_start = i + 2;
|
||||
if (drawing_end == drawing_start + 1)
|
||||
if (drawing_end == drawing_start)
|
||||
goto tag_p;
|
||||
|
||||
// We found a clip between drawing_start and drawing_end. Now, join
|
||||
|
|
|
@ -108,9 +108,9 @@ DialogDummyVideo::DialogDummyVideo(wxWindow *parent)
|
|||
d.SetIcon(GETICON(use_dummy_video_menu_16));
|
||||
|
||||
auto res_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
res_sizer->Add(spin_ctrl(&d, 1, 10000, &width), wxSizerFlags(1).Expand());
|
||||
res_sizer->Add(spin_ctrl(&d, 1, 100000, &width), wxSizerFlags(1).Expand());
|
||||
res_sizer->Add(new wxStaticText(&d, -1, " x "), wxSizerFlags().Center());
|
||||
res_sizer->Add(spin_ctrl(&d, 1, 10000, &height), wxSizerFlags(1).Expand());
|
||||
res_sizer->Add(spin_ctrl(&d, 1, 100000, &height), wxSizerFlags(1).Expand());
|
||||
|
||||
auto color_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto color_btn = new ColourButton(&d, wxSize(30, 17), false, color);
|
||||
|
|
|
@ -149,9 +149,10 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con
|
|||
sizer->Add(ctrl, wxSizerFlags(1).Left().Expand());
|
||||
};
|
||||
|
||||
auto num_text_ctrl = [&](double *value, double min, double max, double step) -> wxSpinCtrlDouble * {
|
||||
auto num_text_ctrl = [&](double *value, double min, double max, double step, int precision) -> wxSpinCtrlDouble * {
|
||||
auto scd = new wxSpinCtrlDouble(this, -1, "", wxDefaultPosition,
|
||||
wxDefaultSize, wxSP_ARROW_KEYS, min, max, *value, step);
|
||||
scd->SetDigits(precision);
|
||||
scd->SetValidator(DoubleSpinValidator(value));
|
||||
scd->Bind(wxEVT_SPINCTRLDOUBLE, [=](wxSpinDoubleEvent &evt) {
|
||||
evt.Skip();
|
||||
|
@ -186,7 +187,7 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con
|
|||
// Create controls
|
||||
StyleName = new wxTextCtrl(this, -1, to_wx(style->name));
|
||||
FontName = new wxComboBox(this, -1, to_wx(style->font), wxDefaultPosition, wxSize(150, -1), 0, nullptr, wxCB_DROPDOWN);
|
||||
auto FontSize = num_text_ctrl(&work->fontsize, 0, 10000.0, 1.0);
|
||||
auto FontSize = num_text_ctrl(&work->fontsize, 0, 10000.0, 1.0, 0);
|
||||
BoxBold = new wxCheckBox(this, -1, _("&Bold"));
|
||||
BoxItalic = new wxCheckBox(this, -1, _("&Italic"));
|
||||
BoxUnderline = new wxCheckBox(this, -1, _("&Underline"));
|
||||
|
@ -205,13 +206,13 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con
|
|||
}
|
||||
|
||||
Alignment = new wxRadioBox(this, -1, _("Alignment"), wxDefaultPosition, wxDefaultSize, 9, alignValues, 3, wxRA_SPECIFY_COLS);
|
||||
auto Outline = num_text_ctrl(&work->outline_w, 0.0, 1000.0, 0.1);
|
||||
auto Shadow = num_text_ctrl(&work->shadow_w, 0.0, 1000.0, 0.1);
|
||||
auto Outline = num_text_ctrl(&work->outline_w, 0.0, 1000.0, 0.1, 2);
|
||||
auto Shadow = num_text_ctrl(&work->shadow_w, 0.0, 1000.0, 0.1, 2);
|
||||
OutlineType = new wxCheckBox(this, -1, _("&Opaque box"));
|
||||
auto ScaleX = num_text_ctrl(&work->scalex, 0.0, 10000.0, 1.0);
|
||||
auto ScaleY = num_text_ctrl(&work->scaley, 0.0, 10000.0, 1.0);
|
||||
auto Angle = num_text_ctrl(&work->angle, -360.0, 360.0, 1.0);
|
||||
auto Spacing = num_text_ctrl(&work->spacing, 0.0, 1000.0, 0.1);
|
||||
auto ScaleX = num_text_ctrl(&work->scalex, 0.0, 10000.0, 1, 2);
|
||||
auto ScaleY = num_text_ctrl(&work->scaley, 0.0, 10000.0, 1, 2);
|
||||
auto Angle = num_text_ctrl(&work->angle, -360.0, 360.0, 1.0, 2);
|
||||
auto Spacing = num_text_ctrl(&work->spacing, -1000.0, 1000.0, 0.1, 3);
|
||||
Encoding = new wxComboBox(this, -1, "", wxDefaultPosition, wxDefaultSize, encodingStrings, wxCB_READONLY);
|
||||
|
||||
// Set control tooltips
|
||||
|
|
Loading…
Reference in a new issue