summaryrefslogtreecommitdiff
path: root/scene/resources/default_theme/default_theme.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-12-21 11:42:44 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-12-21 11:42:44 -0300
commitf7f197c40941ffaf03fcddeb20536dec8074ca00 (patch)
tree7a69483162bb873813f6152176b815d189af4edd /scene/resources/default_theme/default_theme.cpp
parent9783f6fc969947fdbf666950ab3da21ac462c57e (diff)
-ability to set default textures in shader (needed for visual shader editing)
-work in progress new graph system (will replace current one) -crash fix in s3m loader (out of bounds acess) -fixed vbox overriding of separation (fixes empty line between section tabs)
Diffstat (limited to 'scene/resources/default_theme/default_theme.cpp')
-rw-r--r--scene/resources/default_theme/default_theme.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index f27cfb9511..050e462902 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -65,7 +65,7 @@ static Ref<Texture> make_icon(T p_src) {
Ref<ImageTexture> texture( memnew( ImageTexture ) );
- texture->create_from_image( Image(p_src) );
+ texture->create_from_image( Image(p_src),ImageTexture::FLAG_FILTER );
return texture;
}
@@ -416,7 +416,15 @@ void make_default_theme() {
t->set_color("font_color_hover","PopupMenu", control_font_color );
t->set_constant("hseparation","PopupMenu",2);
t->set_constant("vseparation","PopupMenu",1);
-
+
+ Ref<StyleBoxTexture> graphsb = make_stylebox(graph_node_png,6,21,6,5,16,21,16,5);
+ //graphsb->set_expand_margin_size(MARGIN_LEFT,10);
+ //graphsb->set_expand_margin_size(MARGIN_RIGHT,10);
+ t->set_stylebox("frame","GraphNode", graphsb );
+ t->set_constant("separation","GraphNode", 1 );
+ t->set_icon("port","GraphNode", make_icon( graph_port_png ) );
+
+
t->set_stylebox("bg","Tree", make_stylebox( tree_bg_png,4,4,4,5,3,3,3,3) );
t->set_stylebox("bg_focus","Tree", focus );
Ref<StyleBoxTexture> tree_selected = make_stylebox( selection_png,4,4,4,4);