public NovelSection() { SectionName = "NOVEL"; Children = new Drawable[] { new SpriteText { Text = "Text Display Speed", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new SpriteText { Text = "Auto Play Speed", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new SpriteText { Text = "Skip Unread Text", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new SpriteText { Text = "Mark Read Text", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new KanojoWorksButton { Text = "Change character volumes...", Size = new Vector2(250, 40), BackgroundColour = Colour4.FromHex("#00000066"), } }; }
public AudioSection() { Padding = new MarginPadding { Right = 100 }; SectionName = "AUDIO"; Header.Add(new SpriteText { Text = "SELECT AUDIO DEVICE", X = 5, Anchor = Anchor.BottomRight, Font = KanojoWorksFont.GetFont(size: 16, weight: FontWeight.Bold) }); Children = new Drawable[] { new SpriteText { Text = "Master Volume", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light), }, new SpriteText { Text = "Music Volume", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new SpriteText { Text = "SFX Volume", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, }; }
public DebugSection() { SectionName = "DEBUG"; Children = new Drawable[] { new SpriteText { Text = "Log Overlay", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, }; }
public KanojoWorksDropdownHeader() { var font = KanojoWorksFont.GetFont(size: 18, weight: FontWeight.Bold); Foreground.Padding = new MarginPadding { Horizontal = 12, Vertical = 5 }; BorderColour = Colour4.White; BorderThickness = 2f; Masking = true; Child = spriteText = new SpriteText { AlwaysPresent = true, Font = font, Colour = Colour4.Black }; }
public TextContainer() { // CentreRight to include the possibility of icons on the left side of the resulting Item drawable. Anchor = Anchor.CentreRight; Origin = Anchor.CentreRight; AutoSizeAxes = Axes.Both; Child = NormalText = new SpriteText { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Font = KanojoWorksFont.GetFont(size: 17, weight: FontWeight.Bold), Colour = Colour4.White.Darken(0.1f), Margin = new MarginPadding { Horizontal = 10, Vertical = 5 } }; }
private void load(FrameworkConfigManager config, KanojoWorksConfigManager kwConfig, GameHost host) { scalingMode = kwConfig.GetBindable <ScalingMode>(KanojoWorksSetting.ScalingMode); currentWindowMode = config.GetBindable <WindowMode>(FrameworkSetting.WindowMode); sizeFullscreen = config.GetBindable <Size>(FrameworkSetting.SizeFullscreen); if (host.Window != null) { currentDisplay.BindTo(host.Window.CurrentDisplayBindable); windowModes.BindTo(host.Window.SupportedWindowModes); } const int max_width = 180; SectionName = "VIDEO"; Children = new Drawable[] { new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Spacing = new Vector2(5), Children = new Drawable[] { new SpriteText { Width = max_width, Text = "Resolution", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new ResolutionDropdown { Width = 200, ItemSource = resolutions, Current = sizeFullscreen } } }, new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Spacing = new Vector2(5), Children = new Drawable[] { new SpriteText { Width = max_width, Text = "Window Mode", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new KanojoWorksEnumDropdown <WindowMode> { Width = 200, Current = currentWindowMode } } }, new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Spacing = new Vector2(5), Children = new Drawable[] { new SpriteText { Width = max_width, Text = "Scaling Mode", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new KanojoWorksEnumDropdown <ScalingMode> { Width = 200, Current = scalingMode } } }, new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Spacing = new Vector2(5), Children = new Drawable[] { new SpriteText { Width = max_width, Text = "Frame Limiter", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new KanojoWorksEnumDropdown <FrameSync> { Width = 200, Current = config.GetBindable <FrameSync>(FrameworkSetting.FrameSync) } } }, new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Spacing = new Vector2(5), Children = new Drawable[] { new SpriteText { Width = max_width, Text = "Threading Mode", Font = KanojoWorksFont.GetFont(size: 30, weight: FontWeight.Light) }, new KanojoWorksEnumDropdown <ExecutionMode> { Width = 200, Current = config.GetBindable <ExecutionMode>(FrameworkSetting.ExecutionMode) } } } }; }
public EngineDisclaimer(KanojoWorksScreen nextScreen = null) { this.nextScreen = nextScreen; ValidForResume = false; InternalChildren = new Drawable[] { textFlow = new TextFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, TextAnchor = Anchor.Centre, Anchor = Anchor.Centre, Origin = Anchor.Centre, Spacing = new Vector2(0, 10), Alpha = 0 } }; textFlow.AddText("This game runs on the KanojoWorks engine built on osu!framework.", t => t.Font = KanojoWorksFont.GetFont(size: 30)); textFlow.NewParagraph(); textFlow.AddText("KanojoWorks is still a work in progress, so weirdness and bugs may occur.", t => t.Font = KanojoWorksFont.GetFont(size: 30)); }
private void load() { AddRangeInternal(new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = BackgroundColor }, new Sprite { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, FillMode = BackgroundFillMode, Texture = BackgroundTexture, }, new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding(30), Anchor = Anchor.Centre, Origin = Anchor.Centre, Children = new Drawable[] { new SpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Text = gameBase?.Name, Colour = Colour4.White, Font = KanojoWorksFont.GetFont(size: 40, weight: FontWeight.Bold) }, buttonsContainer = new FillFlowContainer <MenuButton> { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding(100), Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Direction = FillDirection.Horizontal, Spacing = new Vector2(5), Children = new[] { new MenuButton { Text = "New Game", Action = OnNewGame }, new MenuButton { Text = "Load", Action = OnLoadGame, ButtonColor = Colour4.Red }, new MenuButton { Text = "Config", Action = OnSettings }, new MenuButton { Text = "Gallery", Action = OnGallery }, new MenuButton { Text = "Exit", Action = OnExit }, } }, } }, }); }