Skip to content

Commit 20ff28b

Browse files
committed
Add tooltips.
1 parent e49a717 commit 20ff28b

File tree

4 files changed

+79
-7
lines changed

4 files changed

+79
-7
lines changed

ScriptEditor/FormEventEditor.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ private void LoadControls()
121121
// Add options to Hit By Aura combo box.
122122
cmbHitByAuraType.DataSource = GameData.SpellAuraNamesList;
123123

124+
//Add tooltips to controls.
125+
ToolTip toolTip1 = new ToolTip();
126+
toolTip1.AutoPopDelay = 5000;
127+
toolTip1.InitialDelay = 1000;
128+
toolTip1.ReshowDelay = 500;
129+
toolTip1.SetToolTip(this.lblEventId, "Event Ids should start from CreatureId * 100 + 1");
130+
toolTip1.SetToolTip(this.lblEventPhaseMask, "In which phases the event will NOT trigger.");
131+
toolTip1.SetToolTip(this.lblEventCondition, "Event will only trigger if the specified condition is satisfied.");
132+
toolTip1.SetToolTip(this.lblEventComment, "Creature Name - Action Description on Event Type (Phases)");
133+
124134
dontUpdate = false;
125135
}
126136

ScriptEditor/FormScriptEditor.Designer.cs

Lines changed: 32 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ScriptEditor/FormScriptEditor.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,22 @@ private void LoadControls()
271271
cmbTable.SelectedIndex = 0;
272272
cmbSetMovementType.SelectedIndex = 0;
273273

274+
//Add tooltips to controls.
275+
ToolTip toolTip1 = new ToolTip();
276+
toolTip1.AutoPopDelay = 5000;
277+
toolTip1.InitialDelay = 1000;
278+
toolTip1.ReshowDelay = 500;
279+
toolTip1.SetToolTip(this.chkSwapInitial, "Swaps the original source and target, before buddy is checked.");
280+
toolTip1.SetToolTip(this.chkSwapFinal, "Swaps the final source and target, after buddy is assigned.");
281+
toolTip1.SetToolTip(this.chkTargetSelf, "Replaces the final target with the final source.");
282+
toolTip1.SetToolTip(this.chkAbortScript, "Terminates the whole script if the command fails.");
283+
toolTip1.SetToolTip(this.chkSkipMissingTargets, "Command is skipped if source or target is not found, without printing an error.");
284+
toolTip1.SetToolTip(this.lblDelay, "Delay in seconds before the command runs.");
285+
toolTip1.SetToolTip(this.lblPriority, "Defines the order of execution of commands with the same delay. Lower priority runs first.");
286+
toolTip1.SetToolTip(this.lblCommandCondition, "Command will only be executed if the specified condition is satisfied. Checked after targets are assigned.");
287+
toolTip1.SetToolTip(this.lblComment, "Script Name: Source Name - Command Name");
288+
toolTip1.SetToolTip(this.lblTargetType, "Allows you to replace the original target that's provided to the script.\r\nBe aware that it's the source that executes the action, while target is only used as an additional argument for some commands.\r\nFor example if you use the Cast Spell command, its the source that will cast the spell at the target.\r\nTo make another object perform the action, use the flag to swap the source and target.");
289+
274290
//MessageBox.Show((cmbCommandId.SelectedItem as ComboboxPair).Value.ToString());
275291
dontUpdate = false;
276292
}
@@ -457,6 +473,7 @@ private void ResetAndDisableGeneralForm()
457473
cmbCommandId.Text = "";
458474

459475
// Check Boxes.
476+
chkSkipMissingTargets.Checked = false;
460477
chkAbortScript.Checked = false;
461478
chkSwapFinal.Checked = false;
462479
chkSwapInitial.Checked = false;
@@ -2223,6 +2240,8 @@ private void lstActions_SelectedIndexChanged(object sender, EventArgs e)
22232240
chkTargetSelf.Checked = true;
22242241
if ((selectedAction.DataFlags & 8) != 0)
22252242
chkAbortScript.Checked = true;
2243+
if ((selectedAction.DataFlags & 16) != 0)
2244+
chkSkipMissingTargets.Checked = true;
22262245

22272246
if (Program.highlight)
22282247
{
@@ -2621,6 +2640,11 @@ private void chkAbortScript_CheckedChanged(object sender, EventArgs e)
26212640
SetScriptFlagsFromCheckbox(chkAbortScript, "DataFlags", 8);
26222641
}
26232642

2643+
private void chkSkipMissingTargets_CheckedChanged(object sender, EventArgs e)
2644+
{
2645+
SetScriptFlagsFromCheckbox(chkSkipMissingTargets, "DataFlags", 16);
2646+
}
2647+
26242648
private void btnActionAdd_Click(object sender, EventArgs e)
26252649
{
26262650
ListViewItem newItem = new ListViewItem();
@@ -4257,6 +4281,17 @@ private void btnStartScriptForAllObjectEntry_Click(object sender, EventArgs e)
42574281
}
42584282
}
42594283
}
4284+
private void btnStartScriptForAllEdit_Click(object sender, EventArgs e)
4285+
{
4286+
uint script_id = 0;
4287+
uint.TryParse(txtStartScriptForAllScriptId.Text, out script_id);
4288+
if (script_id > 0)
4289+
{
4290+
FormScriptEditor formEditor = new FormScriptEditor();
4291+
formEditor.Show();
4292+
formEditor.LoadScript(script_id, "generic_scripts");
4293+
}
4294+
}
42604295

42614296
//SCRIPT_COMMAND_SUMMON_OBJECT (76)
42624297
private void btnSummonObjectId_Click(object sender, EventArgs e)

ScriptEditor/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("8.2.0.0")]
36-
[assembly: AssemblyFileVersion("8.2.0.0")]
35+
[assembly: AssemblyVersion("8.3.0.0")]
36+
[assembly: AssemblyFileVersion("8.3.0.0")]

0 commit comments

Comments
 (0)