Exemplo n.º 1
0
 public void OnValueChange(UiOpacityControl o, NumberArgs e)
 {
     if (ValueChanged != null)
     {
         ValueChanged(o, e);
     }
 }
Exemplo n.º 2
0
 public void OnValueChange(UiOpacityControl o, NumberArgs e)
 {
     if (ValueChanged != null)
         ValueChanged(o, e);
 }
Exemplo n.º 3
0
        void ocOverlaysOpacity_ValueChanged(UiOpacityControl uiOpacityControl, NumberArgs eventNumber)
        {
            var parent = HelpFunctions.findParentByName(uiOpacityControl, "pnlOverlays");

            if (parent.Name.Contains("Resource"))
                PSettings.PreferenceAll.OverlayResources.Opacity = (float)uiOpacityControl.Number / 100;

            else if (parent.Name.Contains("Income"))
                PSettings.PreferenceAll.OverlayIncome.Opacity = (float)uiOpacityControl.Number / 100;

            else if (parent.Name.Contains("Worker"))
                PSettings.PreferenceAll.OverlayWorker.Opacity = (float)uiOpacityControl.Number / 100;

            else if (parent.Name.Contains("Apm"))
                PSettings.PreferenceAll.OverlayApm.Opacity = (float)uiOpacityControl.Number / 100;

            else if (parent.Name.Contains("Army"))
                PSettings.PreferenceAll.OverlayArmy.Opacity = (float)uiOpacityControl.Number / 100;

            else if (parent.Name.Contains("Maphack"))
                PSettings.PreferenceAll.OverlayMaphack.Opacity = (float)uiOpacityControl.Number / 100;

            else if (parent.Name.Contains("Production"))
                PSettings.PreferenceAll.OverlayProduction.Opacity = (float)uiOpacityControl.Number / 100;

            else if (parent.Name.Contains("Unit"))
                PSettings.PreferenceAll.OverlayUnits.Opacity = (float)uiOpacityControl.Number / 100;

            else
                Messages.Show("Couldn't find parent!");
        }