mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Improve Window's _validate_property()
This commit is contained in:
@@ -236,15 +236,15 @@ void Window::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
}
|
||||
|
||||
void Window::_validate_property(PropertyInfo &p_property) const {
|
||||
if (p_property.name == "position" && initial_position != WINDOW_INITIAL_POSITION_ABSOLUTE) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
|
||||
if (p_property.name == "current_screen" && initial_position != WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
|
||||
if (p_property.name == "theme_type_variation") {
|
||||
if (p_property.name == "position") {
|
||||
if (initial_position != WINDOW_INITIAL_POSITION_ABSOLUTE) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
} else if (p_property.name == "current_screen") {
|
||||
if (initial_position != WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
} else if (p_property.name == "theme_type_variation") {
|
||||
List<StringName> names;
|
||||
|
||||
// Only the default theme and the project theme are used for the list of options.
|
||||
|
||||
Reference in New Issue
Block a user