This repository has been archived by the owner on Jul 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Music option It isn´t finished * Forgot some important stuff * More music * More music * Options 2 (#76) * Well, like this is better * Better * Update VisualsUISubState.hx * Update MusicSettingsSubState.hx * Update VisualsUISubState.hx * Update MusicSettingsSubState.hx * Update VisualsUISubState.hx * Update MusicSettingsSubState.hx * I'll review that Co-authored-by: DEMOLITIONDON96 <[email protected]> Co-authored-by: Theoyeah <[email protected]>
- Loading branch information
1 parent
ecee5a1
commit f41807e
Showing
8 changed files
with
128 additions
and
48 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
package options; | ||
|
||
#if desktop | ||
import Discord.DiscordClient; | ||
#end | ||
import flash.text.TextField; | ||
import flixel.FlxCamera; | ||
import flixel.FlxG; | ||
import flixel.FlxSprite; | ||
import flixel.addons.display.FlxGridOverlay; | ||
import flixel.group.FlxGroup.FlxTypedGroup; | ||
import flixel.math.FlxMath; | ||
import flixel.text.FlxText; | ||
import flixel.util.FlxColor; | ||
import lime.utils.Assets; | ||
import flixel.FlxSubState; | ||
import flash.text.TextField; | ||
import flixel.FlxG; | ||
import flixel.FlxSprite; | ||
import flixel.util.FlxSave; | ||
import haxe.Json; | ||
import flixel.tweens.FlxEase; | ||
import flixel.tweens.FlxTween; | ||
import flixel.util.FlxTimer; | ||
import flixel.input.keyboard.FlxKey; | ||
import flixel.graphics.FlxGraphic; | ||
import Controls; | ||
import openfl.Lib; | ||
|
||
using StringTools; | ||
|
||
class MusicSettingsSubState extends BaseOptionsMenu | ||
{ | ||
public function new() | ||
{ | ||
title = 'Music'; | ||
rpcTitle = 'Music Settings Menu'; //for Discord Rich Presence | ||
|
||
//I'd suggest using "Low Quality" as an example for making your own option since it is the simplest here | ||
/*var option:Option = new Option('Low Quality', //Name | ||
'If checked, disables some background details,\ndecreases loading times and improves performance.', //Description | ||
'lowQuality', //Save data variable name | ||
'bool', //Variable type | ||
false); //Default value | ||
addOption(option);*/ | ||
|
||
/* | ||
var option:Option = new Option('Persistent Cached Data', | ||
'If checked, images loaded will stay in memory\nuntil the game is closed, this increases memory usage,\nbut basically makes reloading times instant.', | ||
'imagesPersist', | ||
'bool', | ||
false); | ||
option.onChange = onChangePersistentData; //Persistent Cached Data changes FlxGraphic.defaultPersist | ||
addOption(option); | ||
*/ | ||
|
||
/*var option:Option = new Option('Music', | ||
'What music you want to play', | ||
'musicSelected', | ||
'String', | ||
'freakyMenu', | ||
['freakyMenu', 'offsetSong', 'breakfast', 'tea-time', 'flyAgainBro']); | ||
addOption(option);*/ | ||
|
||
var option:Option = new Option('Hitsound Volume', | ||
'Funny notes does \"Tick!\" when you hit them."', | ||
'hitsoundVolume', | ||
'percent', | ||
0); | ||
addOption(option); | ||
option.scrollSpeed = 1.6; | ||
option.minValue = 0.0; | ||
option.maxValue = 1; | ||
if(FlxG.keys.pressed.SHIFT) { | ||
if(ClientPrefs.multiplicativeValue > 0) { | ||
option.changeValue = ClientPrefs.multiplicativeValue; | ||
} else { | ||
option.changeValue = 0.5; | ||
} | ||
} else { | ||
option.changeValue = 0.1; | ||
} | ||
option.decimals = 1; | ||
|
||
|
||
var option:Option = new Option('Pause Screen Song:', | ||
"What song do you prefer for the Pause Screen?", | ||
'pauseMusic', | ||
'string', | ||
'Tea Time', | ||
['None', 'Breakfast', 'Tea Time']); | ||
addOption(option); | ||
option.onChange = onChangePauseMusic; | ||
|
||
|
||
super(); | ||
} | ||
|
||
var changedMusic:Bool = false; | ||
function onChangePauseMusic() | ||
{ | ||
if(ClientPrefs.pauseMusic == 'None') { | ||
FlxG.sound.music.volume = 0; | ||
} else { | ||
FlxG.sound.playMusic(Paths.music(Paths.formatToSongPath(ClientPrefs.pauseMusic))); | ||
} | ||
|
||
changedMusic = true; | ||
} | ||
|
||
override function destroy() | ||
{ | ||
if(changedMusic) FlxG.sound.playMusic(Paths.music('freakyMenu')); | ||
super.destroy(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters