Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-12-11 22:35:27 +0300
committerTon Roosendaal <ton@blender.org>2008-12-11 22:35:27 +0300
commit7a1100c8b536a63a72f3a28947f31c9cf94480d5 (patch)
treeb7db0519bf1a9b9b39bdf754cb62a3ef4b4df148 /source/blender/editors/interface/interface_icons.c
parentd39b43aa2010c9b5262428b4afedebd1686307ba (diff)
2.5
Today's progress; half working, but i better commit to prevent conflicts tomorrow :) - added storage for regions in spacedata - added space switching (unfinished, gives mem-free errors) - bugfix: icon of timewindow gave error on split-area - cleaned interface_icons.c a bit, no warnings - first work on space new() callbacks, they have to make regions too NOTE: probably files saved with 2.5 crash now. Have to look at patching this. NOTE2: the Makefiles required libeditor screen twice... scons too?
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r--source/blender/editors/interface/interface_icons.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 54cfeaecfee..2b22e47b5bf 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -98,8 +98,6 @@ typedef struct DrawInfo {
static struct ListBase iconfilelist = {0, 0};
-static int preview_render_size(int miplevel);
-
/* **************************************************** */
static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs)
@@ -684,6 +682,7 @@ void UI_icons_init(int first_dyn_id)
init_internal_icons();
}
+#if 0
static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned int *rect)
{
struct ImBuf *ima;
@@ -734,6 +733,16 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned
IMB_freeImBuf(ima);
}
+/* Render size for preview images at level miplevel */
+static int preview_render_size(int miplevel)
+{
+ switch (miplevel) {
+ case 0: return 32;
+ case 1: return PREVIEW_DEFAULT_HEIGHT;
+ }
+ return 0;
+}
+
static void icon_create_mipmap(struct PreviewImage* prv_img, int miplevel)
{
unsigned int size = preview_render_size(miplevel);
@@ -794,6 +803,7 @@ static void set_alpha(char* cp, int sizex, int sizey, char alpha)
}
}
}
+#endif
/* only called when icon has changed */
/* only call with valid pointer from UI_icon_draw */
@@ -881,16 +891,6 @@ static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw,
glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, rect);
}
-/* Render size for preview images at level miplevel */
-static int preview_render_size(int miplevel)
-{
- switch (miplevel) {
- case 0: return 32;
- case 1: return PREVIEW_DEFAULT_HEIGHT;
- }
- return 0;
-}
-
/* Drawing size for preview images at level miplevel */
static int preview_size(int miplevel)
{
@@ -977,7 +977,6 @@ void UI_icon_draw_preview(float x, float y, int icon_id, int nocreate)
void UI_icon_draw_aspect_blended(float x, float y, int icon_id, float aspect, int shade)
{
-
if(shade < 0) {
float r= (128+shade)/128.0f;
glPixelTransferf(GL_ALPHA_SCALE, r);