mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-10-03 06:15:51 -05:00
Infra: Capitalisation Consistency (#6296)
* Rename Ryujinx.UI.Common * Rename Ryujinx.UI.LocaleGenerator * Update in Files AboutWindow * Configuration State * Rename projects * Ryujinx/UI * Fix build * Main remaining inconsistencies * HLE.UI Namespace * HLE.UI Files * Namespace * Ryujinx.UI.Common.Configuration.UI * Ryujinx.UI.Common,Configuration.UI Files * More instances
This commit is contained in:
@@ -86,7 +86,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
PlayerIndex primaryIndex;
|
||||
while (!_system.Device.Hid.Npads.Validate(playerMin, playerMax, (ControllerType)privateArg.NpadStyleSet, out configuredCount, out primaryIndex))
|
||||
{
|
||||
ControllerAppletUiArgs uiArgs = new()
|
||||
ControllerAppletUIArgs uiArgs = new()
|
||||
{
|
||||
PlayerCountMin = playerMin,
|
||||
PlayerCountMax = playerMax,
|
||||
@@ -95,7 +95,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
IsDocked = _system.State.DockedMode,
|
||||
};
|
||||
|
||||
if (!_system.Device.UiHandler.DisplayMessageDialog(uiArgs))
|
||||
if (!_system.Device.UIHandler.DisplayMessageDialog(uiArgs))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
public struct ControllerAppletUiArgs
|
||||
public struct ControllerAppletUIArgs
|
||||
{
|
||||
public int PlayerCountMin;
|
||||
public int PlayerCountMax;
|
@@ -166,13 +166,13 @@ namespace Ryujinx.HLE.HOS.Applets.Error
|
||||
|
||||
string[] buttons = GetButtonsText(module, description, "DlgBtn");
|
||||
|
||||
bool showDetails = _horizon.Device.UiHandler.DisplayErrorAppletDialog($"Error Code: {module}-{description:0000}", "\n" + message, buttons);
|
||||
bool showDetails = _horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Code: {module}-{description:0000}", "\n" + message, buttons);
|
||||
if (showDetails)
|
||||
{
|
||||
message = GetMessageText(module, description, "FlvMsg");
|
||||
buttons = GetButtonsText(module, description, "FlvBtn");
|
||||
|
||||
_horizon.Device.UiHandler.DisplayErrorAppletDialog($"Details: {module}-{description:0000}", "\n" + message, buttons);
|
||||
_horizon.Device.UIHandler.DisplayErrorAppletDialog($"Details: {module}-{description:0000}", "\n" + message, buttons);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,12 +200,12 @@ namespace Ryujinx.HLE.HOS.Applets.Error
|
||||
|
||||
buttons.Add("OK");
|
||||
|
||||
bool showDetails = _horizon.Device.UiHandler.DisplayErrorAppletDialog($"Error Number: {applicationErrorArg.ErrorNumber}", "\n" + messageText, buttons.ToArray());
|
||||
bool showDetails = _horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Number: {applicationErrorArg.ErrorNumber}", "\n" + messageText, buttons.ToArray());
|
||||
if (showDetails)
|
||||
{
|
||||
buttons.RemoveAt(0);
|
||||
|
||||
_horizon.Device.UiHandler.DisplayErrorAppletDialog($"Error Number: {applicationErrorArg.ErrorNumber} (Details)", "\n" + detailsText, buttons.ToArray());
|
||||
_horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Number: {applicationErrorArg.ErrorNumber} (Details)", "\n" + detailsText, buttons.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
||||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.UI;
|
||||
using Ryujinx.Memory;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@@ -4,8 +4,8 @@ using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
||||
using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad;
|
||||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.Ui.Input;
|
||||
using Ryujinx.HLE.UI;
|
||||
using Ryujinx.HLE.UI.Input;
|
||||
using Ryujinx.Memory;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
@@ -92,14 +92,14 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
_keyboardBackgroundInitialize = MemoryMarshal.Read<SoftwareKeyboardInitialize>(keyboardConfig);
|
||||
_backgroundState = InlineKeyboardState.Uninitialized;
|
||||
|
||||
if (_device.UiHandler == null)
|
||||
if (_device.UIHandler == null)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.ServiceAm, "GUI Handler is not set, software keyboard applet will not work properly");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create a text handler that converts keyboard strokes to strings.
|
||||
_dynamicTextInputHandler = _device.UiHandler.CreateDynamicTextInputHandler();
|
||||
_dynamicTextInputHandler = _device.UIHandler.CreateDynamicTextInputHandler();
|
||||
_dynamicTextInputHandler.TextChangedEvent += HandleTextChangedEvent;
|
||||
_dynamicTextInputHandler.KeyPressedEvent += HandleKeyPressedEvent;
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
_npads.NpadButtonDownEvent += HandleNpadButtonDownEvent;
|
||||
_npads.NpadButtonUpEvent += HandleNpadButtonUpEvent;
|
||||
|
||||
_keyboardRenderer = new SoftwareKeyboardRenderer(_device.UiHandler.HostUiTheme);
|
||||
_keyboardRenderer = new SoftwareKeyboardRenderer(_device.UIHandler.HostUITheme);
|
||||
}
|
||||
|
||||
return ResultCode.Success;
|
||||
@@ -199,7 +199,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
_keyboardForegroundConfig.StringLengthMax = 100;
|
||||
}
|
||||
|
||||
if (_device.UiHandler == null)
|
||||
if (_device.UIHandler == null)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Application, "GUI Handler is not set. Falling back to default");
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
else
|
||||
{
|
||||
// Call the configured GUI handler to get user's input.
|
||||
var args = new SoftwareKeyboardUiArgs
|
||||
var args = new SoftwareKeyboardUIArgs
|
||||
{
|
||||
KeyboardMode = _keyboardForegroundConfig.Mode,
|
||||
HeaderText = StripUnicodeControlCodes(_keyboardForegroundConfig.HeaderText),
|
||||
@@ -222,7 +222,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
InitialText = initialText,
|
||||
};
|
||||
|
||||
_lastResult = _device.UiHandler.DisplayInputDialog(args, out _textValue) ? KeyboardResult.Accept : KeyboardResult.Cancel;
|
||||
_lastResult = _device.UIHandler.DisplayInputDialog(args, out _textValue) ? KeyboardResult.Accept : KeyboardResult.Cancel;
|
||||
_textValue ??= initialText ?? DefaultInputText;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.UI;
|
||||
using Ryujinx.Memory;
|
||||
using System;
|
||||
using System.Threading;
|
||||
@@ -15,13 +15,13 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
|
||||
private readonly object _stateLock = new();
|
||||
|
||||
private readonly SoftwareKeyboardUiState _state = new();
|
||||
private readonly SoftwareKeyboardUIState _state = new();
|
||||
private readonly SoftwareKeyboardRendererBase _renderer;
|
||||
|
||||
private readonly TimedAction _textBoxBlinkTimedAction = new();
|
||||
private readonly TimedAction _renderAction = new();
|
||||
|
||||
public SoftwareKeyboardRenderer(IHostUiTheme uiTheme)
|
||||
public SoftwareKeyboardRenderer(IHostUITheme uiTheme)
|
||||
{
|
||||
_renderer = new SoftwareKeyboardRendererBase(uiTheme);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
StartRenderer(_renderAction, _renderer, _state, _stateLock);
|
||||
}
|
||||
|
||||
private static void StartTextBoxBlinker(TimedAction timedAction, SoftwareKeyboardUiState state, object stateLock)
|
||||
private static void StartTextBoxBlinker(TimedAction timedAction, SoftwareKeyboardUIState state, object stateLock)
|
||||
{
|
||||
timedAction.Reset(() =>
|
||||
{
|
||||
@@ -45,9 +45,9 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
}, TextBoxBlinkSleepMilliseconds);
|
||||
}
|
||||
|
||||
private static void StartRenderer(TimedAction timedAction, SoftwareKeyboardRendererBase renderer, SoftwareKeyboardUiState state, object stateLock)
|
||||
private static void StartRenderer(TimedAction timedAction, SoftwareKeyboardRendererBase renderer, SoftwareKeyboardUIState state, object stateLock)
|
||||
{
|
||||
SoftwareKeyboardUiState internalState = new();
|
||||
SoftwareKeyboardUIState internalState = new();
|
||||
|
||||
bool canCreateSurface = false;
|
||||
bool needsUpdate = true;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.UI;
|
||||
using Ryujinx.Memory;
|
||||
using SixLabors.Fonts;
|
||||
using SixLabors.ImageSharp;
|
||||
@@ -63,7 +63,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
private Point _logoPosition;
|
||||
private float _messagePositionY;
|
||||
|
||||
public SoftwareKeyboardRendererBase(IHostUiTheme uiTheme)
|
||||
public SoftwareKeyboardRendererBase(IHostUITheme uiTheme)
|
||||
{
|
||||
int ryujinxLogoSize = 32;
|
||||
|
||||
@@ -205,7 +205,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
});
|
||||
}
|
||||
|
||||
public void DrawMutableElements(SoftwareKeyboardUiState state)
|
||||
public void DrawMutableElements(SoftwareKeyboardUIState state)
|
||||
{
|
||||
if (_surface == null)
|
||||
{
|
||||
@@ -322,7 +322,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
return new RectangleF(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
||||
}
|
||||
|
||||
private void DrawTextBox(IImageProcessingContext context, SoftwareKeyboardUiState state)
|
||||
private void DrawTextBox(IImageProcessingContext context, SoftwareKeyboardUIState state)
|
||||
{
|
||||
var inputTextRectangle = MeasureString(state.InputText, _inputTextFont);
|
||||
|
||||
|
@@ -2,7 +2,7 @@ using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
public struct SoftwareKeyboardUiArgs
|
||||
public struct SoftwareKeyboardUIArgs
|
||||
{
|
||||
public KeyboardMode KeyboardMode;
|
||||
public string HeaderText;
|
@@ -1,11 +1,11 @@
|
||||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.HLE.UI;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
{
|
||||
/// <summary>
|
||||
/// TODO
|
||||
/// </summary>
|
||||
internal class SoftwareKeyboardUiState
|
||||
internal class SoftwareKeyboardUIState
|
||||
{
|
||||
public string InputText = "";
|
||||
public int CursorBegin = 0;
|
Reference in New Issue
Block a user