Skip to content

Commit deb3587

Browse files
Optimized the client preferences system
1 parent 9ad6876 commit deb3587

File tree

11 files changed

+137
-172
lines changed

11 files changed

+137
-172
lines changed

assets/shared/images/startup/psx-startup-copyright.xml

Lines changed: 0 additions & 40 deletions
This file was deleted.

assets/shared/images/startup/psx-startup-copyright.png renamed to assets/shared/images/startup/psx-startup-playstation.png

File renamed without changes.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<TextureAtlas imagePath="psx-startup-playstation.png">
3+
<SubTexture name="psx-startup-playstation_0" x="0" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
4+
<SubTexture name="psx-startup-playstation_1" x="1080" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
5+
<SubTexture name="psx-startup-playstation_2" x="2160" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
6+
<SubTexture name="psx-startup-playstation_3" x="3240" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
7+
<SubTexture name="psx-startup-playstation_4" x="0" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
8+
<SubTexture name="psx-startup-playstation_5" x="1080" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
9+
<SubTexture name="psx-startup-playstation_6" x="2160" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
10+
<SubTexture name="psx-startup-playstation_7" x="2160" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
11+
<SubTexture name="psx-startup-playstation_8" x="3240" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
12+
<SubTexture name="psx-startup-playstation_9" x="4320" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
13+
<SubTexture name="psx-startup-playstation_10" x="4320" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
14+
<SubTexture name="psx-startup-playstation_11" x="5400" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
15+
<SubTexture name="psx-startup-playstation_12" x="5400" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
16+
<SubTexture name="psx-startup-playstation_13" x="0" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
17+
<SubTexture name="psx-startup-playstation_14" x="1080" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
18+
<SubTexture name="psx-startup-playstation_15" x="2160" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
19+
<SubTexture name="psx-startup-playstation_16" x="3240" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
20+
<SubTexture name="psx-startup-playstation_17" x="4320" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
21+
<SubTexture name="psx-startup-playstation_18" x="5400" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
22+
<SubTexture name="psx-startup-playstation_19" x="6480" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
23+
<SubTexture name="psx-startup-playstation_20" x="6480" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
24+
<SubTexture name="psx-startup-playstation_21" x="6480" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
25+
<SubTexture name="psx-startup-playstation_22" x="7560" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
26+
<SubTexture name="psx-startup-playstation_23" x="7560" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
27+
<SubTexture name="psx-startup-playstation_24" x="7560" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
28+
<SubTexture name="psx-startup-playstation_25" x="0" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
29+
<SubTexture name="psx-startup-playstation_26" x="1080" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
30+
<SubTexture name="psx-startup-playstation_27" x="2160" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
31+
<SubTexture name="psx-startup-playstation_28" x="3240" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
32+
<SubTexture name="psx-startup-playstation_29" x="4320" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
33+
<SubTexture name="psx-startup-playstation_30" x="5400" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
34+
<SubTexture name="psx-startup-playstation_31" x="6480" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
35+
<SubTexture name="psx-startup-playstation_32" x="7560" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
36+
<SubTexture name="psx-startup-playstation_33" x="8640" y="0" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
37+
<SubTexture name="psx-startup-playstation_34" x="8640" y="1920" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
38+
<SubTexture name="psx-startup-playstation_35" x="8640" y="3840" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
39+
<SubTexture name="psx-startup-playstation_36" x="8640" y="5760" width="1080" height="1920" frameX="0" frameY="0" frameWidth="1080" frameHeight="1920" />
40+
</TextureAtlas>

source/InitState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class InitState extends FlxState
175175
Application.current.window.onFocusIn.add(() ->
176176
{
177177
// Bring the volume back up when the window is focused again.
178-
if (ClientPrefs.getOption('minimizeVolume') && !isWindowFocused)
178+
if (ClientPrefs.options.minimizeVolume && !isWindowFocused)
179179
{
180180
// Cancel any ongoing tween
181181
if (volumeTween != null)
@@ -199,7 +199,7 @@ class InitState extends FlxState
199199
Application.current.window.onFocusOut.add(() ->
200200
{
201201
// Minimize the volume when the window loses focus.
202-
if (ClientPrefs.getOption('minimizeVolume') && isWindowFocused)
202+
if (ClientPrefs.options.minimizeVolume && isWindowFocused)
203203
{
204204
// Store the current (user) volume so we can restore it later.
205205
lastVolume = FlxG.sound.volume;

source/import.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import flixel.tweens.FlxTween;
1818
// STARCORE IMPORTS
1919
// =============================
2020
import starcore.StarcoreG;
21+
import starcore.backend.data.ClientPrefs;
2122
import starcore.backend.util.LoggerUtil.log;
2223
import starcore.backend.util.LoggerUtil.info;
2324
import starcore.backend.util.LoggerUtil.warn;

source/starcore/StarcoreG.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ final class StarcoreG
5454
static var currentShadersApplied:Array<FlxShader> = [];
5555

5656
/**
57-
* Configures the Flixel utility class.
57+
* Configures the global manager.
5858
*
5959
* This should only be called once, when the game first starts up.
6060
*/

source/starcore/backend/api/DiscordClient.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ final class DiscordClient
3232
public static function initialize():Void
3333
{
3434
#if (DISCORD_RPC_ALLOWED && !macro)
35-
if (ClientPrefs.getOption('discordRPC') && isShutDown)
35+
if (ClientPrefs.options.discordRPC && isShutDown)
3636
{
3737
// Log info
3838
LoggerUtil.log('Initializing Discord rich presence');

0 commit comments

Comments
 (0)