aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ava/UI/Views/Main/MainMenuBarView.axaml
blob: d5b5efcdd6846bca52cd678055f9d49eb1d7083a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<UserControl
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
    mc:Ignorable="d"
    xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
    x:DataType="viewModels:MainWindowViewModel"
    x:Class="Ryujinx.Ava.UI.Views.Main.MainMenuBarView"
    x:CompileBindings="True">
    <Design.DataContext>
        <viewModels:MainWindowViewModel />
    </Design.DataContext>
    <DockPanel HorizontalAlignment="Stretch">
        <Menu
            Name="Menu"
            Height="35"
            Margin="0"
            HorizontalAlignment="Left">
            <Menu.ItemsPanel>
                <ItemsPanelTemplate>
                    <DockPanel Margin="0" HorizontalAlignment="Stretch" />
                </ItemsPanelTemplate>
            </Menu.ItemsPanel>
            <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarFile}">
                <MenuItem
                    Command="{ReflectionBinding OpenFile}"
                    Header="{locale:Locale MenuBarFileOpenFromFile}"
                    IsEnabled="{Binding EnableNonGameRunningControls}"
                    ToolTip.Tip="{locale:Locale LoadApplicationFileTooltip}" />
                <MenuItem
                    Command="{ReflectionBinding OpenFolder}"
                    Header="{locale:Locale MenuBarFileOpenUnpacked}"
                    IsEnabled="{Binding EnableNonGameRunningControls}"
                    ToolTip.Tip="{locale:Locale LoadApplicationFolderTooltip}" />
                <MenuItem Header="{locale:Locale MenuBarFileOpenApplet}" IsEnabled="{Binding IsAppletMenuActive}">
                    <MenuItem
                        Click="OpenMiiApplet"
                        Header="Mii Edit Applet"
                        ToolTip.Tip="{locale:Locale MenuBarFileOpenAppletOpenMiiAppletToolTip}" />
                </MenuItem>
                <Separator />
                <MenuItem
                    Command="{ReflectionBinding OpenRyujinxFolder}"
                    Header="{locale:Locale MenuBarFileOpenEmuFolder}"
                    ToolTip.Tip="{locale:Locale OpenRyujinxFolderTooltip}" />
                <MenuItem
                    Command="{ReflectionBinding OpenLogsFolder}"
                    Header="{locale:Locale MenuBarFileOpenLogsFolder}"
                    ToolTip.Tip="{locale:Locale OpenRyujinxLogsTooltip}" />
                <Separator />
                <MenuItem
                    Click="CloseWindow"
                    Header="{locale:Locale MenuBarFileExit}"
                    ToolTip.Tip="{locale:Locale ExitTooltip}" />
            </MenuItem>
            <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarOptions}">
                <MenuItem
                    Command="{ReflectionBinding ToggleFullscreen}"
                    Header="{locale:Locale MenuBarOptionsToggleFullscreen}"
                    InputGesture="F11" />
                <MenuItem>
                    <MenuItem.Icon>
                        <CheckBox IsChecked="{Binding StartGamesInFullscreen, Mode=TwoWay}"
                                  MinWidth="250">
                            <TextBlock Text="{locale:Locale MenuBarOptionsStartGamesInFullscreen}"/>
                        </CheckBox>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem IsVisible="{Binding ShowConsoleVisible}">
                    <MenuItem.Icon>
                        <CheckBox IsChecked="{Binding ShowConsole, Mode=TwoWay}"
                                  MinWidth="250">
                            <TextBlock Text="{locale:Locale MenuBarOptionsShowConsole}"/>
                        </CheckBox>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator />
                <MenuItem Name="ChangeLanguageMenuItem" Header="{locale:Locale MenuBarOptionsChangeLanguage}" />
				<MenuItem Name="ToggleFileTypesMenuItem" Header="{locale:Locale MenuBarShowFileTypes}" />
                <Separator />
                <MenuItem
                    Click="OpenSettings"
                    Header="{locale:Locale MenuBarOptionsSettings}"
                    ToolTip.Tip="{locale:Locale OpenSettingsTooltip}" />
                <MenuItem
                    Command="{ReflectionBinding ManageProfiles}"
                    Header="{locale:Locale MenuBarOptionsManageUserProfiles}"
                    IsEnabled="{Binding EnableNonGameRunningControls}"
                    ToolTip.Tip="{locale:Locale OpenProfileManagerTooltip}" />
            </MenuItem>
            <MenuItem
                Name="ActionsMenuItem"
                VerticalAlignment="Center"
                Header="{locale:Locale MenuBarActions}"
                IsEnabled="{Binding IsGameRunning}">
                <MenuItem
                    Click="PauseEmulation_Click"
                    Header="{locale:Locale MenuBarOptionsPauseEmulation}"
                    InputGesture="{Binding PauseKey}"
                    IsEnabled="{Binding !IsPaused}"
                    IsVisible="{Binding !IsPaused}" />
                <MenuItem
                    Click="ResumeEmulation_Click"
                    Header="{locale:Locale MenuBarOptionsResumeEmulation}"
                    InputGesture="{Binding PauseKey}"
                    IsEnabled="{Binding IsPaused}"
                    IsVisible="{Binding IsPaused}" />
                <MenuItem
                    Click="StopEmulation_Click"
                    Header="{locale:Locale MenuBarOptionsStopEmulation}"
                    InputGesture="Escape"
                    IsEnabled="{Binding IsGameRunning}"
                    ToolTip.Tip="{locale:Locale StopEmulationTooltip}" />
                <MenuItem Command="{ReflectionBinding SimulateWakeUpMessage}" Header="{locale:Locale MenuBarOptionsSimulateWakeUpMessage}" />
                <Separator />
                <MenuItem
                    Name="ScanAmiiboMenuItem"
                    AttachedToVisualTree="ScanAmiiboMenuItem_AttachedToVisualTree"
                    Click="OpenAmiiboWindow"
                    Header="{locale:Locale MenuBarActionsScanAmiibo}"
                    IsEnabled="{Binding IsAmiiboRequested}" />
                <MenuItem
                    Command="{ReflectionBinding TakeScreenshot}"
                    Header="{locale:Locale MenuBarFileToolsTakeScreenshot}"
                    InputGesture="{Binding ScreenshotKey}"
                    IsEnabled="{Binding IsGameRunning}" />
                <MenuItem
                    Command="{ReflectionBinding HideUi}"
                    Header="{locale:Locale MenuBarFileToolsHideUi}"
                    InputGesture="{Binding ShowUiKey}"
                    IsEnabled="{Binding IsGameRunning}" />
                <MenuItem
                    Click="OpenCheatManagerForCurrentApp"
                    Header="{locale:Locale GameListContextMenuManageCheat}"
                    IsEnabled="{Binding IsGameRunning}" />
            </MenuItem>
            <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarTools}">
                <MenuItem Header="{locale:Locale MenuBarToolsInstallFirmware}" IsEnabled="{Binding EnableNonGameRunningControls}">
                    <MenuItem Command="{ReflectionBinding InstallFirmwareFromFile}" Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromFile}" />
                    <MenuItem Command="{ReflectionBinding InstallFirmwareFromFolder}" Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromDirectory}" />
                </MenuItem>
                <MenuItem Header="{locale:Locale MenuBarToolsManageFileTypes}" IsVisible="{Binding ManageFileTypesVisible}">
                    <MenuItem Header="{locale:Locale MenuBarToolsInstallFileTypes}" Click="InstallFileTypes_Click"/>
                    <MenuItem Header="{locale:Locale MenuBarToolsUninstallFileTypes}" Click="UninstallFileTypes_Click"/>
                </MenuItem>
            </MenuItem>
            <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarHelp}">
                <MenuItem
                    Name="UpdateMenuItem"
                    IsEnabled="{Binding CanUpdate}"
                    Click="CheckForUpdates"
                    Header="{locale:Locale MenuBarHelpCheckForUpdates}"
                    ToolTip.Tip="{locale:Locale CheckUpdatesTooltip}" />
                <Separator />
                <MenuItem
                    Click="OpenAboutWindow"
                    Header="{locale:Locale MenuBarHelpAbout}"
                    ToolTip.Tip="{locale:Locale OpenAboutTooltip}" />
            </MenuItem>
        </Menu>
    </DockPanel>
</UserControl>