/// <summary>
        /// Constructs a new instance of a HudManager. You <b>must</b> also register
        ///  the GraphicsReset() function for the PluginBase.GraphicsReset event.
        /// </summary>
        /// <param name="host">PluginBase.Host</param>
        /// <param name="core">PluginBase.Core</param>
        /// <param name="startHeartbeatNow">If this is true, the heartbeat
        ///		timer will start ticking right away. This is generally
        ///		undesirable if this HudManager is created in the Startup()
        ///		method of the plugin. If this is false, you must call
        ///		<see cref="StartHeartbeat()"/> at a later time, such as during
        ///		the PlayerLogin event.</param>
        public HudManager(PluginHost host, CoreManager core, MyClasses.MetaViewWrappers.IView defaultView, DefaultViewActiveDelegate defaultViewActive, bool startHeartbeatNow)
        {
            mHost              = host;
            mCore              = core;
            mDefaultView       = defaultView;
            mDefaultViewActive = defaultViewActive;

            mToolTip = new ToolTipHud(this);

            mRepaintHeartbeat          = new DecalTimer();
            mRepaintHeartbeat.Timeout += new Decal.Interop.Input.ITimerEvents_TimeoutEventHandler(RepaintHeartbeatDispatch);
            if (startHeartbeatNow)
            {
                StartHeartbeat();
            }

            //Core.WindowMessage += new EventHandler<WindowMessageEventArgs>(WindowMessageDispatch);
        }
Example #2
0
		/// <summary>
		/// Constructs a new instance of a HudManager. You <b>must</b> also register
		///  the GraphicsReset() function for the PluginBase.GraphicsReset event.
		/// </summary>
		/// <param name="host">PluginBase.Host</param>
		/// <param name="core">PluginBase.Core</param>
		/// <param name="startHeartbeatNow">If this is true, the heartbeat 
		///		timer will start ticking right away. This is generally 
		///		undesirable if this HudManager is created in the Startup() 
		///		method of the plugin. If this is false, you must call 
		///		<see cref="StartHeartbeat()"/> at a later time, such as during 
		///		the PlayerLogin event.</param>
		public HudManager(PluginHost host, CoreManager core, ViewWrapper defaultView, DefaultViewActiveDelegate defaultViewActive, bool startHeartbeatNow)
		{
			mHost = host;
			mCore = core;
			mDefaultView = defaultView;
			mDefaultViewActive = defaultViewActive;

			mToolTip = new ToolTipHud(this);

			mRepaintHeartbeat = new DecalTimer();
			mRepaintHeartbeat.Timeout += new Decal.Interop.Input.ITimerEvents_TimeoutEventHandler(RepaintHeartbeatDispatch);
			if (startHeartbeatNow)
				StartHeartbeat();

			//Core.WindowMessage += new EventHandler<WindowMessageEventArgs>(WindowMessageDispatch);
		}