public override void Update()
        {
            base.Update();

            if (!isVisible)
            {
                return;
            }

            if (--Counter > 0)
            {
                return;
            }
            Counter = 10;

            EnhancedDisastersManager edm = Singleton <EnhancedDisastersManager> .instance;
            int disasterCount            = edm.container.AllDisasters.Count;

            for (int i = 0; i < disasterCount; i++)
            {
                EnhancedDisaster d            = edm.container.AllDisasters[i];
                float            p            = d.GetCurrentOccurrencePerYear();
                byte             maxIntensity = d.GetMaximumIntensity();
                if (d.Enabled)
                {
                    labels[i].text = string.Format(labelFormat, d.GetName(), p, maxIntensity);

                    progressBars_probability[i].value = getProgressValueLog(p);
                    setProgressBarColor(progressBars_probability[i]);
                    progressBars_probability[i].tooltip = d.GetProbabilityTooltip();

                    progressBars_maxIntensity[i].value = maxIntensity * 0.01f;
                    setProgressBarColor(progressBars_maxIntensity[i]);
                    progressBars_maxIntensity[i].tooltip = d.GetIntensityTooltip();
                }
                else
                {
                    labels[i].text = "Disabled";

                    progressBars_probability[i].value         = 0;
                    progressBars_probability[i].progressColor = Color.black;

                    progressBars_maxIntensity[i].value         = 0;
                    progressBars_maxIntensity[i].progressColor = Color.black;
                }
            }
        }
        public override void Start()
        {
            base.Start();

            UILabel lTitle = this.AddUIComponent <UILabel>();

            lTitle.position = new Vector3(10, -15);
            lTitle.text     = "Disasters info";

            int y = -50;
            int h = -20;

            addAxisTitle(200, y, "Probability");
            addAxisTitle(300, y, "Max intensity");
            y -= 15;

            addAxisLabel(200, y, "0.1");
            addAxisLabel(240, y, "1");
            addAxisLabel(275, y, "10");
            addAxisLabel(300, y, "1");
            addAxisLabel(375, y, "10");
            y -= 15;

            int disasterCount = Singleton <EnhancedDisastersManager> .instance.container.AllDisasters.Count;

            labels = new UILabel[disasterCount];
            progressBars_probability  = new UIProgressBar[disasterCount];
            progressBars_maxIntensity = new UIProgressBar[disasterCount];

            EnhancedDisastersManager edm = Singleton <EnhancedDisastersManager> .instance;

            for (int i = 0; i < disasterCount; i++)
            {
                EnhancedDisaster d = edm.container.AllDisasters[i];
                labels[i]      = addLabel(10, y);
                labels[i].text = string.Format(labelFormat, d.GetName(), 0, 0);
                progressBars_probability[i]  = addProgressBar(200, y);
                progressBars_maxIntensity[i] = addProgressBar(300, y);
                y += h;
            }

            UIButton bigRedBtn = this.AddUIComponent <UIButton>();

            bigRedBtn.name     = "bigRedBtn";
            bigRedBtn.position = new Vector3(10, -height + 30);
            bigRedBtn.size     = new Vector2(22, 22);
            //bigRedBtn.color = Color.red;
            bigRedBtn.focusedColor     = Color.red;
            bigRedBtn.textColor        = Color.red;
            bigRedBtn.focusedTextColor = Color.red;
            bigRedBtn.text             = "■";
            bigRedBtn.normalBgSprite   = "ButtonMenu";
            bigRedBtn.hoveredBgSprite  = "ButtonMenuHovered";
            bigRedBtn.eventClick      += BigRedBtn_eventClick;

            UILabel bigRedBtnLabel = this.AddUIComponent <UILabel>();

            bigRedBtnLabel.name      = "bigRedBtnLabel";
            bigRedBtnLabel.position  = new Vector3(40, -height + 27);
            bigRedBtnLabel.size      = new Vector2(width - 30, 20);
            bigRedBtnLabel.textColor = Color.white;
            //bigRedBtnLabel.textScale = 0.7f;
            bigRedBtnLabel.text = "← Emergency Button (stop all disasters)";

            UIButton btn = this.AddUIComponent <UIButton>();

            btn.position       = new Vector3(365, -5);
            btn.size           = new Vector2(30, 30);
            btn.normalFgSprite = "buttonclose";
            btn.eventClick    += Btn_eventClick;
        }