yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
startup_flags.h
Go to the documentation of this file.
1#ifndef YAZE_APP_STARTUP_FLAGS_H_
2#define YAZE_APP_STARTUP_FLAGS_H_
3
4#include <string>
5
6#include "absl/strings/ascii.h"
7#include "absl/strings/string_view.h"
8
9namespace yaze {
10
19 kAuto,
20 kShow,
21 kHide,
22};
23
31enum class AssetLoadMode {
32 kAuto,
33 kFull,
34 kLazy,
35};
36
38 absl::string_view value) {
39 const std::string lower = absl::AsciiStrToLower(std::string(value));
40 if (lower == "show" || lower == "on" || lower == "visible") {
42 }
43 if (lower == "hide" || lower == "off" || lower == "none") {
45 }
47}
48
50 switch (value) {
52 return "show";
54 return "hide";
56 default:
57 return "auto";
58 }
59}
60
61inline AssetLoadMode AssetLoadModeFromString(absl::string_view value) {
62 const std::string lower = absl::AsciiStrToLower(std::string(value));
63 if (lower == "full" || lower == "eager") {
65 }
66 if (lower == "lazy" || lower == "deferred" || lower == "on_demand") {
68 }
70}
71
72inline std::string AssetLoadModeToString(AssetLoadMode value) {
73 switch (value) {
75 return "full";
77 return "lazy";
79 default:
80 return "auto";
81 }
82}
83
84} // namespace yaze
85
86#endif // YAZE_APP_STARTUP_FLAGS_H_
AssetLoadMode AssetLoadModeFromString(absl::string_view value)
std::string AssetLoadModeToString(AssetLoadMode value)
StartupVisibility
Tri-state toggle used for startup UI visibility controls.
AssetLoadMode
Asset loading mode for editor resources.
std::string StartupVisibilityToString(StartupVisibility value)
StartupVisibility StartupVisibilityFromString(absl::string_view value)