UltimateZoneBuilder/Source/Core/Controls/HintsPanel.cs
MaxED 013865e27d Voxels can now be loaded from WAD resources.
Reverted "Delete Item" action to the way it worked in DB2.
Added "Dissolve Item" action, which works the way "Delete Item" worked in previous revisions of GZDB.
Added "Auto Clear Sidedef Textures" action, "Edit" menu and toolbar button, which toggle automatic removal of sidedef textures when floor or ceiling height is changed or when geometry is drawn, copied or pasted.
Draw Settings panel: upper/lower texture overrides can now be used.
Draw Settings panel: added 2 sets of buttons, which allow to quickly set or clear textures in current selection.
Things are now rendered behind AND on top of the grid/linedefs/vertices when they are dragged.
Redesigned hints system. They are now shown in a side panel.
Edit area auto-focusing is now disabled when script editor is open.
Texture Browser form: no texture group was selected when opening the form in some cases.
Fixed several strange/misleading text messages.
2014-01-08 09:46:57 +00:00

43 lines
1 KiB
C#

using System;
using System.Drawing;
using System.Windows.Forms;
namespace CodeImp.DoomBuilder.Controls
{
internal partial class HintsPanel : UserControl
{
public HintsPanel() {
InitializeComponent();
hints.Clear();
}
internal void SetHints(string[] hintsText) {
hints.Clear();
foreach (string s in hintsText) {
hints.AppendText(s + Environment.NewLine + Environment.NewLine);
}
//apply <b> tags
int start = hints.Text.IndexOf("<b>");
int end = hints.Text.IndexOf("</b>");
Font regular = hints.Font;
Font bold = new Font(hints.SelectionFont, FontStyle.Bold);
while(start != -1 && end != -1) {
hints.Select(start, end + 4 - start);
hints.SelectionFont = bold;
hints.SelectedText = hints.SelectedText.Replace("<b>", "").Replace("</b>", "");
start = hints.Text.IndexOf("<b>");
end = hints.Text.IndexOf("</b>");
}
hints.SelectionFont = regular;
}
internal void ClearHints() {
hints.Clear();
}
}
}