summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/animation.cpp4
-rw-r--r--scene/resources/default_theme/default_theme.cpp6
-rw-r--r--scene/resources/style_box.cpp5
-rw-r--r--scene/resources/texture.cpp16
4 files changed, 18 insertions, 13 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index cebec379e6..545c700354 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1761,8 +1761,8 @@ bool Animation::_transform_track_optimize_key(const TKey<TransformKey> &t0, cons
Vector3 v02, v01;
real_t a02, a01;
- r02.get_axis_and_angle(v02, a02);
- r01.get_axis_and_angle(v01, a01);
+ r02.get_axis_angle(v02, a02);
+ r01.get_axis_angle(v01, a01);
if (Math::abs(a02) > p_max_optimizable_angle)
return false;
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index d7c44e0363..3a824a56a3 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -532,10 +532,8 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// WindowDialog
- Ref<StyleBoxTexture> style_pp_win = sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6);
- t->set_stylebox("panel", "WindowDialog", style_pp_win);
- t->set_constant("titlebar_height", "WindowDialog", 20 * scale);
- t->set_constant("scaleborder_size", "WindowDialog", 4);
+ t->set_stylebox("panel", "WindowDialog", sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6));
+ t->set_constant("scaleborder_size", "WindowDialog", 4 * scale);
t->set_font("title_font", "WindowDialog", large_font);
t->set_color("title_color", "WindowDialog", Color(0, 0, 0));
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index 35158806ca..13529c8572 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -138,6 +138,11 @@ void StyleBoxTexture::draw(RID p_canvas_item, const Rect2 &p_rect) const {
texture->get_rect_region(rect, src_rect, rect, src_rect);
+ rect.pos.x -= expand_margin[MARGIN_LEFT];
+ rect.pos.y -= expand_margin[MARGIN_TOP];
+ rect.size.x += expand_margin[MARGIN_LEFT] + expand_margin[MARGIN_RIGHT];
+ rect.size.y += expand_margin[MARGIN_TOP] + expand_margin[MARGIN_BOTTOM];
+
VisualServer::get_singleton()->canvas_item_add_nine_patch(p_canvas_item, rect, src_rect, texture->get_rid(), Vector2(margin[MARGIN_LEFT], margin[MARGIN_TOP]), Vector2(margin[MARGIN_RIGHT], margin[MARGIN_BOTTOM]), VS::NINE_PATCH_STRETCH, VS::NINE_PATCH_STRETCH, draw_center, modulate);
}
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 0889306bad..f0ac30a76e 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -459,25 +459,27 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
flags = f->get_32(); //texture flags!
uint32_t df = f->get_32(); //data format
+ /*
print_line("width: " + itos(tw));
print_line("height: " + itos(th));
print_line("flags: " + itos(flags));
print_line("df: " + itos(df));
+ */
if (request_3d_callback && df & FORMAT_BIT_DETECT_3D) {
- print_line("request detect 3D at " + p_path);
+ //print_line("request detect 3D at " + p_path);
VS::get_singleton()->texture_set_detect_3d_callback(texture, _requested_3d, this);
} else {
- print_line("not requesting detect 3D at " + p_path);
+ //print_line("not requesting detect 3D at " + p_path);
VS::get_singleton()->texture_set_detect_3d_callback(texture, NULL, NULL);
}
if (request_srgb_callback && df & FORMAT_BIT_DETECT_SRGB) {
- print_line("request detect srgb at " + p_path);
+ //print_line("request detect srgb at " + p_path);
VS::get_singleton()->texture_set_detect_srgb_callback(texture, _requested_srgb, this);
} else {
+ //print_line("not requesting detect srgb at " + p_path);
VS::get_singleton()->texture_set_detect_srgb_callback(texture, NULL, NULL);
- print_line("not requesting detect srgb at " + p_path);
}
if (!(df & FORMAT_BIT_STREAM)) {
@@ -493,7 +495,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
uint32_t mipmaps = f->get_32();
uint32_t size = f->get_32();
- print_line("mipmaps: " + itos(mipmaps));
+ //print_line("mipmaps: " + itos(mipmaps));
while (mipmaps > 1 && p_size_limit > 0 && (sw > p_size_limit || sh > p_size_limit)) {
@@ -539,7 +541,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
mipmap_images.push_back(img);
}
- print_line("mipmap read total: " + itos(mipmap_images.size()));
+ //print_line("mipmap read total: " + itos(mipmap_images.size()));
memdelete(f); //no longer needed
@@ -626,7 +628,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
{
PoolVector<uint8_t>::Write w = img_data.write();
int bytes = f->get_buffer(w.ptr(), total_size - ofs);
- print_line("requested read: " + itos(total_size - ofs) + " but got: " + itos(bytes));
+ //print_line("requested read: " + itos(total_size - ofs) + " but got: " + itos(bytes));
memdelete(f);