-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreatureVisualizer.cs
81 lines (66 loc) · 1.63 KB
/
CreatureVisualizer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using System;
using NWN2Toolset.Plugins;
using TD.SandBar;
namespace creaturevisualizer
{
/// <summary>
/// NwN2 Electron toolset plugin.
/// </summary>
public class CreatureVisualizer
: INWN2Plugin
{
#region INWN2Plugin (interface)
public MenuButtonItem PluginMenuItem
{ get; set; }
public object Preferences
{
get { return CreatureVisualizerPreferences.that; }
set { CreatureVisualizerPreferences.that = (CreatureVisualizerPreferences)value; }
}
/// <summary>
/// Preferences will be stored in an XML-file w/ this label in
/// C:\Users\User\AppData\Local\NWN2 Toolset\Plugins
/// (or similar).
/// </summary>
public string Name
{
get { return "CreatureVisualizer"; }
}
/// <summary>
/// The label of the operation on the toolset's "Plugins" menu.
/// </summary>
public string MenuName
{
get { return "Creature Visualizer"; }
}
/// <summary>
/// The caption on the titlebar of the plugin window.
/// </summary>
public string DisplayName
{
get { return "Creature Visualizer"; }
}
public void Load(INWN2PluginHost host)
{}
public void Startup(INWN2PluginHost host)
{
PluginMenuItem = host.GetMenuForPlugin(this);
PluginMenuItem.Activate += activate;
}
public void Shutdown(INWN2PluginHost host)
{}
public void Unload(INWN2PluginHost host)
{}
#endregion INWN2Plugin (interface)
/// <summary>
/// Handler that launches CreatureVisualizer from the toolset's Plugins.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void activate(object sender, EventArgs e)
{
var f = new CreVisF();
f.Show();
}
}
}