36 if (jsonDocument.GetProperty(
"update").GetString() ==
"1") {
41 jsonDocument.GetProperty(
"title").GetString(),
42 jsonDocument.GetProperty(
"content").GetString(),
43 jsonDocument.GetProperty(
"btn").GetString(),
46 if (btn == MessageDialogButton.Button1) {
47 WebBrowserManager.LaunchBrowser(jsonDocument.GetProperty(
"url").GetString());
54 Log.
Error($
"Failed processing Update check. Reason: {e.Message}");
61 if (
Input.Tap.HasValue) {
70 MotdManager.ForceRedownload();
71 AudioManager.PlaySound(
"Audio/UI/ButtonClick", 1f, 0f, 0f);
73 if (
Input.IsKeyDownOnce(
Key.PageUp)) {
76 if (
Input.IsKeyDownOnce(
Key.PageDown)) {
81 double realTime = Time.RealTime;
91 ?
ActualSize.X * (1f - MathUtils.PowSign(MathF.Sin(MathUtils.Saturate(1.5f * num3) * (
float)Math.PI / 2f), 0.33f))
92 :
ActualSize.X * (MathUtils.PowSign(MathF.Sin(MathUtils.Saturate(1.5f * num2) * (
float)Math.PI / 2f), 0.33f) - 1f),
127 catch (Exception ex) {
128 Log.
Warning($
"Error loading MOTD line {MotdManager.MessageOfTheDay.Lines.IndexOf(line) + 1}. Reason: {ex.Message}");
137 if (line.Node !=
null) {
138 lineData.Widget =
LoadWidget(
null, line.Node,
null);
141 if (
string.IsNullOrEmpty(line.Text)) {
142 throw new InvalidOperationException(
"Invalid MOTD line.");
147 string[] array = line.Text.Replace(
"\r",
"").Split([
"\n"], StringSplitOptions.None);
148 for (
int i = 0; i < array.Length; i++) {
149 string text = array[i].Trim();
150 if (!
string.IsNullOrEmpty(text)) {
157 lineData.Widget = stackPanelWidget;
static void Error(object message)
static void Warning(object message)
static int Max(int x1, int x2)
static void ShowDialog(ContainerWidget parentWidget, Dialog dialog)
static Action MessageOfTheDayUpdated
static JsonDocument UpdateResult
static Message MessageOfTheDay
static Dictionary< string, Screen > m_screens