forked from mia/Aegisub
Make AssStyle::UpdateData and GetSSAText less weird
This commit is contained in:
parent
56993f7f5e
commit
f337db86d3
1 changed files with 21 additions and 34 deletions
|
@ -172,44 +172,31 @@ AssStyle::AssStyle(wxString rawData, int version)
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssStyle::UpdateData() {
|
void AssStyle::UpdateData() {
|
||||||
wxString final;
|
name.Replace(",", ";");
|
||||||
|
font.Replace(",", ";");
|
||||||
|
|
||||||
name.Replace(",",";");
|
SetEntryData(wxString::Format("Style: %s,%s,%g,%s,%s,%s,%s,%d,%d,%d,%d,%g,%g,%g,%g,%d,%g,%g,%i,%i,%i,%i,%i",
|
||||||
font.Replace(",",";");
|
name, font, fontsize,
|
||||||
|
primary.GetAssStyleFormatted(),
|
||||||
final = wxString::Format("Style: %s,%s,%g,%s,%s,%s,%s,%d,%d,%d,%d,%g,%g,%g,%g,%d,%g,%g,%i,%i,%i,%i,%i",
|
secondary.GetAssStyleFormatted(),
|
||||||
name, font, fontsize,
|
outline.GetAssStyleFormatted(),
|
||||||
primary.GetAssStyleFormatted(),
|
shadow.GetAssStyleFormatted(),
|
||||||
secondary.GetAssStyleFormatted(),
|
(bold? -1 : 0), (italic ? -1 : 0),
|
||||||
outline.GetAssStyleFormatted(),
|
(underline?-1:0),(strikeout?-1:0),
|
||||||
shadow.GetAssStyleFormatted(),
|
scalex,scaley,spacing,angle,
|
||||||
(bold? -1 : 0), (italic ? -1 : 0),
|
borderstyle,outline_w,shadow_w,alignment,
|
||||||
(underline?-1:0),(strikeout?-1:0),
|
Margin[0],Margin[1],Margin[2],encoding));
|
||||||
scalex,scaley,spacing,angle,
|
|
||||||
borderstyle,outline_w,shadow_w,alignment,
|
|
||||||
Margin[0],Margin[1],Margin[2],encoding);
|
|
||||||
|
|
||||||
SetEntryData(final);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString AssStyle::GetSSAText() const {
|
wxString AssStyle::GetSSAText() const {
|
||||||
wxString output;
|
return wxString::Format("Style: %s,%s,%g,%s,%s,0,%s,%d,%d,%d,%g,%g,%d,%d,%d,%d,0,%i",
|
||||||
int align = AssToSsa(alignment);
|
name, font, fontsize,
|
||||||
wxString n = name;
|
primary.GetSsaFormatted(),
|
||||||
n.Replace(",", ";");
|
secondary.GetSsaFormatted(),
|
||||||
wxString f = font;
|
shadow.GetSsaFormatted(),
|
||||||
f.Replace(",", ";");
|
(bold? -1 : 0), (italic ? -1 : 0),
|
||||||
|
borderstyle,outline_w,shadow_w,AssToSsa(alignment),
|
||||||
output = wxString::Format("Style: %s,%s,%g,%s,%s,0,%s,%d,%d,%d,%g,%g,%d,%d,%d,%d,0,%i",
|
Margin[0],Margin[1],Margin[2],encoding);
|
||||||
n, f, fontsize,
|
|
||||||
primary.GetSsaFormatted(),
|
|
||||||
secondary.GetSsaFormatted(),
|
|
||||||
shadow.GetSsaFormatted(),
|
|
||||||
(bold? -1 : 0), (italic ? -1 : 0),
|
|
||||||
borderstyle,outline_w,shadow_w,align,
|
|
||||||
Margin[0],Margin[1],Margin[2],encoding);
|
|
||||||
|
|
||||||
return output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AssEntry *AssStyle::Clone() const {
|
AssEntry *AssStyle::Clone() const {
|
||||||
|
|
Loading…
Reference in a new issue