diff --git a/gamefiles/level/newGame.json b/gamefiles/level/newGame.json index 84c393b6..ab43a4aa 100755 --- a/gamefiles/level/newGame.json +++ b/gamefiles/level/newGame.json @@ -20,7 +20,6 @@ { "name": "loadingScreen.setProgress", "progress": 45 }, { "name": "load", "file": ["level/player/save.json", "%charName%", "%charClass%"] }, { "name": "load", "file": ["level/player/loadCel.json", "%charName%"] }, - { "name": "load", "file": "level/loadBaseLevel.json" }, { "name": "loadingScreen.setProgress", "progress": 55 }, { "name": "resource.add", "id": "currentLevel" }, { "name": "load", "file": "level/town/level.json" }, diff --git a/gamefiles/ui/credits.json b/gamefiles/ui/credits.json index 4fb5b8af..b2d98a98 100755 --- a/gamefiles/ui/credits.json +++ b/gamefiles/ui/credits.json @@ -4,7 +4,7 @@ "id": "credits", "ignorePrevious": true }, - "cursor": {}, + "cursor": null, "keyboard": { "key": ["enter", "esc", " "], "action": { "name": "button.click", "id": "back" } diff --git a/gamefiles/ui/playVideo.json b/gamefiles/ui/playVideo.json index 7358868c..e52c01bd 100755 --- a/gamefiles/ui/playVideo.json +++ b/gamefiles/ui/playVideo.json @@ -9,7 +9,7 @@ "name": "audio.pauseAll" } ], - "cursor": {}, + "cursor": null, "keyboard": { "key": ["enter", "esc", " "], "action": { "name": "button.click", "id": "background" } diff --git a/gamefiles/ui/settings.json b/gamefiles/ui/settings.json index 5ef4ac53..6513eeb8 100755 --- a/gamefiles/ui/settings.json +++ b/gamefiles/ui/settings.json @@ -52,9 +52,6 @@ "mask": "0x00FF00" } ], - "cursor": { - "texture": "cursor" - }, "image": { "id": "mainmenu", "texture": "mainmenu", diff --git a/src/Parser/ParseCursor.cpp b/src/Parser/ParseCursor.cpp old mode 100755 new mode 100644 index e83d2229..bc9d2fb7 --- a/src/Parser/ParseCursor.cpp +++ b/src/Parser/ParseCursor.cpp @@ -21,9 +21,19 @@ namespace Parser void parseCursor(Game& game, const Value& elem) { + if (elem.IsNull() == true) + { + game.Resources().addCursor(nullptr); + return; + } + else if (elem.IsObject() == false) + { + return; + } + game.Window().setMouseCursorVisible(getBool(elem, "show")); - if (getBool(elem, "pop") == true) + if (getBool(elem, "pop", false) == true) { game.Resources().popCursor(); game.updateMouse(); @@ -41,9 +51,5 @@ namespace Parser game.Resources().addCursor(cursor); game.updateMouse(); } - else - { - game.Resources().addCursor(nullptr); - } } } diff --git a/src/Parser/ParseCursor.h b/src/Parser/ParseCursor.h old mode 100755 new mode 100644