protected override void InitializeSkins(ref SkinManager Skins) { Skins.Add("Ezreal"); Skins.Add("Nottingham Ezreal"); Skins.Add("Striker Ezreal"); Skins.Add("Frosted Ezreal"); Skins.Add("Explorer Ezreal"); Skins.Add("Pulsefire Ezreal"); Skins.Add("TPA Ezreal"); Skins.Add("Debonair Ezreal"); }
protected override void InitializeSkins(ref SkinManager Skins) { Skins.Add("Ryze"); Skins.Add("Human Ryze"); Skins.Add("Tribal Ryze"); Skins.Add("Uncle Ryze"); Skins.Add("Triumphant Ryze"); Skins.Add("Professor Ryze"); Skins.Add("Zombie Ryze"); Skins.Add("Dark Crystal Ryze"); Skins.Add("Pirate Ryze"); }
public OfflineLinks CreateSkin(PanelPreferences preferences, string skinFolderPath, string dataPath, string newFolderName) { // TODO the template path shouldn't be under the scratch path where we create // the packages. For session support the scratch folder should be independent // remove the old update folder SkinManager manager = new SkinManager(skinFolderPath); manager.DeleteUploadFolders(); manager.CreateDirectoriesAndUnzipFiles(preferences.HdnSelectedLayout); manager.UpdateSkin(preferences, dataPath); OfflineLinks offlineLinks = manager.CompressNewSkins(newFolderName); manager.DeleteUploadFolders(); return offlineLinks; }
private void Game_OnGameLoad(EventArgs args) { Player = ObjectManager.Player; if (ChampName.ToLower() != Player.ChampionName.ToLower()) return; SkinManager = new SkinManager(); Spells = new SpellManager(); InitializeSpells(ref Spells); InitializeSkins(ref SkinManager); Menu = new Menu("Easy" + ChampName, "Easy" + ChampName, true); SkinManager.AddToMenu(ref Menu); Menu.AddSubMenu(new Menu("Target Selector", "Target Selector")); SimpleTs.AddToMenu(Menu.SubMenu("Target Selector")); Menu.AddSubMenu(new Menu("Orbwalker", "Orbwalker")); Orbwalker = new Orbwalking.Orbwalker(Menu.SubMenu("Orbwalker")); InitializeMenu(); Menu.AddItem(new MenuItem("Recall_block", "Block spells while recalling").SetValue(true)); Menu.AddToMainMenu(); Game.OnGameUpdate += Game_OnGameUpdate; Game.OnGameEnd += Game_OnGameEnd; Drawing.OnDraw += Drawing_OnDraw; try { using (WebClient wc = new WebClient()) { wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded"; string amount = wc.UploadString("http://niels-wouters.be/LeagueSharp/playcount.php", "assembly=" + ChampName); Game.PrintChat("Easy" + ChampName + " is loaded! This assembly has been played in " + amount + " games."); } } catch (Exception) { Game.PrintChat("Easy" + ChampName + " is loaded! Error trying to contact EasyServer!"); } }
// Modified by Khushbu for phase 2 task 'Allow the UI to load previously generated zip files in order to pre-populate the form'. // Now this function will return created SkinPackage Link. public string CreateSkin(PanelPreferences preferences, string skinFolderPath, string dataPath, string newFolderName) { // TODO the template path shouldn't be under the scratch path where we create // the packages. For session support the scratch folder should be independent // remove the old update folder SkinManager manager = new SkinManager(skinFolderPath); manager.DeleteUploadFolders(); // manager.CreateDirectoriesAndUnzipFiles(preferences.HdnSelectedLayout); manager.CreateDirectoriesAndUnzipFiles(preferences.HdnSelectedLayoutName); // Modified by K.G. for phase 2 task.now operation will be performed based on Template name rather than index. manager.UpdateSkin(preferences, dataPath); manager.UpdateEmailTemplates(preferences, dataPath, newFolderName);// Added by K.G(07/12/2011) to update email template files according to user entered values. manager.UpdateSubstitutionFile(preferences); // Added by K.G for phase 2 task. update the sbstitution file according to user selected value . string SkinPackageLink = manager.CompressNewSkins(newFolderName); // Added by K.G for phase 2 task. Returned only one link for created pacakage. return SkinPackageLink; }
protected override void InitializeSkins(ref SkinManager Skins) { Skins.Add("Jinx"); Skins.Add("Mafia Jinx"); }
public MaterialDivider() { SetStyle(ControlStyles.SupportsTransparentBackColor, true); Height = 1; BackColor = SkinManager.GetDividersColor(); }
protected virtual void InitializeSkins(ref SkinManager Skins) { }
protected override void OnPaint(PaintEventArgs pevent) { var g = pevent.Graphics; g.SmoothingMode = SmoothingMode.AntiAlias; g.TextRenderingHint = TextRenderingHint.AntiAlias; // clear the control g.Clear(Parent.BackColor); var RADIOBUTTON_CENTER = _boxOffset + RADIOBUTTON_SIZE_HALF; var animationProgress = _animationManager.GetProgress(); int colorAlpha = Enabled ? (int)(animationProgress * 255.0) : SkinManager.GetCheckBoxOffDisabledColor().A; int backgroundAlpha = Enabled ? (int)(SkinManager.GetCheckboxOffColor().A *(1.0 - animationProgress)) : SkinManager.GetCheckBoxOffDisabledColor().A; float animationSize = (float)(animationProgress * 8f); float animationSizeHalf = animationSize / 2; animationSize = (float)(animationProgress * 9f); var brush = new SolidBrush(Color.FromArgb(colorAlpha, Enabled ? SkinManager.ColorScheme.AccentColor : SkinManager.GetCheckBoxOffDisabledColor())); var pen = new Pen(brush.Color); // draw ripple animation if (Ripple && _rippleAnimationManager.IsAnimating()) { for (var i = 0; i < _rippleAnimationManager.GetAnimationCount(); i++) { var animationValue = _rippleAnimationManager.GetProgress(i); var animationSource = new Point(RADIOBUTTON_CENTER, RADIOBUTTON_CENTER); var rippleBrush = new SolidBrush(Color.FromArgb((int)((animationValue * 40)), ((bool)_rippleAnimationManager.GetData(i)[0]) ? Color.Black : brush.Color)); var rippleHeight = (Height % 2 == 0) ? Height - 3 : Height - 2; var rippleSize = (_rippleAnimationManager.GetDirection(i) == AnimationDirection.InOutIn) ? (int)(rippleHeight * (0.8d + (0.2d * animationValue))) : rippleHeight; using (var path = DrawHelper.CreateRoundRect(animationSource.X - rippleSize / 2, animationSource.Y - rippleSize / 2, rippleSize, rippleSize, rippleSize / 2)) { g.FillPath(rippleBrush, path); } rippleBrush.Dispose(); } } // draw radiobutton circle Color uncheckedColor = DrawHelper.BlendColor(Parent.BackColor, Enabled ? SkinManager.GetCheckboxOffColor() : SkinManager.GetCheckBoxOffDisabledColor(), backgroundAlpha); using (var path = DrawHelper.CreateRoundRect(_boxOffset, _boxOffset, RADIOBUTTON_SIZE, RADIOBUTTON_SIZE, 9f)) { g.FillPath(new SolidBrush(uncheckedColor), path); if (Enabled) { g.FillPath(brush, path); } } g.FillEllipse( new SolidBrush(Parent.BackColor), RADIOBUTTON_OUTER_CIRCLE_WIDTH + _boxOffset, RADIOBUTTON_OUTER_CIRCLE_WIDTH + _boxOffset, RADIOBUTTON_INNER_CIRCLE_SIZE, RADIOBUTTON_INNER_CIRCLE_SIZE); if (Checked) { using (var path = DrawHelper.CreateRoundRect(RADIOBUTTON_CENTER - animationSizeHalf, RADIOBUTTON_CENTER - animationSizeHalf, animationSize, animationSize, 4f)) { g.FillPath(brush, path); } } SizeF stringSize = g.MeasureString(Text, SkinManager.ROBOTO_MEDIUM_10); g.DrawString(Text, SkinManager.ROBOTO_MEDIUM_10, Enabled ? SkinManager.GetPrimaryTextBrush() : SkinManager.GetDisabledOrHintBrush(), _boxOffset + 22, Height / 2 - stringSize.Height / 2); brush.Dispose(); pen.Dispose(); }
static void Main() { SyncfusionLicenseProvider.RegisterLicense(DemoCommon.FindLicenseKey()); SkinManager.LoadAssembly(typeof(Syncfusion.WinForms.Themes.Office2019Theme).Assembly); Application.Run(new frmFolderBrowser()); }
protected override void OnPaint(PaintEventArgs e) { e.Graphics.Clear(SkinManager.GetApplicationBackgroundColor()); }
private void load() { Resources.AddStore(new DllResourceStore(@"osu.Game.Resources.dll")); dependencies.Cache(contextFactory = new DatabaseContextFactory(Storage)); var largeStore = new LargeTextureStore(Host.CreateTextureLoaderStore(new NamespacedResourceStore <byte[]>(Resources, @"Textures"))); largeStore.AddStore(Host.CreateTextureLoaderStore(new OnlineStore())); dependencies.Cache(largeStore); dependencies.CacheAs(this); dependencies.Cache(LocalConfig); AddFont(Resources, @"Fonts/osuFont"); AddFont(Resources, @"Fonts/Exo2.0-Medium"); AddFont(Resources, @"Fonts/Exo2.0-MediumItalic"); AddFont(Resources, @"Fonts/Noto-Basic"); AddFont(Resources, @"Fonts/Noto-Hangul"); AddFont(Resources, @"Fonts/Noto-CJK-Basic"); AddFont(Resources, @"Fonts/Noto-CJK-Compatibility"); AddFont(Resources, @"Fonts/Exo2.0-Regular"); AddFont(Resources, @"Fonts/Exo2.0-RegularItalic"); AddFont(Resources, @"Fonts/Exo2.0-SemiBold"); AddFont(Resources, @"Fonts/Exo2.0-SemiBoldItalic"); AddFont(Resources, @"Fonts/Exo2.0-Bold"); AddFont(Resources, @"Fonts/Exo2.0-BoldItalic"); AddFont(Resources, @"Fonts/Exo2.0-Light"); AddFont(Resources, @"Fonts/Exo2.0-LightItalic"); AddFont(Resources, @"Fonts/Exo2.0-Black"); AddFont(Resources, @"Fonts/Exo2.0-BlackItalic"); AddFont(Resources, @"Fonts/Venera"); AddFont(Resources, @"Fonts/Venera-Light"); AddFont(Resources, @"Fonts/Venera-Medium"); runMigrations(); dependencies.Cache(SkinManager = new SkinManager(Storage, contextFactory, Host, Audio, new NamespacedResourceStore <byte[]>(Resources, "Skins/Legacy"))); dependencies.CacheAs <ISkinSource>(SkinManager); if (API == null) { API = new APIAccess(LocalConfig); } dependencies.CacheAs(API); var defaultBeatmap = new DummyWorkingBeatmap(Audio, Textures); dependencies.Cache(RulesetStore = new RulesetStore(contextFactory)); dependencies.Cache(FileStore = new FileStore(contextFactory, Storage)); // ordering is important here to ensure foreign keys rules are not broken in ModelStore.Cleanup() dependencies.Cache(ScoreManager = new ScoreManager(RulesetStore, () => BeatmapManager, Storage, API, contextFactory, Host)); dependencies.Cache(BeatmapManager = new BeatmapManager(Storage, contextFactory, RulesetStore, API, Audio, Host, defaultBeatmap)); // this should likely be moved to ArchiveModelManager when another case appers where it is necessary // to have inter-dependent model managers. this could be obtained with an IHasForeign<T> interface to // allow lookups to be done on the child (ScoreManager in this case) to perform the cascading delete. List <ScoreInfo> getBeatmapScores(BeatmapSetInfo set) { var beatmapIds = BeatmapManager.QueryBeatmaps(b => b.BeatmapSetInfoID == set.ID).Select(b => b.ID).ToList(); return(ScoreManager.QueryScores(s => beatmapIds.Contains(s.Beatmap.ID)).ToList()); } BeatmapManager.ItemRemoved += i => ScoreManager.Delete(getBeatmapScores(i), true); BeatmapManager.ItemAdded += i => ScoreManager.Undelete(getBeatmapScores(i), true); dependencies.Cache(KeyBindingStore = new KeyBindingStore(contextFactory, RulesetStore)); dependencies.Cache(SettingsStore = new SettingsStore(contextFactory)); dependencies.Cache(RulesetConfigCache = new RulesetConfigCache(SettingsStore)); dependencies.Cache(new SessionStatics()); dependencies.Cache(new OsuColour()); fileImporters.Add(BeatmapManager); fileImporters.Add(ScoreManager); fileImporters.Add(SkinManager); // tracks play so loud our samples can't keep up. // this adds a global reduction of track volume for the time being. Audio.Tracks.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8)); Beatmap = new NonNullableBindable <WorkingBeatmap>(defaultBeatmap); Beatmap.BindValueChanged(b => ScheduleAfterChildren(() => { // compare to last beatmap as sometimes the two may share a track representation (optimisation, see WorkingBeatmap.TransferTo) if (b.OldValue?.TrackLoaded == true && b.OldValue?.Track != b.NewValue?.Track) { b.OldValue.RecycleTrack(); } })); dependencies.CacheAs <IBindable <WorkingBeatmap> >(Beatmap); dependencies.CacheAs(Beatmap); FileStore.Cleanup(); if (API is APIAccess apiAcces) { AddInternal(apiAcces); } AddInternal(RulesetConfigCache); GlobalActionContainer globalBinding; MenuCursorContainer = new MenuCursorContainer { RelativeSizeAxes = Axes.Both }; MenuCursorContainer.Child = globalBinding = new GlobalActionContainer(this) { RelativeSizeAxes = Axes.Both, Child = content = new OsuTooltipContainer(MenuCursorContainer.Cursor) { RelativeSizeAxes = Axes.Both } }; base.Content.Add(CreateScalingContainer().WithChild(MenuCursorContainer)); KeyBindingStore.Register(globalBinding); dependencies.Cache(globalBinding); PreviewTrackManager previewTrackManager; dependencies.Cache(previewTrackManager = new PreviewTrackManager()); Add(previewTrackManager); Ruleset.BindValueChanged(onRulesetChanged); }
//GroupBar Visual style #region Visual style private void GBVisualStyleComboBox_SelectedIndexChanged(object sender, EventArgs e) { this.SuspendLayout(); SkinManager.SetVisualStyle(this.splitContainerAdv1.Panel1, this.cmbGBVisualStyle.SelectedItem.ToString()); SkinManager.SetVisualStyle(this.splitContainerAdv1.Panel2, this.cmbGBVisualStyle.SelectedItem.ToString()); if (this.cmbGBVisualStyle.SelectedItem.ToString() == "Office2016Colorful") { this.BackColor = this.splitContainerAdv1.BackColor = this.gradientPanel1.BackColor = Color.White; this.Style.TitleBar.BackColor = Color.FromArgb(242, 242, 242); this.Style.TitleBar.CloseButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.MinimizeButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.MaximizeButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.ForeColor = Color.Black; this.label1.ForeColor = this.label2.ForeColor = this.label3.ForeColor = this.label4.ForeColor = Color.Black; } else if (this.cmbGBVisualStyle.SelectedItem.ToString() == "Office2016Black") { this.splitContainerAdv1.BackColor = Color.FromArgb(37, 37, 37); this.BackColor = this.gradientPanel1.BackColor = Color.FromArgb(37, 37, 37); this.Style.TitleBar.BackColor = ColorTranslator.FromHtml("#363636"); this.Style.TitleBar.CloseButtonForeColor = Color.White; this.Style.TitleBar.MinimizeButtonForeColor = Color.White; this.Style.TitleBar.MaximizeButtonForeColor = Color.White; this.Style.TitleBar.ForeColor = Color.White; this.label1.ForeColor = this.label2.ForeColor = this.label3.ForeColor = this.label4.ForeColor = Color.White; } else if (this.cmbGBVisualStyle.SelectedItem.ToString() == "Office2016DarkGray") { this.BackColor = this.gradientPanel1.BackColor = this.splitContainerAdv1.BackColor = Color.FromArgb(102, 102, 102); this.label1.ForeColor = this.label2.ForeColor = this.label3.ForeColor = this.label4.ForeColor = Color.White; this.Style.TitleBar.BackColor = ColorTranslator.FromHtml("#505050"); this.Style.TitleBar.CloseButtonForeColor = Color.White; this.Style.TitleBar.MinimizeButtonForeColor = Color.White; this.Style.TitleBar.MaximizeButtonForeColor = Color.White; this.Style.TitleBar.ForeColor = Color.White; } else if (this.cmbGBVisualStyle.SelectedItem.ToString() == "Office2016White") { this.BackColor = this.gradientPanel1.BackColor = this.splitContainerAdv1.BackColor = Color.White; this.label1.ForeColor = this.label2.ForeColor = this.label3.ForeColor = this.label4.ForeColor = Color.Black; this.Style.TitleBar.BackColor = Color.FromArgb(242, 242, 242); this.Style.TitleBar.CloseButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.MinimizeButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.MaximizeButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.ForeColor = Color.Black; } else if (this.cmbGBVisualStyle.SelectedItem.ToString() == "Office2019Colorful") { this.label1.ForeColor = this.label2.ForeColor = this.label3.ForeColor = this.label4.ForeColor = Color.Black; this.BackColor = this.gradientPanel1.ThemeStyle.BackColor = this.splitContainerAdv1.BackColor = Color.White; this.Style.TitleBar.BackColor = Color.FromArgb(242, 242, 242); this.Style.TitleBar.CloseButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.MinimizeButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.MaximizeButtonForeColor = Color.FromArgb(51, 51, 51); this.Style.TitleBar.ForeColor = Color.Black; } else if (this.cmbGBVisualStyle.SelectedItem.ToString() == "HighContrastBlack") { this.BackColor = this.gradientPanel1.ThemeStyle.BackColor = Color.Black; this.Style.TitleBar.BackColor = Color.FromArgb(37, 37, 37); this.Style.TitleBar.CloseButtonForeColor = Color.White; this.Style.TitleBar.MinimizeButtonForeColor = Color.White; this.Style.TitleBar.MaximizeButtonForeColor = Color.White; this.Style.TitleBar.ForeColor = Color.White; this.label1.ForeColor = this.label2.ForeColor = this.label3.ForeColor = this.label4.ForeColor = Color.White; } this.numericUpDown1.Value = this.gbVisualStudio.GroupBarItemHeight; this.ResumeLayout(); }
protected override void OnPaint(PaintEventArgs e) { var g = e.Graphics; g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; g.Clear(SkinManager.BackdropColor); g.FillRectangle(SkinManager.ColorScheme.DarkPrimaryBrush, _statusBarBounds); g.FillRectangle(SkinManager.ColorScheme.PrimaryBrush, _actionBarBounds); //Draw border using (var borderPen = new Pen(SkinManager.DividersColor, 1)) { g.DrawLine(borderPen, new Point(0, _actionBarBounds.Bottom), new Point(0, Height - 2)); g.DrawLine(borderPen, new Point(Width - 1, _actionBarBounds.Bottom), new Point(Width - 1, Height - 2)); g.DrawLine(borderPen, new Point(0, Height - 1), new Point(Width - 1, Height - 1)); } // Determine whether or not we even should be drawing the buttons. bool showMin = MinimizeBox && ControlBox; bool showMax = MaximizeBox && ControlBox; var hoverBrush = SkinManager.BackgroundHoverBrush; var downBrush = SkinManager.BackgroundFocusBrush; // When MaximizeButton == false, the minimize button will be painted in its place if (_buttonState == ButtonState.MinOver && showMin) { g.FillRectangle(hoverBrush, showMax ? _minButtonBounds : _maxButtonBounds); } if (_buttonState == ButtonState.MinDown && showMin) { g.FillRectangle(downBrush, showMax ? _minButtonBounds : _maxButtonBounds); } if (_buttonState == ButtonState.MaxOver && showMax) { g.FillRectangle(hoverBrush, _maxButtonBounds); } if (_buttonState == ButtonState.MaxDown && showMax) { g.FillRectangle(downBrush, _maxButtonBounds); } if (_buttonState == ButtonState.XOver && ControlBox) { g.FillRectangle(hoverBrush, _xButtonBounds); } if (_buttonState == ButtonState.XDown && ControlBox) { g.FillRectangle(downBrush, _xButtonBounds); } using (var formButtonsPen = new Pen(SkinManager.ColorScheme.TextColor, 2)) { // Minimize button. if (showMin) { int x = showMax ? _minButtonBounds.X : _maxButtonBounds.X; int y = showMax ? _minButtonBounds.Y : _maxButtonBounds.Y; g.DrawLine( formButtonsPen, x + (int)(_minButtonBounds.Width * 0.33), y + (int)(_minButtonBounds.Height * 0.66), x + (int)(_minButtonBounds.Width * 0.66), y + (int)(_minButtonBounds.Height * 0.66) ); } // Maximize button if (showMax) { g.DrawRectangle( formButtonsPen, _maxButtonBounds.X + (int)(_maxButtonBounds.Width * 0.33), _maxButtonBounds.Y + (int)(_maxButtonBounds.Height * 0.36), (int)(_maxButtonBounds.Width * 0.39), (int)(_maxButtonBounds.Height * 0.31) ); } // Close button if (ControlBox) { g.DrawLine( formButtonsPen, _xButtonBounds.X + (int)(_xButtonBounds.Width * 0.33), _xButtonBounds.Y + (int)(_xButtonBounds.Height * 0.33), _xButtonBounds.X + (int)(_xButtonBounds.Width * 0.66), _xButtonBounds.Y + (int)(_xButtonBounds.Height * 0.66) ); g.DrawLine( formButtonsPen, _xButtonBounds.X + (int)(_xButtonBounds.Width * 0.66), _xButtonBounds.Y + (int)(_xButtonBounds.Height * 0.33), _xButtonBounds.X + (int)(_xButtonBounds.Width * 0.33), _xButtonBounds.Y + (int)(_xButtonBounds.Height * 0.66)); } } // Drawer Icon if (DrawerTabControl != null) { _drawerIconRect = new Rectangle(SkinManager.FORM_PADDING / 2, STATUS_BAR_HEIGHT, 24 + SkinManager.FORM_PADDING + SkinManager.FORM_PADDING / 2, ACTION_BAR_HEIGHT); // Ripple if (_clickAnimManager.IsAnimating()) { var clickAnimProgress = _clickAnimManager.GetProgress(); var rippleBrush = new SolidBrush(Color.FromArgb((int)(51 - (clickAnimProgress * 50)), Color.White)); var rippleSize = (int)(clickAnimProgress * _drawerIconRect.Width * 1.75); g.SetClip(_drawerIconRect); g.FillEllipse(rippleBrush, new Rectangle(_animationSource.X - rippleSize / 2, _animationSource.Y - rippleSize / 2, rippleSize, rippleSize)); g.ResetClip(); rippleBrush.Dispose(); } using (var formButtonsPen = new Pen(SkinManager.ColorScheme.TextColor, 2)) { // Middle line g.DrawLine( formButtonsPen, _drawerIconRect.X + (int)(SkinManager.FORM_PADDING), _drawerIconRect.Y + (int)(ACTION_BAR_HEIGHT / 2), _drawerIconRect.X + (int)(SkinManager.FORM_PADDING) + 18, _drawerIconRect.Y + (int)(ACTION_BAR_HEIGHT / 2)); // Bottom line g.DrawLine( formButtonsPen, _drawerIconRect.X + (int)(SkinManager.FORM_PADDING), _drawerIconRect.Y + (int)(ACTION_BAR_HEIGHT / 2) - 6, _drawerIconRect.X + (int)(SkinManager.FORM_PADDING) + 18, _drawerIconRect.Y + (int)(ACTION_BAR_HEIGHT / 2) - 6); // Top line g.DrawLine( formButtonsPen, _drawerIconRect.X + (int)(SkinManager.FORM_PADDING), _drawerIconRect.Y + (int)(ACTION_BAR_HEIGHT / 2) + 6, _drawerIconRect.X + (int)(SkinManager.FORM_PADDING) + 18, _drawerIconRect.Y + (int)(ACTION_BAR_HEIGHT / 2) + 6); } } //Form title using (NativeTextRenderer NativeText = new NativeTextRenderer(g)) { Rectangle textLocation = new Rectangle(SkinManager.FORM_PADDING + (DrawerTabControl != null ? 24 + (int)(SkinManager.FORM_PADDING * 1.5) : 0), STATUS_BAR_HEIGHT, Width, ACTION_BAR_HEIGHT); NativeText.DrawTransparentText(Text, SkinManager.getLogFontByType(MaterialSkinManager.fontType.H6), SkinManager.ColorScheme.TextColor, textLocation.Location, textLocation.Size, NativeTextRenderer.TextAlignFlags.Left | NativeTextRenderer.TextAlignFlags.Middle); } }
protected override void OnPaint(PaintEventArgs pevent) { var g = pevent.Graphics; g.SmoothingMode = SmoothingMode.AntiAlias; g.TextRenderingHint = TextRenderingHint.AntiAlias; // clear the control g.Clear(Parent.BackColor); var CHECKBOX_CENTER = boxOffset + CHECKBOX_SIZE_HALF - 1; double animationProgress = animationManager.GetProgress(); int colorAlpha = Enabled ? (int)(animationProgress * 255.0) : SkinManager.GetCheckBoxOffDisabledColor().A; int backgroundAlpha = Enabled ? (int)(SkinManager.GetCheckboxOffColor().A *(1.0 - animationProgress)) : SkinManager.GetCheckBoxOffDisabledColor().A; var brush = new SolidBrush(Color.FromArgb(colorAlpha, Enabled ? SkinManager.ColorScheme.AccentColor : SkinManager.GetCheckBoxOffDisabledColor())); var brush3 = new SolidBrush(Enabled ? SkinManager.ColorScheme.AccentColor : SkinManager.GetCheckBoxOffDisabledColor()); var pen = new Pen(brush.Color); // draw ripple animation if (Ripple && rippleAnimationManager.IsAnimating()) { for (int i = 0; i < rippleAnimationManager.GetAnimationCount(); i++) { var animationValue = rippleAnimationManager.GetProgress(i); var animationSource = new Point(CHECKBOX_CENTER, CHECKBOX_CENTER); var rippleBrush = new SolidBrush(Color.FromArgb((int)((animationValue * 40)), ((bool)rippleAnimationManager.GetData(i)[0]) ? Color.Black : brush.Color)); var rippleHeight = (Height % 2 == 0) ? Height - 3 : Height - 2; var rippleSize = (rippleAnimationManager.GetDirection(i) == AnimationDirection.InOutIn) ? (int)(rippleHeight * (0.8d + (0.2d * animationValue))) : rippleHeight; using (var path = DrawHelper.CreateRoundRect(animationSource.X - rippleSize / 2, animationSource.Y - rippleSize / 2, rippleSize, rippleSize, rippleSize / 2)) { g.FillPath(rippleBrush, path); } rippleBrush.Dispose(); } } brush3.Dispose(); var checkMarkLineFill = new Rectangle(boxOffset, boxOffset, (int)(17.0 * animationProgress), 17); using (var checkmarkPath = DrawHelper.CreateRoundRect(boxOffset, boxOffset, 17, 17, 1f)) { SolidBrush brush2 = new SolidBrush(DrawHelper.BlendColor(Parent.BackColor, Enabled ? SkinManager.GetCheckboxOffColor() : SkinManager.GetCheckBoxOffDisabledColor(), backgroundAlpha)); Pen pen2 = new Pen(brush2.Color); g.FillPath(brush2, checkmarkPath); g.DrawPath(pen2, checkmarkPath); g.FillRectangle(new SolidBrush(Parent.BackColor), boxOffset + 2, boxOffset + 2, CHECKBOX_INNER_BOX_SIZE - 1, CHECKBOX_INNER_BOX_SIZE - 1); g.DrawRectangle(new Pen(Parent.BackColor), boxOffset + 2, boxOffset + 2, CHECKBOX_INNER_BOX_SIZE - 1, CHECKBOX_INNER_BOX_SIZE - 1); brush2.Dispose(); pen2.Dispose(); if (Enabled) { g.FillPath(brush, checkmarkPath); g.DrawPath(pen, checkmarkPath); } else if (Checked) { g.SmoothingMode = SmoothingMode.None; g.FillRectangle(brush, boxOffset + 2, boxOffset + 2, CHECKBOX_INNER_BOX_SIZE, CHECKBOX_INNER_BOX_SIZE); g.SmoothingMode = SmoothingMode.AntiAlias; } g.DrawImageUnscaledAndClipped(DrawCheckMarkBitmap(), checkMarkLineFill); } // draw checkbox text SizeF stringSize = g.MeasureString(Text, SkinManager.ROBOTO_MEDIUM_10); g.DrawString( Text, SkinManager.ROBOTO_MEDIUM_10, Enabled ? SkinManager.GetPrimaryTextBrush() : SkinManager.GetDisabledOrHintBrush(), boxOffset + TEXT_OFFSET, Height / 2 - stringSize.Height / 2); // dispose used paint objects pen.Dispose(); brush.Dispose(); }
protected override void OnPaint(PaintEventArgs pevent) { bool ImageDrawn = false; var g = pevent.Graphics; g.TextRenderingHint = TextRenderingHint.AntiAlias; g.Clear(Parent.BackColor); if (Image != null) { ImageDrawn = true; g.DrawImage(Image, 8, 2, Height - 4, Height - 4); } if (Selected) { g.FillRectangle(SkinManager.GetFlatButtonHoverBackgroundBrush(), ClientRectangle); } //Hover Color c = SkinManager.GetFlatButtonHoverBackgroundColor(); using (Brush b = new SolidBrush(Color.FromArgb((int)(hoverAnimationManager.GetProgress() * c.A), c.RemoveAlpha()))) g.FillRectangle(b, ClientRectangle); //Ripple if (animationManager.IsAnimating()) { g.SmoothingMode = SmoothingMode.AntiAlias; for (int i = 0; i < animationManager.GetAnimationCount(); i++) { var animationValue = animationManager.GetProgress(i); var animationSource = animationManager.GetSource(i); using (Brush rippleBrush = new SolidBrush(Color.FromArgb((int)(101 - (animationValue * 100)), Color.Black))) { var rippleSize = (int)(animationValue * Width * 2); g.FillEllipse(rippleBrush, new Rectangle(animationSource.X - rippleSize / 2, animationSource.Y - rippleSize / 2, rippleSize, rippleSize)); } } g.SmoothingMode = SmoothingMode.None; } g.DrawString(Text.ToUpper(), SkinManager.ROBOTO_MEDIUM_10, Enabled ? (Primary ? SkinManager.ColorScheme.PrimaryBrush : Accent ? SkinManager.ColorScheme.AccentBrush : SkinManager.GetPrimaryTextBrush()) : SkinManager.GetFlatButtonDisabledTextBrush(), ClientRectangle, new StringFormat { Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Center }); }
private new void Paint(PaintEventArgs e) { var g = e.Graphics; g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; // redraw stuff g.Clear(UseColors ? SkinManager.ColorScheme.PrimaryColor : SkinManager.BackdropColor); if (_baseTabControl == null) { return; } if (!_clickAnimManager.IsAnimating() || _drawerItemRects == null || _drawerItemRects.Count != _baseTabControl.TabCount) { UpdateTabRects(); } if (_drawerItemRects == null || _drawerItemRects.Count != _baseTabControl.TabCount) { return; } // Click Animation var clickAnimProgress = _clickAnimManager.GetProgress(); // Show/Hide Drawer Animation var showHideAnimProgress = _showHideAnimManager.GetProgress(); var rSize = (int)(clickAnimProgress * rippleSize * 1.75); int dx = prevLocation - Location.X; prevLocation = Location.X; // Ripple if (_clickAnimManager.IsAnimating()) { var rippleBrush = new SolidBrush(Color.FromArgb((int)(70 - (clickAnimProgress * 70)), UseColors ? SkinManager.ColorScheme.AccentColor : // Using colors SkinManager.Theme == MaterialSkinManager.Themes.LIGHT ? SkinManager.ColorScheme.PrimaryColor : // light theme SkinManager.ColorScheme.LightPrimaryColor)); // dark theme g.SetClip(_drawerItemPaths[_baseTabControl.SelectedIndex]); g.FillEllipse(rippleBrush, new Rectangle(_animationSource.X + dx - (rSize / 2), _animationSource.Y - rSize / 2, rSize, rSize)); g.ResetClip(); rippleBrush.Dispose(); } // Draw menu items foreach (TabPage tabPage in _baseTabControl.TabPages) { var currentTabIndex = _baseTabControl.TabPages.IndexOf(tabPage); // Background Brush bgBrush = new SolidBrush(Color.FromArgb(CalculateAlpha(60, 0, currentTabIndex, clickAnimProgress, 1 - showHideAnimProgress), UseColors ? _backgroundWithAccent ? SkinManager.ColorScheme.AccentColor : SkinManager.ColorScheme.LightPrimaryColor : // using colors _backgroundWithAccent ? SkinManager.ColorScheme.AccentColor : // defaul accent SkinManager.Theme == MaterialSkinManager.Themes.LIGHT ? SkinManager.ColorScheme.PrimaryColor : // default light SkinManager.ColorScheme.LightPrimaryColor)); // default dark g.FillPath(bgBrush, _drawerItemPaths[currentTabIndex]); bgBrush.Dispose(); // Text Color textColor = Color.FromArgb(CalculateAlphaZeroWhenClosed(SkinManager.TextHighEmphasisColor.A, UseColors ? SkinManager.TextMediumEmphasisColor.A : 255, currentTabIndex, clickAnimProgress, 1 - showHideAnimProgress), // alpha UseColors ? (currentTabIndex == _baseTabControl.SelectedIndex ? (_highlightWithAccent ? SkinManager.ColorScheme.AccentColor : SkinManager.ColorScheme.PrimaryColor) // Use colors - selected : SkinManager.ColorScheme.TextColor) : // Use colors - not selected (currentTabIndex == _baseTabControl.SelectedIndex ? (_highlightWithAccent ? SkinManager.ColorScheme.AccentColor : SkinManager.ColorScheme.PrimaryColor) : // selected SkinManager.TextHighEmphasisColor)); IntPtr textFont = SkinManager.getLogFontByType(MaterialSkinManager.fontType.Subtitle2); Rectangle textRect = _drawerItemRects[currentTabIndex]; textRect.X += _baseTabControl.ImageList != null ? drawerItemHeight : (int)(SkinManager.FORM_PADDING * 0.75); textRect.Width -= SkinManager.FORM_PADDING << 2; using (NativeTextRenderer NativeText = new NativeTextRenderer(g)) { NativeText.DrawTransparentText(tabPage.Text, textFont, textColor, textRect.Location, textRect.Size, NativeTextRenderer.TextAlignFlags.Left | NativeTextRenderer.TextAlignFlags.Middle); } // Icons if (_baseTabControl.ImageList != null && !String.IsNullOrEmpty(tabPage.ImageKey)) { Rectangle iconRect = new Rectangle( _drawerItemRects[currentTabIndex].X + (drawerItemHeight >> 1) - (iconsSize[tabPage.ImageKey].Width >> 1), _drawerItemRects[currentTabIndex].Y + (drawerItemHeight >> 1) - (iconsSize[tabPage.ImageKey].Height >> 1), iconsSize[tabPage.ImageKey].Width, iconsSize[tabPage.ImageKey].Height); if (ShowIconsWhenHidden) { iconsBrushes[tabPage.ImageKey].TranslateTransform(dx, 0); iconsSelectedBrushes[tabPage.ImageKey].TranslateTransform(dx, 0); } g.FillRectangle(currentTabIndex == _baseTabControl.SelectedIndex ? iconsSelectedBrushes[tabPage.ImageKey] : iconsBrushes[tabPage.ImageKey], iconRect); } } // Draw divider if not using colors if (!UseColors) { using (Pen dividerPen = new Pen(SkinManager.DividersColor, 1)) { g.DrawLine(dividerPen, Width - 1, 0, Width - 1, Height); } } // Animate tab indicator var previousSelectedTabIndexIfHasOne = _previousSelectedTabIndex == -1 ? _baseTabControl.SelectedIndex : _previousSelectedTabIndex; var previousActiveTabRect = _drawerItemRects[previousSelectedTabIndexIfHasOne]; var activeTabPageRect = _drawerItemRects[_baseTabControl.SelectedIndex]; var y = previousActiveTabRect.Y + (int)((activeTabPageRect.Y - previousActiveTabRect.Y) * clickAnimProgress); var x = ShowIconsWhenHidden ? -Location.X : 0; var height = drawerItemHeight; g.FillRectangle(SkinManager.ColorScheme.AccentBrush, x, y, IndicatorWidth, height); }
public KogMaw() { Q = new Spell(SpellSlot.Q, 980f); W = new Spell(SpellSlot.W, Me.AttackRange); E = new Spell(SpellSlot.E, 1200f); R = new Spell(SpellSlot.R, 1800f); Q.SetSkillshot(0.25f, 50f, 2000f, true, SkillshotType.SkillshotLine); E.SetSkillshot(0.25f, 120f, 1400f, false, SkillshotType.SkillshotLine); R.SetSkillshot(1.2f, 120f, float.MaxValue, false, SkillshotType.SkillshotCircle); var comboMenu = Menu.AddSubMenu(new Menu("Combo", "Combo")); { comboMenu.AddItem(new MenuItem("ComboQ", "Use Q", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboW", "Use W", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboE", "Use E", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboR", "Use R", true).SetValue(true)); comboMenu.AddItem( new MenuItem("ComboRLimit", "Use R|Limit Stack >= x", true).SetValue(new Slider(3, 0, 10))); } var harassMenu = Menu.AddSubMenu(new Menu("Harass", "Harass")); { harassMenu.AddItem(new MenuItem("HarassQ", "Use Q", true).SetValue(true)); harassMenu.AddItem(new MenuItem("HarassE", "Use E", true).SetValue(true)); harassMenu.AddItem(new MenuItem("HarassR", "Use R", true).SetValue(true)); harassMenu.AddItem( new MenuItem("HarassRLimit", "Use R|Limit Stack >= x", true).SetValue(new Slider(5, 0, 10))); harassMenu.AddItem( new MenuItem("HarassMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(60))); } var clearMenu = Menu.AddSubMenu(new Menu("Clear", "Clear")); { var laneClearMenu = clearMenu.AddSubMenu(new Menu("LaneClear", "LaneClear")); { laneClearMenu.AddItem(new MenuItem("LaneClearQ", "Use Q", true).SetValue(true)); laneClearMenu.AddItem(new MenuItem("LaneClearE", "Use E", true).SetValue(true)); laneClearMenu.AddItem( new MenuItem("LaneClearECount", "If E CanHit Counts >= x", true).SetValue(new Slider(3, 1, 5))); laneClearMenu.AddItem(new MenuItem("LaneClearR", "Use R", true).SetValue(true)); laneClearMenu.AddItem( new MenuItem("LaneClearRLimit", "Use R|Limit Stack >= x", true).SetValue(new Slider(4, 0, 10))); laneClearMenu.AddItem( new MenuItem("LaneClearMana", "If Player ManaPercent >= %", true).SetValue(new Slider(60))); } var jungleClearMenu = clearMenu.AddSubMenu(new Menu("JungleClear", "JungleClear")); { jungleClearMenu.AddItem(new MenuItem("JungleClearQ", "Use Q", true).SetValue(true)); jungleClearMenu.AddItem(new MenuItem("JungleClearW", "Use W", true).SetValue(true)); jungleClearMenu.AddItem(new MenuItem("JungleClearE", "Use E", true).SetValue(true)); jungleClearMenu.AddItem(new MenuItem("JungleClearR", "Use R", true).SetValue(true)); jungleClearMenu.AddItem( new MenuItem("JungleClearRLimit", "Use R|Limit Stack >= x", true).SetValue(new Slider(5, 0, 10))); jungleClearMenu.AddItem( new MenuItem("JungleClearMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(30))); } clearMenu.AddItem(new MenuItem("asdqweqwe", " ", true)); ManaManager.AddSpellFarm(clearMenu); } var killStealMenu = Menu.AddSubMenu(new Menu("KillSteal", "KillSteal")); { killStealMenu.AddItem(new MenuItem("KillStealQ", "Use Q", true).SetValue(true)); killStealMenu.AddItem(new MenuItem("KillStealE", "Use E", true).SetValue(true)); killStealMenu.AddItem(new MenuItem("KillStealR", "Use R", true).SetValue(true)); } var miscMenu = Menu.AddSubMenu(new Menu("Misc", "Misc")); { miscMenu.AddItem(new MenuItem("GapE", "Anti GapCloser E", true).SetValue(true)); miscMenu.AddItem( new MenuItem("SemiR", "Semi-manual R Key", true).SetValue(new KeyBind('T', KeyBindType.Press))); } var utilityMenu = Menu.AddSubMenu(new Menu("Utility", "Utility")); { var skinMenu = utilityMenu.AddSubMenu(new Menu("Skin Change", "Skin Change")); { SkinManager.AddToMenu(skinMenu); } var autoLevelMenu = utilityMenu.AddSubMenu(new Menu("Auto Levels", "Auto Levels")); { LevelsManager.AddToMenu(autoLevelMenu); } var humainzerMenu = utilityMenu.AddSubMenu(new Menu("Humanier", "Humanizer")); { HumanizerManager.AddToMenu(humainzerMenu); } var itemsMenu = utilityMenu.AddSubMenu(new Menu("Items", "Items")); { ItemsManager.AddToMenu(itemsMenu); } } var drawMenu = Menu.AddSubMenu(new Menu("Drawings", "Drawings")); { drawMenu.AddItem(new MenuItem("DrawQ", "Draw Q Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawW", "Draw W Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawE", "Draw E Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawR", "Draw R Range", true).SetValue(false)); ManaManager.AddDrawFarm(drawMenu); DamageIndicator.AddToMenu(drawMenu); } AntiGapcloser.OnEnemyGapcloser += OnEnemyGapcloser; Obj_AI_Base.OnSpellCast += OnSpellCast; Game.OnUpdate += OnUpdate; Drawing.OnDraw += OnDraw; }
private void load(BeatmapManager beatmaps, AudioManager audio, DialogOverlay dialog, OsuColour colours, SkinManager skins, ScoreManager scores) { if (Footer != null) { Footer.AddButton(new FooterButtonMods { Current = mods }, ModSelect); Footer.AddButton(new FooterButtonRandom { Action = triggerRandom }); Footer.AddButton(new FooterButtonOptions(), BeatmapOptions); BeatmapOptions.AddButton(@"Delete", @"all difficulties", FontAwesome.Solid.Trash, colours.Pink, () => delete(Beatmap.Value.BeatmapSetInfo), Key.Number4, float.MaxValue); BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, colours.Purple, null, Key.Number1); BeatmapOptions.AddButton(@"Clear", @"local scores", FontAwesome.Solid.Eraser, colours.Purple, () => clearScores(Beatmap.Value.BeatmapInfo), Key.Number2); } if (this.beatmaps == null) { this.beatmaps = beatmaps; } this.beatmaps.ItemAdded += onBeatmapSetAdded; this.beatmaps.ItemRemoved += onBeatmapSetRemoved; this.beatmaps.BeatmapHidden += onBeatmapHidden; this.beatmaps.BeatmapRestored += onBeatmapRestored; dialogOverlay = dialog; sampleChangeDifficulty = audio.Samples.Get(@"SongSelect/select-difficulty"); sampleChangeBeatmap = audio.Samples.Get(@"SongSelect/select-expand"); SampleConfirm = audio.Samples.Get(@"SongSelect/confirm-selection"); if (dialogOverlay != null) { Schedule(() => { // if we have no beatmaps but osu-stable is found, let's prompt the user to import. if (!beatmaps.GetAllUsableBeatmapSetsEnumerable().Any() && beatmaps.StableInstallationAvailable) { dialogOverlay.Push(new ImportFromStablePopup(() => { Task.Run(beatmaps.ImportFromStableAsync).ContinueWith(_ => scores.ImportFromStableAsync(), TaskContinuationOptions.OnlyOnRanToCompletion); Task.Run(skins.ImportFromStableAsync); })); } }); } }
// Added by K.G(07-12-2011) to upload email templates on the Sparq public bool UploadEmailTemplates(PanelPreferences preferences, string skinFolderPath, string dataPath, string newFolderName) { SkinManager manager = new SkinManager(skinFolderPath); List<EmailTemplate> lstEmailTemplate = manager.GetEmailTemplateObjects(newFolderName); // Added by K.G(29/11/2011) to include email template files in search & replace methods. PanelSettingsManagement.PanelSettingsPostToHome(preferences); Home.HomeViewPostToCommunication(preferences); foreach (var emailTemplate in lstEmailTemplate) { string pageSource = Communication.AddNewEmailTemplate(preferences, emailTemplate); string eid = FindEid(pageSource, emailTemplate.EmailTemplateName); Communication.EditNewEmailTemplate(preferences, emailTemplate, eid); Communication.SaveEmailTemplate(preferences, emailTemplate, eid); } manager.DeleteUploadFolders(); return true; }
private static IEnumerable <string> GetDependencies(string relPath) { var fullpath = SkinManager.Resolve(relPath); return(SNScriptDependencyCache.Instance.GetDependencies(fullpath)); }
public Corki() { Q = new Spell(SpellSlot.Q, 825f); W = new Spell(SpellSlot.W, 800f); E = new Spell(SpellSlot.E, 600f); R = new Spell(SpellSlot.R, 1300f); Q.SetSkillshot(0.3f, 200f, 1000f, false, SkillshotType.SkillshotCircle); E.SetSkillshot(0.1f, (float)(45 * Math.PI / 180), 1500f, false, SkillshotType.SkillshotCone); R.SetSkillshot(0.2f, 40f, 2000f, true, SkillshotType.SkillshotLine); var comboMenu = Menu.AddSubMenu(new Menu("Combo", "Combo")); { comboMenu.AddItem(new MenuItem("ComboQ", "Use Q", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboE", "Use E", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboR", "Use R", true).SetValue(true)); comboMenu.AddItem( new MenuItem("ComboRLimit", "Use R|Limit Stack >= x", true).SetValue(new Slider(0, 0, 7))); } var harassMenu = Menu.AddSubMenu(new Menu("Harass", "Harass")); { harassMenu.AddItem(new MenuItem("HarassQ", "Use Q", true).SetValue(true)); harassMenu.AddItem(new MenuItem("HarassE", "Use E", true).SetValue(false)); harassMenu.AddItem(new MenuItem("HarassR", "Use R", true).SetValue(true)); harassMenu.AddItem( new MenuItem("HarassRLimit", "Use R|Limit Stack >= x", true).SetValue(new Slider(4, 0, 7))); harassMenu.AddItem( new MenuItem("AutoHarass", "Auto Harass?", true).SetValue(new KeyBind('G', KeyBindType.Toggle))); harassMenu.AddItem( new MenuItem("HarassMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(60))); } var clearMenu = Menu.AddSubMenu(new Menu("Clear", "Clear")); { var laneClearMenu = clearMenu.AddSubMenu(new Menu("LaneClear", "LaneClear")); { laneClearMenu.AddItem(new MenuItem("LaneClearQ", "Use Q", true).SetValue(true)); laneClearMenu.AddItem( new MenuItem("LaneClearQCount", "If Q CanHit Counts >= x", true).SetValue(new Slider(3, 1, 5))); laneClearMenu.AddItem(new MenuItem("LaneClearE", "Use E", true).SetValue(true)); laneClearMenu.AddItem( new MenuItem("LaneClearECount", "If E CanHit Counts >= x", true).SetValue(new Slider(3, 1, 5))); laneClearMenu.AddItem(new MenuItem("LaneClearR", "Use R", true).SetValue(true)); laneClearMenu.AddItem( new MenuItem("LaneClearRLimit", "Use R|Limit Stack >= x", true).SetValue(new Slider(4, 0, 7))); laneClearMenu.AddItem( new MenuItem("LaneClearRCount", "If R CanHit Counts >= x", true).SetValue(new Slider(3, 1, 5))); laneClearMenu.AddItem( new MenuItem("LaneClearMana", "If Player ManaPercent >= %", true).SetValue(new Slider(60))); } var jungleClearMenu = clearMenu.AddSubMenu(new Menu("JungleClear", "JungleClear")); { jungleClearMenu.AddItem(new MenuItem("JungleClearQ", "Use Q", true).SetValue(true)); jungleClearMenu.AddItem(new MenuItem("JungleClearE", "Use E", true).SetValue(true)); jungleClearMenu.AddItem(new MenuItem("JungleClearR", "Use R", true).SetValue(true)); jungleClearMenu.AddItem( new MenuItem("JungleClearRLimit", "Use R|Limit Stack >= x", true).SetValue(new Slider(0, 0, 7))); jungleClearMenu.AddItem( new MenuItem("JungleClearMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(30))); } clearMenu.AddItem(new MenuItem("asdqweqwe", " ", true)); ManaManager.AddSpellFarm(clearMenu); } var killStealMenu = Menu.AddSubMenu(new Menu("KillSteal", "KillSteal")); { killStealMenu.AddItem(new MenuItem("KillStealQ", "Use Q", true).SetValue(true)); killStealMenu.AddItem(new MenuItem("KillStealR", "Use R", true).SetValue(true)); } var fleeMenu = Menu.AddSubMenu(new Menu("Flee", "Flee")); { fleeMenu.AddItem(new MenuItem("FleeW", "Use W", true).SetValue(true)); fleeMenu.AddItem(new MenuItem("FleeKey", "Flee Key", true).SetValue(new KeyBind('Z', KeyBindType.Press))); } var miscMenu = Menu.AddSubMenu(new Menu("Misc", "Misc")); { miscMenu.AddItem( new MenuItem("SemiR", "Semi-manual R Key", true).SetValue(new KeyBind('T', KeyBindType.Press))); } var utilityMenu = Menu.AddSubMenu(new Menu("Utility", "Utility")); { var skinMenu = utilityMenu.AddSubMenu(new Menu("Skin Change", "Skin Change")); { SkinManager.AddToMenu(skinMenu); } var autoLevelMenu = utilityMenu.AddSubMenu(new Menu("Auto Levels", "Auto Levels")); { LevelsManager.AddToMenu(autoLevelMenu); } var itemsMenu = utilityMenu.AddSubMenu(new Menu("Items", "Items")); { ItemsManager.AddToMenu(itemsMenu); } } var drawMenu = Menu.AddSubMenu(new Menu("Drawings", "Drawings")); { drawMenu.AddItem(new MenuItem("DrawQ", "Draw Q Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawW", "Draw W Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawE", "Draw E Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawR", "Draw R Range", true).SetValue(false)); ManaManager.AddDrawFarm(drawMenu); //DamageIndicator.AddToMenu(drawMenu); } Obj_AI_Base.OnSpellCast += OnSpellCast; Game.OnUpdate += OnUpdate; Drawing.OnDraw += OnDraw; }
private void load() { dependencies.CacheAs(this); dependencies.Cache(SentryLogger); dependencies.Cache(osuLogo = new OsuLogo { Alpha = 0 }); // bind config int to database RulesetInfo configRuleset = LocalConfig.GetBindable <string>(OsuSetting.Ruleset); uiScale = LocalConfig.GetBindable <float>(OsuSetting.UIScale); var preferredRuleset = int.TryParse(configRuleset.Value, out int rulesetId) // int parsing can be removed 20220522 ? RulesetStore.GetRuleset(rulesetId) : RulesetStore.GetRuleset(configRuleset.Value); try { Ruleset.Value = preferredRuleset ?? RulesetStore.AvailableRulesets.First(); } catch (Exception e) { // on startup, a ruleset may be selected which has compatibility issues. Logger.Error(e, $@"Failed to switch to preferred ruleset {preferredRuleset}."); Ruleset.Value = RulesetStore.AvailableRulesets.First(); } Ruleset.ValueChanged += r => configRuleset.Value = r.NewValue.ShortName; // bind config int to database SkinInfo configSkin = LocalConfig.GetBindable <string>(OsuSetting.Skin); SkinManager.CurrentSkinInfo.ValueChanged += skin => configSkin.Value = skin.NewValue.ID.ToString(); configSkin.ValueChanged += skinId => { ILive <SkinInfo> skinInfo = null; if (Guid.TryParse(skinId.NewValue, out var guid)) { skinInfo = SkinManager.Query(s => s.ID == guid); } if (skinInfo == null) { if (guid == SkinInfo.CLASSIC_SKIN) { skinInfo = DefaultLegacySkin.CreateInfo().ToLiveUnmanaged(); } } SkinManager.CurrentSkinInfo.Value = skinInfo ?? DefaultSkin.CreateInfo().ToLiveUnmanaged(); }; configSkin.TriggerChange(); IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true); Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade); SelectedMods.BindValueChanged(modsChanged); Beatmap.BindValueChanged(beatmapChanged, true); }
private void load(AudioManager audio, DialogOverlay dialog, OsuColour colours, SkinManager skins, ScoreManager scores) { // initial value transfer is required for FilterControl (it uses our re-cached bindables in its async load for the initial filter). transferRulesetValue(); LoadComponentAsync(Carousel = new BeatmapCarousel { AllowSelection = false, // delay any selection until our bindables are ready to make a good choice. Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, RelativeSizeAxes = Axes.Both, BleedTop = FilterControl.HEIGHT, BleedBottom = Footer.HEIGHT, SelectionChanged = updateSelectedBeatmap, BeatmapSetsChanged = carouselBeatmapsLoaded, GetRecommendedBeatmap = recommender.GetRecommendedBeatmap, }, c => carouselContainer.Child = c); AddRangeInternal(new Drawable[] { recommender, new ResetScrollContainer(() => Carousel.ScrollToSelected()) { RelativeSizeAxes = Axes.Y, Width = 250, }, new VerticalMaskingContainer { Children = new Drawable[] { new GridContainer // used for max width implementation { RelativeSizeAxes = Axes.Both, ColumnDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.Relative, 0.5f, maxSize: 850), }, Content = new[] { new Drawable[] { new ParallaxContainer { ParallaxAmount = 0.005f, RelativeSizeAxes = Axes.Both, Child = new WedgeBackground { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Right = -150 }, }, }, carouselContainer = new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Top = FilterControl.HEIGHT, Bottom = Footer.HEIGHT }, Child = new LoadingSpinner(true) { State = { Value = Visibility.Visible } } } }, } }, FilterControl = new FilterControl { RelativeSizeAxes = Axes.X, Height = FilterControl.HEIGHT, FilterChanged = ApplyFilterToCarousel, }, new GridContainer // used for max width implementation { RelativeSizeAxes = Axes.Both, ColumnDimensions = new[] { new Dimension(GridSizeMode.Relative, 0.5f, maxSize: 650), }, Content = new[] { new Drawable[] { new Container { Origin = Anchor.BottomLeft, Anchor = Anchor.BottomLeft, RelativeSizeAxes = Axes.Both, Children = new Drawable[] { beatmapInfoWedge = new BeatmapInfoWedge { Height = WEDGE_HEIGHT, RelativeSizeAxes = Axes.X, Margin = new MarginPadding { Top = left_area_padding, Right = left_area_padding, }, }, new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Bottom = Footer.HEIGHT, Top = WEDGE_HEIGHT + left_area_padding, Left = left_area_padding, Right = left_area_padding * 2, }, Child = BeatmapDetails = CreateBeatmapDetailArea().With(d => { d.RelativeSizeAxes = Axes.Both; d.Padding = new MarginPadding { Top = 10, Right = 5 }; }) }, } }, }, } } } }, }); if (ShowFooter) { AddRangeInternal(new Drawable[] { new GridContainer // used for max height implementation { RelativeSizeAxes = Axes.Both, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.Relative, 1f, maxSize: ModSelectOverlay.HEIGHT + Footer.HEIGHT), }, Content = new[] { null, new Drawable[] { FooterPanels = new Container { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Bottom = Footer.HEIGHT }, Children = new Drawable[] { BeatmapOptions = new BeatmapOptionsOverlay(), ModSelect = new ModSelectOverlay { Origin = Anchor.BottomCentre, Anchor = Anchor.BottomCentre, } } } } } }, Footer = new Footer() }); } if (Footer != null) { Footer.AddButton(new FooterButtonMods { Current = Mods }, ModSelect); Footer.AddButton(new FooterButtonRandom { Action = triggerRandom }); Footer.AddButton(new FooterButtonOptions(), BeatmapOptions); BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, colours.Purple, null, Key.Number1); BeatmapOptions.AddButton(@"Clear", @"local scores", FontAwesome.Solid.Eraser, colours.Purple, () => clearScores(Beatmap.Value.BeatmapInfo), Key.Number2); BeatmapOptions.AddButton(@"Delete", @"all difficulties", FontAwesome.Solid.Trash, colours.Pink, () => delete(Beatmap.Value.BeatmapSetInfo), Key.Number3); } dialogOverlay = dialog; sampleChangeDifficulty = audio.Samples.Get(@"SongSelect/select-difficulty"); sampleChangeBeatmap = audio.Samples.Get(@"SongSelect/select-expand"); SampleConfirm = audio.Samples.Get(@"SongSelect/confirm-selection"); if (dialogOverlay != null) { Schedule(() => { // if we have no beatmaps but osu-stable is found, let's prompt the user to import. if (!beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.Minimal).Any() && beatmaps.StableInstallationAvailable) { dialogOverlay.Push(new ImportFromStablePopup(() => { Task.Run(beatmaps.ImportFromStableAsync).ContinueWith(_ => scores.ImportFromStableAsync(), TaskContinuationOptions.OnlyOnRanToCompletion); Task.Run(skins.ImportFromStableAsync); })); } }); } }
public Sivir() { Q = new Spell(SpellSlot.Q, 1200f); W = new Spell(SpellSlot.W); E = new Spell(SpellSlot.E); R = new Spell(SpellSlot.R); Q.SetSkillshot(0.25f, 90f, 1350f, false, SkillshotType.SkillshotLine); var comboMenu = Menu.AddSubMenu(new Menu("Combo", "Combo")); { comboMenu.AddItem(new MenuItem("ComboQ", "Use Q", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboW", "Use W", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboR", "Use R", true).SetValue(true)); comboMenu.AddItem( new MenuItem("ComboRCount", "Use R| When Enemies Counts >= x", true).SetValue(new Slider(3, 1, 5))); } var harassMenu = Menu.AddSubMenu(new Menu("Harass", "Harass")); { harassMenu.AddItem(new MenuItem("HarassQ", "Use Q", true).SetValue(true)); harassMenu.AddItem( new MenuItem("HarassMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(60))); } var clearMenu = Menu.AddSubMenu(new Menu("Clear", "Clear")); { var laneClearMenu = clearMenu.AddSubMenu(new Menu("LaneClear", "LaneClear")); { laneClearMenu.AddItem(new MenuItem("LaneClearQ", "Use Q", true).SetValue(true)); laneClearMenu.AddItem( new MenuItem("LaneClearQCount", "If Q CanHit Counts >= ", true).SetValue(new Slider(3, 1, 5))); laneClearMenu.AddItem(new MenuItem("LaneClearW", "Use W", true).SetValue(true)); laneClearMenu.AddItem(new MenuItem("LaneClearWTurret", "Use W| Attack Turret", true).SetValue(true)); laneClearMenu.AddItem( new MenuItem("LaneClearMana", "If Player ManaPercent >= %", true).SetValue(new Slider(60))); } var jungleClearMenu = clearMenu.AddSubMenu(new Menu("JungleClear", "JungleClear")); { jungleClearMenu.AddItem(new MenuItem("JungleClearQ", "Use Q", true).SetValue(true)); jungleClearMenu.AddItem(new MenuItem("JungleClearW", "Use W", true).SetValue(true)); jungleClearMenu.AddItem( new MenuItem("JungleClearMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(30))); } clearMenu.AddItem(new MenuItem("asdqweqwe", " ", true)); ManaManager.AddSpellFarm(clearMenu); } var killStealMenu = Menu.AddSubMenu(new Menu("KillSteal", "KillSteal")); { killStealMenu.AddItem(new MenuItem("KillStealQ", "Use Q", true).SetValue(true)); } var miscMenu = Menu.AddSubMenu(new Menu("Misc", "Misc")); { var qMenu = miscMenu.AddSubMenu(new Menu("Q Settings", "Q Settings")); { qMenu.AddItem(new MenuItem("AutoQ", "Auto Q?", true).SetValue(true)); } var eMenu = miscMenu.AddSubMenu(new Menu("E Settings", "E Settings")); { eMenu.AddItem(new MenuItem("AutoE", "Auto E?", true).SetValue(true)); eMenu.AddItem( new MenuItem("AutoEHp", "Auto E| When Player HealthPercent <= x%", true).SetValue(new Slider(80))); } var rMenu = miscMenu.AddSubMenu(new Menu("R Settings", "R Settings")); { rMenu.AddItem(new MenuItem("AutoR", "Auto R?", true).SetValue(false)); } } var utilityMenu = Menu.AddSubMenu(new Menu("Utility", "Utility")); { var skinMenu = utilityMenu.AddSubMenu(new Menu("Skin Change", "Skin Change")); { SkinManager.AddToMenu(skinMenu); } var autoLevelMenu = utilityMenu.AddSubMenu(new Menu("Auto Levels", "Auto Levels")); { LevelsManager.AddToMenu(autoLevelMenu); } var itemsMenu = utilityMenu.AddSubMenu(new Menu("Items", "Items")); { ItemsManager.AddToMenu(itemsMenu); } } var drawMenu = Menu.AddSubMenu(new Menu("Drawings", "Drawings")); { drawMenu.AddItem(new MenuItem("DrawQ", "Draw Q Range", true).SetValue(false)); ManaManager.AddDrawFarm(drawMenu); DamageIndicator.AddToMenu(drawMenu); } Game.OnUpdate += OnUpdate; Obj_AI_Base.OnDoCast += OnDoCast; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Drawing.OnDraw += OnDraw; }
public ToggleBoots() { boots = SkinManager.IsWearingSkin(Items.GiantBoots); }
public Graves() { Q = new Spell(SpellSlot.Q, 800f); W = new Spell(SpellSlot.W, 900f); E = new Spell(SpellSlot.E, 425f); R = new Spell(SpellSlot.R, 1050f); Q.SetSkillshot(0.25f, 40f, 3000f, false, SkillshotType.SkillshotLine); W.SetSkillshot(0.25f, 250f, 1000f, false, SkillshotType.SkillshotCircle); R.SetSkillshot(0.25f, 100f, 2100f, false, SkillshotType.SkillshotLine); var comboMenu = Menu.AddSubMenu(new Menu("Combo", "Combo")); { comboMenu.AddItem(new MenuItem("ComboQ", "Use Q", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboW", "Use W", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboE", "Use E", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboEAA", "Use E| Reset Attack", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboECheck", "Use E| Safe Check", true).SetValue(true)); comboMenu.AddItem(new MenuItem("ComboR", "Use R", true).SetValue(false)); comboMenu.AddItem( new MenuItem("ComboRCount", "Use R| Min Hit Count >= x", true).SetValue(new Slider(4, 1, 5))); } var harassMenu = Menu.AddSubMenu(new Menu("Harass", "Harass")); { harassMenu.AddItem(new MenuItem("HarassQ", "Use Q", true).SetValue(true)); harassMenu.AddItem( new MenuItem("HarassMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(60))); } var clearMenu = Menu.AddSubMenu(new Menu("Clear", "Clear")); { var laneClearMenu = clearMenu.AddSubMenu(new Menu("LaneClear", "LaneClear")); { laneClearMenu.AddItem(new MenuItem("LaneClearQ", "Use Q", true).SetValue(true)); laneClearMenu.AddItem( new MenuItem("LaneClearQCount", "Use Q| Min Hit Count >= x", true).SetValue(new Slider(3, 1, 5))); laneClearMenu.AddItem( new MenuItem("LaneClearMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(60))); } var jungleClearMenu = clearMenu.AddSubMenu(new Menu("JungleClear", "JungleClear")); { jungleClearMenu.AddItem(new MenuItem("JungleClearQ", "Use Q", true).SetValue(true)); jungleClearMenu.AddItem(new MenuItem("JungleClearE", "Use E", true).SetValue(true)); jungleClearMenu.AddItem( new MenuItem("JungleClearMana", "When Player ManaPercent >= x%", true).SetValue(new Slider(20))); } clearMenu.AddItem(new MenuItem("asdqweqwe", " ", true)); ManaManager.AddSpellFarm(clearMenu); } var killStealMenu = Menu.AddSubMenu(new Menu("KillSteal", "KillSteal")); { killStealMenu.AddItem(new MenuItem("KillStealQ", "KillSteal Q", true).SetValue(true)); killStealMenu.AddItem(new MenuItem("KillStealW", "KillSteal W", true).SetValue(true)); killStealMenu.AddItem(new MenuItem("KillStealR", "KillSteal R", true).SetValue(true)); foreach (var target in HeroManager.Enemies) { killStealMenu.AddItem(new MenuItem("KillStealR" + target.ChampionName.ToLower(), "Kill: " + target.ChampionName, true).SetValue(true)); } } var burstMenu = Menu.AddSubMenu(new Menu("Burst", "Burst")); { burstMenu.AddItem(new MenuItem("BurstKeys", "Burst Key -> Please Check The Orbwalker Key!", true)); burstMenu.AddItem(new MenuItem("Bursttarget", "Burst Target -> Left Click to Lock!", true)); burstMenu.AddItem(new MenuItem("Burstranges", "How to Burst -> Lock the target and then just press Burst Key!", true)); burstMenu.AddItem(new MenuItem("BurstER", "Burst Mode -> Enabled E->R?", true).SetValue(false)) .SetTooltip("if you dont enabled is RE Burst Mode"); } var miscMenu = Menu.AddSubMenu(new Menu("Misc", "Misc")); { miscMenu.AddItem(new MenuItem("GapW", "Use W| Anti GapCloser", true).SetValue(true)); } var utilityMenu = Menu.AddSubMenu(new Menu("Utility", "Utility")); { var skinMenu = utilityMenu.AddSubMenu(new Menu("Skin Change", "Skin Change")); { SkinManager.AddToMenu(skinMenu); } var autoLevelMenu = utilityMenu.AddSubMenu(new Menu("Auto Levels", "Auto Levels")); { LevelsManager.AddToMenu(autoLevelMenu); } var itemsMenu = utilityMenu.AddSubMenu(new Menu("Items", "Items")); { ItemsManager.AddToMenu(itemsMenu); } } var drawMenu = Menu.AddSubMenu(new Menu("Drawings", "Drawings")); { drawMenu.AddItem(new MenuItem("DrawQ", "Draw Q Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawW", "Draw W Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawE", "Draw E Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawR", "Draw R Range", true).SetValue(false)); drawMenu.AddItem(new MenuItem("DrawBurst", "Draw Burst Range", true).SetValue(false)); ManaManager.AddDrawFarm(drawMenu); DamageIndicator.AddToMenu(drawMenu); } Obj_AI_Base.OnPlayAnimation += OnPlayAnimation; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Game.OnUpdate += OnUpdate; Obj_AI_Base.OnSpellCast += OnSpellCast; AntiGapcloser.OnEnemyGapcloser += OnEnemyGapcloser; Drawing.OnDraw += OnDraw; }
private void load(BeatmapManager beatmaps, AudioManager audio, DialogOverlay dialog, OsuColour colours, SkinManager skins, Bindable <IEnumerable <Mod> > selectedMods) { if (selectedMods != null) { SelectedMods.BindTo(selectedMods); } if (Footer != null) { Footer.AddButton(@"mods", colours.Yellow, ModSelect, Key.F1); Footer.AddButton(@"random", colours.Green, triggerRandom, Key.F2); Footer.AddButton(@"options", colours.Blue, BeatmapOptions, Key.F3); BeatmapOptions.AddButton(@"Delete", @"all difficulties", FontAwesome.fa_trash, colours.Pink, () => delete(Beatmap.Value.BeatmapSetInfo), Key.Number4, float.MaxValue); BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.fa_times_circle_o, colours.Purple, null, Key.Number1); BeatmapOptions.AddButton(@"Clear", @"local scores", FontAwesome.fa_eraser, colours.Purple, null, Key.Number2); } if (this.beatmaps == null) { this.beatmaps = beatmaps; } this.beatmaps.ItemAdded += onBeatmapSetAdded; this.beatmaps.ItemRemoved += onBeatmapSetRemoved; this.beatmaps.BeatmapHidden += onBeatmapHidden; this.beatmaps.BeatmapRestored += onBeatmapRestored; dialogOverlay = dialog; sampleChangeDifficulty = audio.Sample.Get(@"SongSelect/select-difficulty"); sampleChangeBeatmap = audio.Sample.Get(@"SongSelect/select-expand"); SampleConfirm = audio.Sample.Get(@"SongSelect/confirm-selection"); Carousel.LoadBeatmapSetsFromManager(this.beatmaps); if (dialogOverlay != null) { Schedule(() => { // if we have no beatmaps but osu-stable is found, let's prompt the user to import. if (!beatmaps.GetAllUsableBeatmapSets().Any() && beatmaps.StableInstallationAvailable) { dialogOverlay.Push(new ImportFromStablePopup(() => { beatmaps.ImportFromStableAsync(); skins.ImportFromStableAsync(); })); } }); } }
private void load(SentakkiRulesetConfigManager settings, OsuColour colours, DrawableSentakkiRuleset ruleset, IAPIProvider api, SkinManager skinManager) { settings?.BindWith(SentakkiRulesetSettings.RingOpacity, RingOpacity); RingOpacity.BindValueChanged(opacity => Alpha = opacity.NewValue); settings?.BindWith(SentakkiRulesetSettings.ShowNoteStartIndicators, NoteStartIndicators); NoteStartIndicators.BindValueChanged(opacity => spawnIndicator.FadeTo(Convert.ToSingle(opacity.NewValue), 200)); skin = skinManager.CurrentSkin.GetBoundCopy(); skin.BindValueChanged(_ => colorOption.TriggerChange(), true); settings?.BindWith(SentakkiRulesetSettings.RingColor, colorOption); colorOption.BindValueChanged(option => { if (option.NewValue == ColorOption.Default) { this.FadeColour(Color4.White, 200); } else if (option.NewValue == ColorOption.Difficulty) { this.FadeColour(colours.ForDifficultyRating(ruleset?.Beatmap.BeatmapInfo.DifficultyRating ?? DifficultyRating.Normal, true), 200); } else if (option.NewValue == ColorOption.Skin) { this.FadeColour(skin.Value.GetConfig <GlobalSkinColours, Color4>(GlobalSkinColours.MenuGlow)?.Value ?? Color4.White, 200); } }); settings?.BindWith(SentakkiRulesetSettings.KiaiEffects, kiaiEffect); }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.Paint" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs" /> that contains the event data.</param> protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { base.OnPaint(e); Bitmap B = new Bitmap(Width, Height); Graphics G = Graphics.FromImage(B); G.Clear(BackColor); EnabledStringColor = ColorTranslator.FromHtml(fontColor); EnabledFocusedColor = ColorTranslator.FromHtml(focusColor); MaterialTB.TextAlign = TextAlignment; MaterialTB.ForeColor = IsEnabled ? EnabledStringColor : DisabledStringColor; MaterialTB.UseSystemPasswordChar = UseSystemPasswordChar; G.DrawLine(new Pen(new SolidBrush(IsEnabled ? SkinManager.GetDividersColor() : DisabledUnFocusedColor)), new Point(0, Height - 1), new Point(Width, Height - 1)); if (IsEnabled) { G.FillRectangle(MaterialTB.Focused() ? SkinManager.ColorScheme.PrimaryBrush : SkinManager.GetDividersBrush(), PointAnimation, (float)Height - 1, SizeAnimation, MaterialTB.Focused() ? 2 : 1); } G.SmoothingMode = SmoothingMode.AntiAlias; G.FillEllipse(new SolidBrush(IsEnabled ? mouseOver ? SkinManager.ColorScheme.AccentColor : SkinManager.GetDividersColor() : DisabledInputColor), Width - 5, 24, 4, 4); G.FillEllipse(new SolidBrush(IsEnabled ? mouseOver ? SkinManager.ColorScheme.AccentColor : SkinManager.GetDividersColor() : DisabledInputColor), Width - 11, 24, 4, 4); G.FillEllipse(new SolidBrush(IsEnabled ? mouseOver ? SkinManager.ColorScheme.AccentColor : SkinManager.GetDividersColor() : DisabledInputColor), Width - 17, 24, 4, 4); e.Graphics.DrawImage((Image)(B.Clone()), 0, 0); G.Dispose(); B.Dispose(); }
// Added by K.G(25/11/2011) to Delete unused zip files. public bool DeleteUnusedZipFiles(string skinFolderPath) { SkinManager manager = new SkinManager(skinFolderPath); manager.DeleteExtraZipFiles(skinFolderPath); return true; }
private void Game_OnGameLoad(EventArgs args) { Player = ObjectManager.Player; if (ChampName.ToLower() != Player.ChampionName.ToLower()) return; SkinManager = new SkinManager(); Spells = new SpellManager(); BushManager = new BushManager(); InitializeSpells(ref Spells); InitializeSkins(ref SkinManager); Menu = new Menu("Easy" + ChampName, "Easy" + ChampName, true); SkinManager.AddToMenu(ref Menu); BushManager.AddToMenu(ref Menu); Menu.AddSubMenu(new Menu("目标选择", "Target Selector")); TargetSelector.AddToMenu(Menu.SubMenu("Target Selector")); Menu.AddSubMenu(new Menu("走砍", "Orbwalker")); Orbwalker = new Orbwalking.Orbwalker(Menu.SubMenu("Orbwalker")); InitializeMenu(); Menu.AddItem(new MenuItem("Recall_block", "回城时阻止使用技能").SetValue(true)); Menu.AddToMainMenu(); Game.OnUpdate += Game_OnGameUpdate; Drawing.OnDraw += Drawing_OnDraw; Game.PrintChat("Easy" + ChampName + " is loaded!"); }
public void Toggle() { boots = !boots; SkinManager.SetSkinEnabled(Items.GiantBoots, boots); }
// Added by Optimus for 'Allow the UI to load previously generated zip files in order to pre-populate the form ' module public bool ExtractPreviouslyGeneratedSkinPackageZip(string skinFolderPath) { SkinManager manager = new SkinManager(skinFolderPath); manager.CreateSkinPackageDirectoryAndUnzipFiles(); return true; }
public void Toggle() { snake = !snake; SkinManager.SetSkinEnabled(Items.SnakeRing, snake); }
// Added by K.G for 'Allow the UI to load previously generated zip files in order to pre-populate the form ' module public bool ExtractPreviouslyGeneratedSkinPackageZip(string skinFolderPath, string zipPath) { bool result = false; SkinManager manager = new SkinManager(skinFolderPath); manager.DeleteUploadFolders(); // Added by K.G(16-JAN-2012) to complete load from zip functionality result = manager.CreateSkinPackageDirectoryAndUnzipFiles(zipPath); FileInfo skinZipFile = new FileInfo(zipPath); skinZipFile.Delete(); return result; }
private void load() { if (!Host.IsPrimaryInstance && !DebugUtils.IsDebugBuild) { Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error); Environment.Exit(0); } if (args?.Length > 0) { var paths = args.Where(a => !a.StartsWith('-')).ToArray(); if (paths.Length > 0) { Task.Run(() => Import(paths)); } } dependencies.CacheAs(this); dependencies.Cache(SentryLogger); dependencies.Cache(osuLogo = new OsuLogo { Alpha = 0 }); // bind config int to database RulesetInfo configRuleset = LocalConfig.GetBindable <int>(OsuSetting.Ruleset); Ruleset.Value = RulesetStore.GetRuleset(configRuleset.Value) ?? RulesetStore.AvailableRulesets.First(); Ruleset.ValueChanged += r => configRuleset.Value = r.NewValue.ID ?? 0; // bind config int to database SkinInfo configSkin = LocalConfig.GetBindable <int>(OsuSetting.Skin); SkinManager.CurrentSkinInfo.ValueChanged += skin => configSkin.Value = skin.NewValue.ID; configSkin.ValueChanged += skinId => { var skinInfo = SkinManager.Query(s => s.ID == skinId.NewValue); if (skinInfo == null) { switch (skinId.NewValue) { case -1: skinInfo = DefaultLegacySkin.Info; break; default: skinInfo = SkinInfo.Default; break; } } SkinManager.CurrentSkinInfo.Value = skinInfo; }; configSkin.TriggerChange(); IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true); Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade); SelectedMods.BindValueChanged(modsChanged); Beatmap.BindValueChanged(beatmapChanged, true); }
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) { var g = e.Graphics; g.Clear(SkinManager.GetApplicationBackgroundColor()); //Draw background var itemRect = GetItemRect(e.Item); g.FillRectangle(e.Item.Selected && e.Item.Enabled ? SkinManager.GetCmsSelectedItemBrush() : new SolidBrush(SkinManager.GetApplicationBackgroundColor()), itemRect); //Ripple animation var toolStrip = e.ToolStrip as MaterialContextMenuStrip; if (toolStrip != null) { var animationManager = toolStrip.animationManager; var animationSource = toolStrip.animationSource; if (toolStrip.animationManager.IsAnimating() && e.Item.Bounds.Contains(animationSource)) { for (int i = 0; i < animationManager.GetAnimationCount(); i++) { var animationValue = animationManager.GetProgress(i); var rippleBrush = new SolidBrush(Color.FromArgb((int)(51 - (animationValue * 50)), Color.Black)); var rippleSize = (int)(animationValue * itemRect.Width * 2.5); g.FillEllipse(rippleBrush, new Rectangle(animationSource.X - rippleSize / 2, itemRect.Y - itemRect.Height, rippleSize, itemRect.Height * 3)); } } } }
private static void Main() { BonusSkins.Register(); SkinManager.EnableFormSkins(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #region Autofac 采用配置文件或者代码的方式进行注入,这种方式还有问题 // var builder = new ContainerBuilder(); #region 配置文件方式 // var config = new ConfigurationBuilder(); // config.AddXmlFile("config/autofac_ioc.xml", false); // var module = new ConfigurationModule(config.Build()); // builder.RegisterModule(module); // builder.RegisterType<CrawlPresenter>().As<BasePresenter<CrawlForm>>(); #endregion #region 代码方式 // builder.RegisterType<CrawlForm>().As<ICrawlView>().InstancePerLifetimeScope(); // builder.RegisterType<CarBrandBusiness>().As<ICarBrandBusiness>().PropertiesAutowired().SingleInstance(); // builder.RegisterType<CarBrandDataAccess>().As<ICarBrandDataAccess>().SingleInstance(); // builder.RegisterType<CrawlPresenter>().PropertiesAutowired(); #endregion // var container = builder.Build(); // var form = container.Resolve<CrawlPresenter>(); #endregion #region Ninject 采用配置文件或者代码的方式进行注入 IKernel kernel = new StandardKernel(); #region 配置文件方式 // kernel.Load("config/ninject_ioc.xml"); #endregion #region 代码方式加载 kernel.Bind <ICrawlView>().To <CrawlForm>(); // kernel.Bind<ICarBusiness<CarBrandEntity>>().To<CarBusiness<CarBrandEntity>>(); // kernel.Bind<ICarDataAccess<CarBrandEntity>>().To<BaseDataAccess<CarBrandEntity>>(); kernel.Bind <CrawlPresenter>().ToSelf(); #endregion var form = kernel.Get <CrawlPresenter>(); #endregion #region Spring.NET方式配置 // var ctx = new XmlApplicationContext("config/spring_ioc.xml"); // var objectFactory = (IObjectFactory) ctx; // var form = objectFactory.GetObject("CrawlPresenter") as CrawlPresenter; #endregion #region Dapper // DapperExtensions.DapperExtensions.SetMappingAssemblies(new[] // { // typeof(CarBrandEntityMapper).Assembly, // typeof(CarModelEntityMapper).Assembly, // typeof(CarSeriesEntityMapper).Assembly // }); #endregion Application.Run(form?.View as Form); }
// Added by K.G for 'Allow the UI to load previously generated zip files in order to pre-populate the form ' module public bool ExtractPreviouslyGeneratedSkinPackageZip(string skinFolderPath, string zipPath) { bool result = false; SkinManager manager = new SkinManager(skinFolderPath); result = manager.CreateSkinPackageDirectoryAndUnzipFiles(zipPath); return result; }
// Methods public DxSpreadsheetControlTemplateDataTypeEditor() { SkinManager.EnableFormSkins(); }
public ToggleSnake() { snake = SkinManager.IsWearingSkin(Items.SnakeRing); }