diff options
author | Mariano Suligoy <marianognu.easyrpg@gmail.com> | 2016-10-19 19:43:49 -0300 |
---|---|---|
committer | Mariano Suligoy <marianognu.easyrpg@gmail.com> | 2016-10-19 19:43:49 -0300 |
commit | 6d38f79dc59ec4f273d766dde0baba0196078c1c (patch) | |
tree | 42c98a0f1c8c205f40087bc385d57d7a774fd855 /scene/resources | |
parent | 1527cf8c0d17891dd0ebf99d484f83daa46eba3c (diff) |
Fix Color Picker
Replace shaders with procedurally generated controls
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/default_theme/color_picker_hue.png | bin | 132 -> 146 bytes | |||
-rw-r--r-- | scene/resources/default_theme/color_picker_main.png | bin | 310 -> 0 bytes | |||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | scene/resources/default_theme/make_header.py | 0 | ||||
-rw-r--r-- | scene/resources/default_theme/theme_data.h | 43 | ||||
-rw-r--r-- | scene/resources/default_theme/uv_editor.gsl | 19 | ||||
-rw-r--r-- | scene/resources/default_theme/w_editor.gsl | 11 |
7 files changed, 1 insertions, 78 deletions
diff --git a/scene/resources/default_theme/color_picker_hue.png b/scene/resources/default_theme/color_picker_hue.png Binary files differindex 9bdd24f4fe..de2cd0c2bf 100644 --- a/scene/resources/default_theme/color_picker_hue.png +++ b/scene/resources/default_theme/color_picker_hue.png diff --git a/scene/resources/default_theme/color_picker_main.png b/scene/resources/default_theme/color_picker_main.png Binary files differdeleted file mode 100644 index 0498628180..0000000000 --- a/scene/resources/default_theme/color_picker_main.png +++ /dev/null diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 266de77ca0..2ddc3e7576 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -834,15 +834,9 @@ void fill_default_theme(Ref<Theme>& t, const Ref<Font> & default_font, const Ref t->set_icon("screen_picker","ColorPicker", make_icon( icon_color_pick_png ) ); t->set_icon("add_preset","ColorPicker", make_icon( icon_add_png ) ); - t->set_icon("color_area", "ColorPicker", make_icon( color_picker_main_png)); t->set_icon("color_hue", "ColorPicker", make_icon( color_picker_hue_png)); t->set_icon("color_sample", "ColorPicker", make_icon( color_picker_sample_png)); - t->set_shader("uv_editor", "ColorPicker", make_shader("", uv_editor_shader_code, "")); - t->set_shader("w_editor", "ColorPicker", make_shader("", w_editor_shader_code, "")); - - - // TooltipPanel Ref<StyleBoxTexture> style_tt = make_stylebox( tooltip_bg_png,4,4,4,4); diff --git a/scene/resources/default_theme/make_header.py b/scene/resources/default_theme/make_header.py index 2d3f989e01..2d3f989e01 100644..100755 --- a/scene/resources/default_theme/make_header.py +++ b/scene/resources/default_theme/make_header.py diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h index 913ea9b5e9..46fd770a27 100644 --- a/scene/resources/default_theme/theme_data.h +++ b/scene/resources/default_theme/theme_data.h @@ -70,12 +70,7 @@ static const unsigned char close_hl_png[]={ static const unsigned char color_picker_hue_png[]={ -0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x1,0x0,0x8,0x2,0x0,0x0,0x0,0x35,0x30,0x61,0x19,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xe0,0x9,0x18,0xc,0x24,0x18,0xa9,0xb3,0x2c,0xb7,0x0,0x0,0x0,0x23,0x49,0x44,0x41,0x54,0x68,0xde,0xed,0xc1,0x31,0x1,0x0,0x0,0x0,0xc2,0xa0,0xf5,0x4f,0x6d,0xd,0xf,0xa0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbe,0xd,0x31,0x0,0x0,0x1,0x35,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,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x1b,0x1,0x2d,0x0,0x1,0x9e,0xcb,0xc2,0xed,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 +0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0x0,0x8,0x2,0x0,0x0,0x0,0xfd,0x5c,0x8b,0xcf,0x0,0x0,0x0,0x59,0x49,0x44,0x41,0x54,0x28,0x91,0xcd,0xd0,0x31,0xa,0x3,0x31,0x10,0x43,0xd1,0x87,0xc0,0xf6,0xfd,0x8f,0x1b,0xdb,0x30,0x69,0x76,0x21,0x65,0xd8,0x14,0x71,0xf1,0xf9,0x8c,0x84,0x9a,0x51,0x44,0x13,0xfd,0x21,0xe3,0x87,0xed,0xf7,0xa8,0xcd,0x2a,0x99,0x8e,0x46,0x2b,0x94,0xd0,0x43,0xb,0xe3,0x64,0xb3,0x2a,0xa6,0x93,0xb9,0x9f,0x9a,0x4e,0x3a,0x69,0x97,0xc7,0xe5,0x3b,0x1b,0xff,0xef,0x6d,0xa5,0xec,0x30,0xc3,0xeb,0xf2,0xc,0xeb,0xe3,0x5e,0x27,0xf4,0x8a,0x37,0x75,0x7b,0x8a,0xe5,0x90,0x9a,0xab,0x81,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 }; @@ -577,39 +572,3 @@ static const unsigned char window_resizer_png[]={ -static const char *uv_editor_shader_code= - "vec3 nd1sl2=vec3(UV,0);" - "uniform float H=0;" - "float nd4sl0=H;" - "float nd7sl0=nd1sl2.x;" - "float nd7sl1=nd1sl2.y;" - "float nd7sl2=nd1sl2.z;" - "float nd2sl1def=-1;" - "float nd2sl0=nd7sl1*nd2sl1def;" - "float nd6sl1def=1;" - "float nd6sl0=nd2sl0+nd6sl1def;" - "vec3 nd3sl0=vec3(nd4sl0,nd7sl0,nd6sl0);" - "vec3 nd5sl0;" - "{" - " vec3 c = nd3sl0;" - " vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);" - " vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);" - " nd5sl0=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);" - "}" - "COLOR.rgb=nd5sl0;"; - - -static const char *w_editor_shader_code= - "vec3 nd1sl2=vec3(UV,0);" - "float nd2sl1=1-nd1sl2.y;" - "vec3 nd3sl0=vec3(nd2sl1,1,1);" - "vec3 nd6sl0;" - "{" - " vec3 c = nd3sl0;" - " vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);" - " vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);" - " nd6sl0=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);" - "}" - "COLOR.rgb=nd6sl0;"; - - diff --git a/scene/resources/default_theme/uv_editor.gsl b/scene/resources/default_theme/uv_editor.gsl deleted file mode 100644 index 8c24e76dd5..0000000000 --- a/scene/resources/default_theme/uv_editor.gsl +++ /dev/null @@ -1,19 +0,0 @@ -vec3 nd1sl2=vec3(UV,0);
-uniform float H=0;
-float nd4sl0=H;
-float nd7sl0=nd1sl2.x;
-float nd7sl1=nd1sl2.y;
-float nd7sl2=nd1sl2.z;
-float nd2sl1def=-1;
-float nd2sl0=nd7sl1*nd2sl1def;
-float nd6sl1def=1;
-float nd6sl0=nd2sl0+nd6sl1def;
-vec3 nd3sl0=vec3(nd4sl0,nd7sl0,nd6sl0);
-vec3 nd5sl0;
-{
- vec3 c = nd3sl0;
- vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
- vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
- nd5sl0=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
-}
-COLOR.rgb=nd5sl0;
\ No newline at end of file diff --git a/scene/resources/default_theme/w_editor.gsl b/scene/resources/default_theme/w_editor.gsl deleted file mode 100644 index 6d2dd9a0bb..0000000000 --- a/scene/resources/default_theme/w_editor.gsl +++ /dev/null @@ -1,11 +0,0 @@ -vec3 nd1sl2=vec3(UV,0);
-float nd2sl1=1-nd1sl2.y;
-vec3 nd3sl0=vec3(nd2sl1,1,1);
-vec3 nd6sl0;
-{
- vec3 c = nd3sl0;
- vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
- vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
- nd6sl0=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
-}
-COLOR.rgb=nd6sl0;
\ No newline at end of file |