Files
2026-10-12 20:10:00 -04:00

54 lines
8.2 KiB
XML

<Window x:Class="Amnesia.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Amnesia" Width="980" Height="670" MinWidth="880" MinHeight="640" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="CanMinimize" Background="{StaticResource Bg}" FontFamily="Segoe UI Variable, Segoe UI" FontSize="14" Foreground="{StaticResource Fg}">
<Border BorderBrush="{StaticResource Line}" BorderThickness="1"><Grid>
<Grid.RowDefinitions><RowDefinition Height="58"/><RowDefinition/><RowDefinition Height="36"/></Grid.RowDefinitions>
<Grid Background="Transparent" MouseLeftButtonDown="DragTitle"><TextBlock Text="◈ amnesia" FontSize="19" FontWeight="SemiBold" Margin="26,0" VerticalAlignment="Center"/><StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,8,12,8"><Button Content="—" ToolTip="Minimize" Click="Minimize" Padding="16,4" Background="Transparent" BorderThickness="0"/><Button Content="✕" ToolTip="Close" Click="CloseApp" Padding="16,4" Background="Transparent" BorderThickness="0"/></StackPanel></Grid>
<Grid Grid.Row="1" x:Name="LoginView" Margin="26,12,26,8">
<Grid.ColumnDefinitions><ColumnDefinition Width="1.05*"/><ColumnDefinition Width="1*"/></Grid.ColumnDefinitions>
<Border CornerRadius="20" Background="{StaticResource Surface}" Margin="0,0,30,0" ClipToBounds="True"><Grid Margin="30">
<Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition/><RowDefinition Height="Auto"/></Grid.RowDefinitions>
<TextBlock Text="A QUIETER WAY TO PLAY" Foreground="{StaticResource Muted}" FontSize="11" FontWeight="Bold"/>
<Viewbox Grid.Row="1" Margin="20"><Canvas Width="260" Height="240">
<Ellipse Width="232" Height="232" Stroke="#433a4f" StrokeThickness="1" Canvas.Left="14" Canvas.Top="4"/>
<Ellipse Width="192" Height="192" Stroke="#38313c" StrokeThickness="1" Canvas.Left="34" Canvas.Top="24"/>
<Path Data="M130,36 L217,86 130,137 43,86 Z" Fill="#8c79a5"/>
<Path Data="M43,86 L130,137 130,235 43,184 Z" Fill="#625577"/>
<Path Data="M130,137 L217,86 217,184 130,235 Z" Fill="#433a4f"/>
<Path Data="M130,36 L130,137 M43,86 L217,184 M217,86 L43,184" Stroke="#cbb9e7" Opacity="0.17"/>
<Ellipse Width="8" Height="8" Fill="#cbb9e7" Canvas.Left="236" Canvas.Top="85"/>
</Canvas></Viewbox>
<StackPanel Grid.Row="2"><TextBlock Text="Less noise.&#10;More Minecraft." FontSize="34" FontWeight="SemiBold" LineHeight="40"/><TextBlock Text="Your space. Your settings. Your next world." Foreground="{StaticResource Muted}" Margin="0,14,0,0"/></StackPanel>
</Grid></Border>
<StackPanel Grid.Column="1" VerticalAlignment="Center" Margin="10,0,12,0">
<TextBlock Text="WELCOME TO AMNESIA" Foreground="{StaticResource Muted}" FontSize="11" FontWeight="Bold"/>
<TextBlock x:Name="AuthTitle" Text="Welcome back." FontSize="32" FontWeight="SemiBold" Margin="0,8,0,6"/>
<TextBlock x:Name="AuthSubtitle" Text="Sign in to your local launcher account." Foreground="{StaticResource Muted}" Margin="0,0,0,26"/>
<TextBlock Text="Username" Margin="0,0,0,8"/><TextBox x:Name="Username" MaxLength="24" AutomationProperties.Name="Username"/>
<TextBlock Text="Password" Margin="0,18,0,8"/><PasswordBox x:Name="Password" MaxLength="128" AutomationProperties.Name="Password" KeyDown="PasswordKeyDown"/>
<CheckBox x:Name="Remember" Content="Remember me on this PC" Margin="0,18,0,18"/>
<Button x:Name="AuthButton" Content="Sign in →" Style="{StaticResource Primary}" Click="Authenticate"/>
<TextBlock x:Name="AuthError" Foreground="#bc9ba1" MinHeight="40" Margin="0,10,0,0" FontSize="12"/>
<Button x:Name="ModeButton" Content="New here? Create an account" Click="ToggleMode" Background="Transparent" BorderThickness="0" Foreground="{StaticResource Muted}" Padding="8"/>
</StackPanel>
</Grid>
<Grid x:Name="HomeView" Grid.Row="1" Margin="34,16" Visibility="Collapsed">
<Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition/><RowDefinition Height="Auto"/></Grid.RowDefinitions>
<Grid><StackPanel><TextBlock Text="YOUR LAUNCHER" Foreground="{StaticResource Muted}" FontSize="11" FontWeight="Bold"/><TextBlock x:Name="Greeting" FontSize="30" FontWeight="SemiBold" Margin="0,8,0,0"/></StackPanel><StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center"><Button Content="⚙ Settings" Click="OpenSettings" Margin="0,0,10,0"/><Button Content="Sign out" Click="SignOut" Background="Transparent"/></StackPanel></Grid>
<Border Grid.Row="1" Margin="0,28,0,24" CornerRadius="20" Background="{StaticResource Surface}" BorderBrush="{StaticResource Line}" BorderThickness="1"><Grid Margin="32"><Grid.ColumnDefinitions><ColumnDefinition Width="2*"/><ColumnDefinition/></Grid.ColumnDefinitions><StackPanel VerticalAlignment="Center"><TextBlock Text="AMNESIA / MINECRAFT" Foreground="{StaticResource Muted}" FontSize="12" FontWeight="Bold"/><TextBlock Text="Make yourself&#10;at home." FontSize="46" FontWeight="SemiBold" Margin="0,16,0,12"/><TextBlock Text="A little space for your next big adventure." Foreground="{StaticResource Muted}"/><Button Content="Open launcher ↗" Style="{StaticResource Primary}" Click="Launch" HorizontalAlignment="Left" Margin="0,26,0,0"/></StackPanel><Viewbox Grid.Column="1" Margin="16"><Path Data="M75,0 L150,44 150,132 75,176 0,132 0,44 Z M0,44 L75,88 150,44 M75,88 L75,176" Stroke="#8c79a5" StrokeThickness="2" Fill="#38313c"/></Viewbox></Grid></Border>
<Grid Grid.Row="2"><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition/></Grid.ColumnDefinitions><StackPanel><TextBlock Text="PERSONAL BY DEFAULT" Foreground="{StaticResource Muted}" FontSize="11"/><TextBlock Text="Preferences saved on this device" Margin="0,7,0,0"/></StackPanel><StackPanel Grid.Column="1"><TextBlock Text="SESSION" Foreground="{StaticResource Muted}" FontSize="11"/><TextBlock x:Name="SessionLabel" Margin="0,7,0,0"/></StackPanel></Grid>
</Grid>
<TextBlock Grid.Row="2" Text="AMNESIA / LOCAL EDITION Built for your next world." Foreground="{StaticResource Dim}" FontSize="10" Margin="28,0" VerticalAlignment="Center"/>
<Border x:Name="SettingsOverlay" Grid.RowSpan="3" Background="#D917141C" Visibility="Collapsed"><Border Width="570" Padding="30" CornerRadius="20" Background="{StaticResource Surface}" BorderBrush="{StaticResource Line}" BorderThickness="1" VerticalAlignment="Center">
<StackPanel><TextBlock Text="Make it yours." FontSize="28" FontWeight="SemiBold"/><TextBlock Text="Launcher preferences · saved for this Windows user" Foreground="{StaticResource Muted}" Margin="0,6,0,24"/>
<TextBlock Text="Launcher executable" FontWeight="SemiBold"/><TextBlock Text="Select Minecraft Launcher or your own client launcher (.exe)." Foreground="{StaticResource Muted}" FontSize="12" Margin="0,5,0,10"/>
<Grid><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions><TextBox x:Name="LauncherPath" IsReadOnly="True" AutomationProperties.Name="Launcher path"/><Button Grid.Column="1" Content="Browse" Click="Browse" Margin="10,0,0,0"/></Grid>
<CheckBox x:Name="MinimizeOnLaunch" Content="Minimize Amnesia after opening the launcher" Margin="0,24,0,0"/>
<CheckBox x:Name="ReduceMotion" Content="Reduce motion" Margin="0,18,0,0"/>
<TextBlock Text="Window opacity" FontWeight="SemiBold" Margin="0,24,0,8"/><Slider x:Name="OpacitySlider" Minimum="0.85" Maximum="1" Value="1" TickFrequency="0.01" IsSnapToTickEnabled="True" AutoToolTipPlacement="TopLeft" AutomationProperties.Name="Window opacity"/>
<TextBlock Text="85% — 100%" Foreground="{StaticResource Muted}" FontSize="11" Margin="0,4,0,20"/>
<TextBlock x:Name="SettingsError" Foreground="#bc9ba1" FontSize="12" Margin="0,0,0,12"/>
<Grid><Button Content="Reset defaults" HorizontalAlignment="Left" Click="ResetSettings" Background="Transparent" BorderThickness="0" Padding="0,12"/><StackPanel Orientation="Horizontal" HorizontalAlignment="Right"><Button Content="Cancel" Click="CancelSettings" Margin="0,0,10,0"/><Button Content="Save changes" Click="SaveSettings" Style="{StaticResource Primary}"/></StackPanel></Grid>
</StackPanel>
</Border></Border>
</Grid></Border>
</Window>