|
@@ -33,6 +33,7 @@ public class Options {
|
33
|
33
|
result.sideMenuRootOptions = SideMenuRootOptions.parse(json.optJSONObject("sideMenu"));
|
34
|
34
|
result.animations = AnimationsOptions.parse(json.optJSONObject("animations"));
|
35
|
35
|
result.screenBackgroundColor = ColorParser.parse(json, "screenBackgroundColor");
|
|
36
|
+ result.modal = ModalOptions.parse(json);
|
36
|
37
|
|
37
|
38
|
return result.withDefaultOptions(defaultOptions);
|
38
|
39
|
}
|
|
@@ -48,6 +49,7 @@ public class Options {
|
48
|
49
|
@NonNull public AnimationsOptions animations = new AnimationsOptions();
|
49
|
50
|
@NonNull public SideMenuRootOptions sideMenuRootOptions = new SideMenuRootOptions();
|
50
|
51
|
@NonNull public Color screenBackgroundColor = new NullColor();
|
|
52
|
+ @NonNull public ModalOptions modal = new ModalOptions();
|
51
|
53
|
|
52
|
54
|
void setTopTabIndex(int i) {
|
53
|
55
|
topTabOptions.tabIndex = i;
|
|
@@ -67,6 +69,7 @@ public class Options {
|
67
|
69
|
result.sideMenuRootOptions.mergeWith(sideMenuRootOptions);
|
68
|
70
|
result.animations.mergeWith(animations);
|
69
|
71
|
result.screenBackgroundColor = screenBackgroundColor;
|
|
72
|
+ result.modal.mergeWith(modal);
|
70
|
73
|
return result;
|
71
|
74
|
}
|
72
|
75
|
|
|
@@ -83,6 +86,7 @@ public class Options {
|
83
|
86
|
result.animations.mergeWith(other.animations);
|
84
|
87
|
result.sideMenuRootOptions.mergeWith(other.sideMenuRootOptions);
|
85
|
88
|
if (other.screenBackgroundColor.hasValue()) result.screenBackgroundColor = other.screenBackgroundColor;
|
|
89
|
+ result.modal.mergeWith(other.modal);
|
86
|
90
|
return result;
|
87
|
91
|
}
|
88
|
92
|
|
|
@@ -97,6 +101,7 @@ public class Options {
|
97
|
101
|
animations.mergeWithDefault(defaultOptions.animations);
|
98
|
102
|
sideMenuRootOptions.mergeWithDefault(defaultOptions.sideMenuRootOptions);
|
99
|
103
|
if (!screenBackgroundColor.hasValue()) screenBackgroundColor = defaultOptions.screenBackgroundColor;
|
|
104
|
+ modal.mergeWithDefault(defaultOptions.modal);
|
100
|
105
|
return this;
|
101
|
106
|
}
|
102
|
107
|
|