Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcagabe19 committed Nov 14, 2024
1 parent b1ebcbe commit 146bd25
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 0 additions & 2 deletions source/funkin/backend/utils/NativeAPI.hx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ class NativeAPI {
public static function showMessageBox(caption:String, message:String, icon:MessageBoxIcon = MSG_WARNING) {
#if windows
Windows.showMessageBox(caption, message, icon);
#elseif (ios || iphonesim || web)
trace('$caption - $message');
#elseif android
android.Tools.showAlertDialog(caption, message, {name: "OK", func: null}, null);
#else
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/editors/SaveSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SaveSubstate extends MusicBeatSubstate {
super.create();

#if mobile
MobileUtil.saveContent(options.saveExt, data);
MobileUtil.saveContent(options.defaultSaveFile + options.saveExt.getDefault(Path.extension(options.defaultSaveFile)), data);
close();
#else
var fileDialog = new FileDialog();
Expand Down
14 changes: 8 additions & 6 deletions source/funkin/editors/character/CharacterSelection.hx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ class CharacterSelection extends EditorTreeMenu
for (char in (modsList.length == 0 ? Character.getList(false) : modsList))
new IconOption(char, "Press " + button + " to edit this character.", Character.getIconFromCharName(char),
function() {
#if mobile
openSubState(new UIWarningSubstate("CharacterEditor: Not Supported!", "This feature isn't supported on current platform. We are sorry but you need a PC to do that.\n\n\n- Codename Devs", [
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
]));
#else
FlxG.switchState(new CharacterEditor(char));
#if TOUCH_CONTROLS
if (funkin.backend.system.Controls.instance.touchC)
{
openSubState(new UIWarningSubstate("CharacterEditor: Touch Not Supported!", "Please connect a keyboard and mouse to access this editor.", [
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
]));
} else
#end
FlxG.switchState(new CharacterEditor(char));
})
];

Expand Down
12 changes: 6 additions & 6 deletions source/funkin/editors/charter/CharterSelection.hx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CharterSelection extends EditorTreeMenu {
for(d in s.difficulties) if (d != "")
new TextOption(d, "Press " + button + " to edit the chart for the selected difficulty", function() {
#if TOUCH_CONTROLS
if (FlxG.gamepads.numActiveGamepads == 0)
if (funkin.backend.system.Controls.instance.touchC)
{
openSubState(new UIWarningSubstate("Charter: Touch Not Supported!", "Please connect a keyboard and mouse to access this editor.", [
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
Expand All @@ -45,7 +45,7 @@ class CharterSelection extends EditorTreeMenu {
];
list.push(new NewOption("New Difficulty", "New Difficulty", function() {
#if TOUCH_CONTROLS
if (FlxG.gamepads.numActiveGamepads == 0)
if (funkin.backend.system.Controls.instance.touchC)
{
openSubState(new UIWarningSubstate("New Difficulty: Touch Not Supported!", "Please connect a keyboard and mouse to access this editor.", [
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
Expand All @@ -60,7 +60,7 @@ class CharterSelection extends EditorTreeMenu {

list.insert(0, new NewOption("New Song", "New Song", function() {
#if TOUCH_CONTROLS
if (FlxG.gamepads.numActiveGamepads == 0)
if (funkin.backend.system.Controls.instance.touchC)
{
openSubState(new UIWarningSubstate("New Song: Touch Not Supported!", "Please connect a keyboard and mouse to access this editor.", [
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
Expand Down Expand Up @@ -145,7 +145,7 @@ class CharterSelection extends EditorTreeMenu {
for(d in creation.meta.difficulties)
if (d != "") new TextOption(d, "Press " + button + " to edit the chart for the selected difficulty", function() {
#if TOUCH_CONTROLS
if (FlxG.gamepads.numActiveGamepads == 0)
if (funkin.backend.system.Controls.instance.touchC)
{
openSubState(new UIWarningSubstate("Charter: Touch Not Supported!", "Please connect a keyboard and mouse to access this editor.", [
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
Expand All @@ -157,7 +157,7 @@ class CharterSelection extends EditorTreeMenu {
];
list.push(new NewOption("New Difficulty", "New Difficulty", function() {
#if TOUCH_CONTROLS
if (FlxG.gamepads.numActiveGamepads == 0)
if (funkin.backend.system.Controls.instance.touchC)
{
openSubState(new UIWarningSubstate("New Difficulty: Touch Not Supported!", "Please connect a keyboard and mouse to access this editor.", [
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
Expand Down Expand Up @@ -194,7 +194,7 @@ class CharterSelection extends EditorTreeMenu {
curSong.difficulties.push(name);
var option = new TextOption(name, "Press " + button + " to edit the chart for the selected difficulty", function() {
#if TOUCH_CONTROLS
if (FlxG.gamepads.numActiveGamepads == 0)
if (funkin.backend.system.Controls.instance.touchC)
{
openSubState(new UIWarningSubstate("Charter: Touch Not Supported!", "Please connect a keyboard and mouse to access this editor.", [
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
Expand Down

0 comments on commit 146bd25

Please sign in to comment.