Skip to content

Commit ffaf350

Browse files
committed
Show pushbutton empty script warning only when editor isn't active
1 parent 70cec9f commit ffaf350

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/object/pushbutton.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "object/pushbutton.hpp"
1818

1919
#include "audio/sound_manager.hpp"
20+
#include "editor/editor.hpp"
2021
#include "object/bigsnowball.hpp"
2122
#include "object/player.hpp"
2223
#include "object/rock.hpp"
@@ -38,7 +39,7 @@ PushButton::PushButton(const ReaderMapping& mapping) :
3839
{
3940
SoundManager::current()->preload(BUTTON_SOUND);
4041

41-
if (!mapping.get("script", m_script))
42+
if (!mapping.get("script", m_script) && !Editor::is_active())
4243
{
4344
log_warning << "No script set for pushbutton." << std::endl;
4445
}

0 commit comments

Comments
 (0)