GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
QuickCustomization.h
1 #pragma once
2 
3 #include "GDCore/String.h"
4 
5 namespace gd {
7  public:
8  enum Visibility {
15  Hidden
16  };
17 
18  static Visibility StringAsVisibility(const gd::String& str) {
19  if (str == "visible")
20  return Visibility::Visible;
21  else if (str == "hidden")
22  return Visibility::Hidden;
23 
24  return Visibility::Default;
25  }
26 
27  static gd::String VisibilityAsString(Visibility visibility) {
28  if (visibility == Visibility::Visible)
29  return "visible";
30  else if (visibility == Visibility::Hidden)
31  return "hidden";
32 
33  return "default";
34  }
35 };
36 
37 } // namespace gd
Definition: QuickCustomization.h:6
Visibility
Definition: QuickCustomization.h:8
@ Default
Definition: QuickCustomization.h:11
@ Visible
Definition: QuickCustomization.h:13
@ Hidden
Definition: QuickCustomization.h:15
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24