Esempio n. 1
0
        public override void Preparation(MHEngine engine)
        {
            if (AvailabilityStatus)
            {
                return;
            }
            // Set the colours and font up from the originals if specified otherwise use the application defaults.
            //  if (m_OrigFont.IsSet()) m_Font.Copy(m_OrigFont);
            //  else m_Font.Copy(engine->m_DefaultFont);
            if (m_OriginalTextColour.IsSet())
            {
                m_textColour.Copy(m_OriginalTextColour);
            }
            else
            {
                engine.GetDefaultTextColour(m_textColour);
            }
            Logging.Assert(m_textColour.IsSet());
            if (m_OriginalBgColour.IsSet())
            {
                m_bgColour.Copy(m_OriginalBgColour);
            }
            else
            {
                engine.GetDefaultBGColour(m_bgColour);
            }
            Logging.Assert(m_bgColour.IsSet());
            if (m_OriginalFontAttrs.Size > 0)
            {
                m_fontAttrs.Copy(m_OriginalFontAttrs);
            }
            else
            {
                engine.GetDefaultFontAttrs(m_fontAttrs);
            }
            base.Preparation(engine);

            m_pDisplay.SetSize(m_nBoxWidth, m_nBoxHeight);
            m_NeedsRedraw = true;
        }