summaryrefslogtreecommitdiff
path: root/bin/tests/test_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tests/test_gui.cpp')
-rw-r--r--bin/tests/test_gui.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/tests/test_gui.cpp b/bin/tests/test_gui.cpp
index 17a6a4111c..c404623872 100644
--- a/bin/tests/test_gui.cpp
+++ b/bin/tests/test_gui.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -109,6 +109,9 @@ public:
frame->set_anchor( MARGIN_RIGHT, Control::ANCHOR_END );
frame->set_anchor( MARGIN_BOTTOM, Control::ANCHOR_END );
frame->set_end( Point2(0,0) );
+
+ Ref<Theme> t = memnew( Theme );
+ frame->set_theme(t);
get_root()->add_child( frame );
@@ -140,10 +143,10 @@ public:
img.resize(512,512);
img.generate_mipmaps();
- img.compress();
- Ref<Texture> text = memnew( Texture );
- text->create_from_image(img);
- tf->set_texture(text);
+ img.compress(Image::COMPRESS_PVRTC4);
+ Ref<ImageTexture> tt = memnew( ImageTexture );
+ tt->create_from_image(img);
+ tf->set_texture(tt);
tf->set_pos(Point2(50,50));
//tf->set_scale(Point2(0.3,0.3));