feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -30,6 +30,12 @@
|
|||
|
||||
#include "texture_progress_bar.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "servers/display/accessibility_server.h"
|
||||
#include "servers/rendering/rendering_server.h"
|
||||
|
||||
void TextureProgressBar::set_under_texture(const Ref<Texture2D> &p_texture) {
|
||||
_set_texture(&under, p_texture);
|
||||
}
|
||||
|
|
@ -424,7 +430,7 @@ void TextureProgressBar::draw_nine_patch_stretched(const Ref<Texture2D> &p_textu
|
|||
p_texture->get_rect_region(dst_rect, src_rect, dst_rect, src_rect);
|
||||
|
||||
RID ci = get_canvas_item();
|
||||
RS::get_singleton()->canvas_item_add_nine_patch(ci, dst_rect, src_rect, p_texture->get_scaled_rid(), topleft, bottomright, RS::NINE_PATCH_STRETCH, RS::NINE_PATCH_STRETCH, true, p_modulate);
|
||||
RS::get_singleton()->canvas_item_add_nine_patch(ci, dst_rect, src_rect, p_texture->get_scaled_rid(), topleft, bottomright, RSE::NINE_PATCH_STRETCH, RSE::NINE_PATCH_STRETCH, true, p_modulate);
|
||||
}
|
||||
|
||||
void TextureProgressBar::_notification(int p_what) {
|
||||
|
|
@ -433,7 +439,7 @@ void TextureProgressBar::_notification(int p_what) {
|
|||
RID ae = get_accessibility_element();
|
||||
ERR_FAIL_COND(ae.is_null());
|
||||
|
||||
DisplayServer::get_singleton()->accessibility_update_set_role(ae, DisplayServer::AccessibilityRole::ROLE_PROGRESS_INDICATOR);
|
||||
AccessibilityServer::get_singleton()->update_set_role(ae, AccessibilityServerEnums::AccessibilityRole::ROLE_PROGRESS_INDICATOR);
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_DRAW: {
|
||||
|
|
@ -641,9 +647,7 @@ void TextureProgressBar::_validate_property(PropertyInfo &p_property) const {
|
|||
}
|
||||
if (p_property.name.begins_with("stretch_margin_") && !nine_patch_stretch) {
|
||||
p_property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
|
||||
if (p_property.name.begins_with("radial_") && (mode != FillMode::FILL_CLOCKWISE && mode != FillMode::FILL_COUNTER_CLOCKWISE && mode != FillMode::FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE)) {
|
||||
} else if (p_property.name.begins_with("radial_") && (mode != FillMode::FILL_CLOCKWISE && mode != FillMode::FILL_COUNTER_CLOCKWISE && mode != FillMode::FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE)) {
|
||||
p_property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
|
@ -703,9 +707,9 @@ void TextureProgressBar::_bind_methods() {
|
|||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "stretch_margin_bottom", PROPERTY_HINT_RANGE, "0,16384,1,suffix:px"), "set_stretch_margin", "get_stretch_margin", SIDE_BOTTOM);
|
||||
|
||||
ADD_GROUP("Textures", "texture_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_under", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_under_texture", "get_under_texture");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_over", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_over_texture", "get_over_texture");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_progress", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_progress_texture", "get_progress_texture");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_under", PROPERTY_HINT_RESOURCE_TYPE, Texture2D::get_class_static()), "set_under_texture", "get_under_texture");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_over", PROPERTY_HINT_RESOURCE_TYPE, Texture2D::get_class_static()), "set_over_texture", "get_over_texture");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_progress", PROPERTY_HINT_RESOURCE_TYPE, Texture2D::get_class_static()), "set_progress_texture", "get_progress_texture");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_progress_offset", PROPERTY_HINT_NONE, "suffix:px"), "set_texture_progress_offset", "get_texture_progress_offset");
|
||||
|
||||
ADD_GROUP("Tint", "tint_");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue