1
0
mirror of synced 2024-12-01 10:37:25 +01:00

BFLYT : Fix and improve switching font files in the pane text editor

This commit is contained in:
KillzXGaming 2020-01-03 18:27:49 -05:00
parent c326850ffd
commit 34b2a4642a
2 changed files with 8 additions and 3 deletions

View File

@ -62,7 +62,7 @@
this.stComboBox1.IsReadOnly = false; this.stComboBox1.IsReadOnly = false;
this.stComboBox1.Location = new System.Drawing.Point(9, 55); this.stComboBox1.Location = new System.Drawing.Point(9, 55);
this.stComboBox1.Name = "stComboBox1"; this.stComboBox1.Name = "stComboBox1";
this.stComboBox1.Size = new System.Drawing.Size(158, 21); this.stComboBox1.Size = new System.Drawing.Size(342, 21);
this.stComboBox1.TabIndex = 0; this.stComboBox1.TabIndex = 0;
// //
// stTextBox1 // stTextBox1
@ -86,7 +86,7 @@
// btnAdd // btnAdd
// //
this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAdd.Location = new System.Drawing.Point(173, 53); this.btnAdd.Location = new System.Drawing.Point(357, 55);
this.btnAdd.Name = "btnAdd"; this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(75, 23); this.btnAdd.Size = new System.Drawing.Size(75, 23);
this.btnAdd.TabIndex = 3; this.btnAdd.TabIndex = 3;

View File

@ -44,7 +44,7 @@ namespace LayoutBXLYT
if (fonts != null) if (fonts != null)
{ {
foreach (var font in fonts) foreach (var font in fonts)
fontFileCB.Items.Add(pane.FontName); fontFileCB.Items.Add(font);
} }
if (fontFileCB.Items.Contains(pane.FontName)) if (fontFileCB.Items.Contains(pane.FontName))
@ -176,6 +176,8 @@ namespace LayoutBXLYT
activePane.ShadowXYSize = new Syroot.Maths.Vector2F( activePane.ShadowXYSize = new Syroot.Maths.Vector2F(
shadowScaleXUD.Value, shadowScaleYUD.Value); shadowScaleXUD.Value, shadowScaleYUD.Value);
parentEditor.PropertyChanged?.Invoke(sender, e);
} }
private void chkSizeRestrict_CheckedChanged(object sender, EventArgs e) { private void chkSizeRestrict_CheckedChanged(object sender, EventArgs e) {
@ -197,6 +199,8 @@ namespace LayoutBXLYT
activePane.HorizontalAlignment = (OriginX)alighmentHCB.SelectedItem; activePane.HorizontalAlignment = (OriginX)alighmentHCB.SelectedItem;
activePane.VerticalAlignment = (OriginY)alighmentVCB.SelectedItem; activePane.VerticalAlignment = (OriginY)alighmentVCB.SelectedItem;
activePane.LineAlignment = (LineAlign)alighmentLineCB.SelectedItem; activePane.LineAlignment = (LineAlign)alighmentLineCB.SelectedItem;
parentEditor.PropertyChanged?.Invoke(sender, e);
} }
private void fontFileCB_SelectedIndexChanged(object sender, EventArgs e) private void fontFileCB_SelectedIndexChanged(object sender, EventArgs e)
@ -205,6 +209,7 @@ namespace LayoutBXLYT
activePane.FontName = (string)fontFileCB.SelectedItem; activePane.FontName = (string)fontFileCB.SelectedItem;
activePane.FontIndex = (ushort)fontFileCB.SelectedIndex; activePane.FontIndex = (ushort)fontFileCB.SelectedIndex;
parentEditor.PropertyChanged?.Invoke(sender, e);
} }
} }
} }