Esempio n. 1
0
        public AnnouncementViewer(DwarfGUI gui, GUIComponent parent, AnnouncementManager manager) :
            base(gui, parent)
        {
            SpeechBubble = new Panel(gui, this)
            {
                Mode      = Panel.PanelMode.SpeechBubble,
                DrawOrder = -2
            };
            SpeechBubble.IsVisible = false;
            Manager = manager;

            Manager.OnAdded   += Manager_OnAdded;
            Manager.OnRemoved += Manager_OnRemoved;

            IsMaximized = false;

            AnnouncementViews = new List <AnnouncementView>();
            MaxViews          = 4;
            WaitTimer         = new Timer(5, true);
            Talker            = new AnimatedImagePanel(GUI, this, animation)
            {
                LocalBounds = new Rectangle(-128, -64, 128, 128)
            };
            animation.Play();
            animation.Loops   = true;
            animation.FrameHZ = 2.0f;
        }
Esempio n. 2
0
        public AnnouncementViewer(DwarfGUI gui, GUIComponent parent, AnnouncementManager manager)
            : base(gui, parent)
        {
            TweenTimer = new Timer(0.5f, true);
            TweenOutTimer = new Timer(0.5f, true);
            SpeechBubble = new Panel(gui, this)
            {
                Mode = Panel.PanelMode.SpeechBubble,
                DrawOrder = -2
            };
            SpeechBubble.IsVisible = false;
            Manager = manager;

            Manager.OnAdded += Manager_OnAdded;
            Manager.OnRemoved += Manager_OnRemoved;

            IsMaximized = false;

            AnnouncementViews = new List<AnnouncementView>();
            MaxViews = 4;
            WaitTimer = new Timer(5, true);
            Talker = new AnimatedImagePanel(GUI, this, animation);
            animation.Play();
            animation.Loops = true;
            animation.FrameHZ = 2.0f;
        }