mirror of https://github.com/odrling/Aegisub
Added a Normal/Reverse dropdown to collisions on Script Properties.
Originally committed to SVN as r714.
This commit is contained in:
parent
4552e87ec7
commit
fce56dcfe1
|
@ -65,6 +65,7 @@ Please visit http://aegisub.net to download latest version
|
|||
- Merged the three "Recombine" functions into a single one that autodetects the correct type. (AMZ)
|
||||
- Added a Call Tip feature to the edit box, so it shows the function prototype as you type it. (AMZ)
|
||||
- Added a much-needed options dialog with all the relevant config.dat options in it. (AMZ)
|
||||
- Added a Normal/Reverse dropdown to collisions on Script Properties. (AMZ)
|
||||
|
||||
|
||||
= 1.10 beta - 2006.08.07 ===========================
|
||||
|
|
|
@ -50,7 +50,7 @@ AboutScreen::AboutScreen(wxWindow *parent)
|
|||
{
|
||||
// Get splash
|
||||
wxBitmap splash = wxBITMAP(splash);
|
||||
SetBackgroundColour(wxColour(255,255,255));
|
||||
SetOwnBackgroundColour(wxColour(255,255,255));
|
||||
SetForegroundColour(wxColour(0,0,0));
|
||||
|
||||
// Picture
|
||||
|
@ -93,7 +93,8 @@ AboutScreen::AboutScreen(wxWindow *parent)
|
|||
aboutString += _T("ArchMage ZeratuL, jfs, movax, Kobi, TheFluff, Jcubed.\n");
|
||||
aboutString += _("Forum, wiki and bug tracker hosting by: ");
|
||||
aboutString += _T("Bot1.\n");
|
||||
aboutString += _("SVN hosting by BerliOS and Mentar.\n");
|
||||
aboutString += _("SVN hosting by: ");
|
||||
aboutString += _T("BerliOS, Mentar.\n");
|
||||
aboutString += translatorCredit;
|
||||
aboutString += _T("\n") + libString;
|
||||
aboutString += _("\nSee the help file for full credits.\n");
|
||||
|
@ -107,23 +108,26 @@ AboutScreen::AboutScreen(wxWindow *parent)
|
|||
wxSizer *TextSizer = new wxBoxSizer(wxVERTICAL);
|
||||
TextSizer->Add(new wxStaticText(this,-1,aboutString),1);
|
||||
|
||||
// Button sizer
|
||||
// Buttons panel
|
||||
wxPanel *buttonPanel = new wxPanel(this,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL);
|
||||
wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
ButtonSizer->AddStretchSpacer(1);
|
||||
#ifndef __WXMAC__
|
||||
ButtonSizer->Add(new wxButton(this,wxID_OK),0,0,0);
|
||||
ButtonSizer->Add(new wxButton(buttonPanel,wxID_OK),0,wxALIGN_RIGHT | wxALL,7);
|
||||
#else
|
||||
wxButton *okButton = new wxButton(this,wxID_OK);
|
||||
ButtonSizer->Add(okButton,0,0,0);
|
||||
wxButton *okButton = new wxButton(buttonPanel,wxID_OK);
|
||||
ButtonSizer->Add(okButton,0,wxALIGN_RIGHT | wxALL,7);
|
||||
okButton->SetDefault();
|
||||
#endif
|
||||
ButtonSizer->SetSizeHints(buttonPanel);
|
||||
buttonPanel->SetSizer(ButtonSizer);
|
||||
|
||||
// Main sizer
|
||||
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
MainSizer->Add(PicSizer,0,wxBOTTOM,5);
|
||||
MainSizer->Add(TextSizer,0,wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT,5);
|
||||
MainSizer->Add(new wxStaticLine(this,wxID_ANY),0,wxEXPAND | wxALL,5);
|
||||
MainSizer->Add(ButtonSizer,0,wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT,5);
|
||||
MainSizer->Add(PicSizer,0,0,0);
|
||||
MainSizer->Add(TextSizer,0,wxEXPAND | wxALL,10);
|
||||
MainSizer->Add(new wxStaticLine(this,wxID_ANY),0,wxEXPAND | wxALL,0);
|
||||
MainSizer->Add(buttonPanel,0,wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT,0);
|
||||
|
||||
// Set sizer
|
||||
MainSizer->SetSizeHints(this);
|
||||
|
|
|
@ -71,24 +71,25 @@ DialogProperties::DialogProperties (wxWindow *parent, VideoDisplay *_vid)
|
|||
wxStaticText *UpdateDetailsLabel = new wxStaticText(this,-1,_("Update details:"));
|
||||
UpdateDetailsEdit = new wxTextCtrl(this,-1,subs->GetScriptInfo(_T("Update Details")),wxDefaultPosition,wxSize(200,20));
|
||||
wxSizer *TopSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Script"));
|
||||
wxSizer *TopSizerGrid = new wxFlexGridSizer(0,2,5,5);
|
||||
wxFlexGridSizer *TopSizerGrid = new wxFlexGridSizer(0,2,5,5);
|
||||
TopSizerGrid->Add(TitleLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||
TopSizerGrid->Add(TitleEdit,1,0,0);
|
||||
TopSizerGrid->Add(TitleEdit,1,wxEXPAND,0);
|
||||
TopSizerGrid->Add(OrigScriptLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||
TopSizerGrid->Add(OrigScriptEdit,1,0,0);
|
||||
TopSizerGrid->Add(OrigScriptEdit,1,wxEXPAND,0);
|
||||
TopSizerGrid->Add(TranslationLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||
TopSizerGrid->Add(TranslationEdit,1,0,0);
|
||||
TopSizerGrid->Add(TranslationEdit,1,wxEXPAND,0);
|
||||
TopSizerGrid->Add(EditingLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||
TopSizerGrid->Add(EditingEdit,1,0,0);
|
||||
TopSizerGrid->Add(EditingEdit,1,wxEXPAND,0);
|
||||
TopSizerGrid->Add(TimingLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||
TopSizerGrid->Add(TimingEdit,1,0,0);
|
||||
TopSizerGrid->Add(TimingEdit,1,wxEXPAND,0);
|
||||
TopSizerGrid->Add(SyncLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||
TopSizerGrid->Add(SyncEdit,1,0,0);
|
||||
TopSizerGrid->Add(SyncEdit,1,wxEXPAND,0);
|
||||
TopSizerGrid->Add(UpdatedLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||
TopSizerGrid->Add(UpdatedEdit,1,0,0);
|
||||
TopSizerGrid->Add(UpdatedEdit,1,wxEXPAND,0);
|
||||
TopSizerGrid->Add(UpdateDetailsLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||
TopSizerGrid->Add(UpdateDetailsEdit,1,0,0);
|
||||
TopSizer->Add(TopSizerGrid,0,wxALL,0);
|
||||
TopSizerGrid->Add(UpdateDetailsEdit,1,wxEXPAND,0);
|
||||
TopSizerGrid->AddGrowableCol(1,1);
|
||||
TopSizer->Add(TopSizerGrid,1,wxALL | wxEXPAND,0);
|
||||
|
||||
// Resolution box
|
||||
wxSizer *ResSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Resolution"));
|
||||
|
@ -104,8 +105,9 @@ DialogProperties::DialogProperties (wxWindow *parent, VideoDisplay *_vid)
|
|||
ResSizer->Add(ResY,1,wxRIGHT,5);
|
||||
ResSizer->Add(FromVideo,1,0,0);
|
||||
|
||||
// Wrap box
|
||||
wxSizer *WrapBox = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Wrap style"));
|
||||
// Options
|
||||
wxSizer *optionsBox = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Options"));
|
||||
wxFlexGridSizer *optionsGrid = new wxFlexGridSizer(2,2,5,5);
|
||||
wxArrayString options;
|
||||
options.Add(_("0: Smart wrapping, top line is wider"));
|
||||
options.Add(_("1: End-of-line word wrapping, only \\N breaks"));
|
||||
|
@ -115,7 +117,19 @@ DialogProperties::DialogProperties (wxWindow *parent, VideoDisplay *_vid)
|
|||
long n;
|
||||
subs->GetScriptInfo(_T("WrapStyle")).ToLong(&n);
|
||||
WrapStyle->SetSelection(n);
|
||||
WrapBox->Add(WrapStyle,1,0,0);
|
||||
optionsGrid->Add(new wxStaticText(this,-1,_("Warp Style: ")),0,wxALIGN_CENTER_VERTICAL,0);
|
||||
optionsGrid->Add(WrapStyle,1,wxEXPAND,0);
|
||||
options.Clear();
|
||||
options.Add(_("Normal"));
|
||||
options.Add(_("Reverse"));
|
||||
collision = new wxComboBox(this,-1,_T(""),wxDefaultPosition,wxDefaultSize,options,wxCB_READONLY);
|
||||
wxString col = subs->GetScriptInfo(_T("Collisions"));
|
||||
if (col.Lower() == _T("reverse")) collision->SetSelection(1);
|
||||
else collision->SetSelection(0);
|
||||
optionsGrid->Add(new wxStaticText(this,-1,_("Collision: ")),0,wxALIGN_CENTER_VERTICAL,0);
|
||||
optionsGrid->Add(collision,1,wxEXPAND,0);
|
||||
optionsGrid->AddGrowableCol(1,1);
|
||||
optionsBox->Add(optionsGrid,1,wxEXPAND,0);
|
||||
|
||||
// Button sizer
|
||||
wxButton *ButtonOK = new wxButton(this,wxID_OK);
|
||||
|
@ -128,7 +142,7 @@ DialogProperties::DialogProperties (wxWindow *parent, VideoDisplay *_vid)
|
|||
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
MainSizer->Add(TopSizer,0,wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND,5);
|
||||
MainSizer->Add(ResSizer,0,wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND,5);
|
||||
MainSizer->Add(WrapBox,0,wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND,5);
|
||||
MainSizer->Add(optionsBox,0,wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND,5);
|
||||
MainSizer->Add(ButtonSizer,0,wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND,5);
|
||||
|
||||
// Set sizer
|
||||
|
@ -168,7 +182,9 @@ void DialogProperties::OnOK(wxCommandEvent &event) {
|
|||
count += SetInfoIfDifferent(_T("PlayResX"),ResX->GetValue());
|
||||
count += SetInfoIfDifferent(_T("PlayResY"),ResY->GetValue());
|
||||
count += SetInfoIfDifferent(_T("WrapStyle"),wxString::Format(_T("%i"),WrapStyle->GetSelection()));
|
||||
|
||||
wxString col[2] = { _T("Normal"), _T("Reverse")};
|
||||
count += SetInfoIfDifferent(_T("Collisions"),col[collision->GetSelection()]);
|
||||
|
||||
if (count) AssFile::top->FlagAsModified();
|
||||
|
||||
EndModal(count?1:0);
|
||||
|
|
|
@ -62,6 +62,7 @@ private:
|
|||
wxTextCtrl *UpdateDetailsEdit;
|
||||
|
||||
wxComboBox *WrapStyle;
|
||||
wxComboBox *collision;
|
||||
wxTextCtrl *ResX;
|
||||
wxTextCtrl *ResY;
|
||||
|
||||
|
|
Loading…
Reference in New Issue