Peoplemon  0.1.0
Peoplemon 3 game source documentation
OpenAnimationEditor.cpp
Go to the documentation of this file.
1 #include <BLIB/Interfaces.hpp>
2 #include <BLIB/Util/FileUtil.hpp>
3 #include <cstdlib>
4 
5 namespace editor
6 {
7 namespace component
8 {
9 namespace
10 {
11 const char* getEditorPath() {
12  static const char* WindowsPath = "tools\\AnimationEditor\\AnimationEditor.exe";
13  static const char* UnixPath = "tools/AnimationEditor/AnimationEditor";
14  if (bl::util::FileUtil::exists(UnixPath)) { return UnixPath; }
15  return WindowsPath;
16 }
17 
18 } // namespace
19 
21  const char* editor = getEditorPath();
22  if (!bl::util::FileUtil::exists(editor)) {
23  bl::dialog::tinyfd_messageBox(
24  "Animation Editor Missing",
25  "Please download the animation editor and place it in the tools directory",
26  "ok",
27  "error",
28  1);
29  return;
30  }
31  std::system(editor);
32 }
33 
34 } // namespace component
35 } // namespace editor
All classes and functionality used for implementing the game editor.
Definition: Tile.hpp:11