diff options
author | Rob Haarsma <phaseIV@zonnet.nl> | 2005-01-21 17:48:03 +0300 |
---|---|---|
committer | Rob Haarsma <phaseIV@zonnet.nl> | 2005-01-21 17:48:03 +0300 |
commit | 136ecd46442d5cb95c7f546e5a401d5df458a2f9 (patch) | |
tree | d837c5ca98abc7ff6844749aa2c2e2760b2d78b8 /source/blender/src | |
parent | 465b15eb695ef96534b008199fa90af0936febde (diff) |
Modified interface texture font support, which should work nicely with the freshly added bFTGL library.
Also removed some redundant #include's on some files.
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/header_action.c | 6 | ||||
-rw-r--r-- | source/blender/src/header_buttonswin.c | 6 | ||||
-rw-r--r-- | source/blender/src/header_filesel.c | 6 | ||||
-rw-r--r-- | source/blender/src/header_image.c | 6 | ||||
-rw-r--r-- | source/blender/src/header_info.c | 8 | ||||
-rw-r--r-- | source/blender/src/header_ipo.c | 6 | ||||
-rw-r--r-- | source/blender/src/header_nla.c | 6 | ||||
-rw-r--r-- | source/blender/src/header_script.c | 6 | ||||
-rw-r--r-- | source/blender/src/headerbuttons.c | 23 | ||||
-rw-r--r-- | source/blender/src/interface.c | 9 | ||||
-rw-r--r-- | source/blender/src/interface_draw.c | 1 | ||||
-rw-r--r-- | source/blender/src/language.c | 8 | ||||
-rw-r--r-- | source/blender/src/space.c | 9 |
13 files changed, 16 insertions, 84 deletions
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 2d86f7a44e2..4dbe00ad0d8 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -47,12 +47,6 @@ #include "BLI_winstuff.h" #endif -#include "BMF_Api.h" -#include "BIF_language.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "DNA_ID.h" #include "DNA_action_types.h" #include "DNA_ipo_types.h" diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c index d0375a0163e..0186683df31 100644 --- a/source/blender/src/header_buttonswin.c +++ b/source/blender/src/header_buttonswin.c @@ -46,12 +46,6 @@ #include "BLI_winstuff.h" #endif -#include "BMF_Api.h" -#include "BIF_language.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "DNA_ID.h" #include "DNA_armature_types.h" #include "DNA_lamp_types.h" diff --git a/source/blender/src/header_filesel.c b/source/blender/src/header_filesel.c index 42f3b931ecf..5177770d5c2 100644 --- a/source/blender/src/header_filesel.c +++ b/source/blender/src/header_filesel.c @@ -47,12 +47,6 @@ #include "BLI_winstuff.h" #endif -#include "BMF_Api.h" -#include "BIF_language.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "DNA_ID.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c index 2987ca7e53f..80f8ea4121f 100644 --- a/source/blender/src/header_image.c +++ b/source/blender/src/header_image.c @@ -46,12 +46,6 @@ #include "BLI_winstuff.h" #endif -#include "BMF_Api.h" -#include "BIF_language.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "DNA_ID.h" #include "DNA_image_types.h" #include "DNA_mesh_types.h" diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c index f1ec2bbe27a..6c98fa0b5be 100644 --- a/source/blender/src/header_info.c +++ b/source/blender/src/header_info.c @@ -47,12 +47,6 @@ #include "BLI_winstuff.h" #endif -#include "BMF_Api.h" -#include "BIF_language.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "DNA_ID.h" #include "DNA_image_types.h" #include "DNA_lamp_types.h" @@ -112,6 +106,7 @@ #include "BPY_menus.h" #include "blendef.h" +#include "interface.h" #include "mydevice.h" extern char versionstr[]; /* from blender.c */ @@ -1910,6 +1905,7 @@ void info_buttons(void) } else xco= 430; +BIF_SetScale(block->aspect); info_text(xco+24, 6); uiBlockSetEmboss(block, UI_EMBOSSN); diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c index 0b9fa56281b..0e5210e668c 100644 --- a/source/blender/src/header_ipo.c +++ b/source/blender/src/header_ipo.c @@ -47,12 +47,6 @@ #include "BLI_winstuff.h" #endif -#include "BMF_Api.h" -#include "BIF_language.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "DNA_ID.h" #include "DNA_curve_types.h" #include "DNA_key_types.h" diff --git a/source/blender/src/header_nla.c b/source/blender/src/header_nla.c index 1e821a14271..5747ac77fc7 100644 --- a/source/blender/src/header_nla.c +++ b/source/blender/src/header_nla.c @@ -47,12 +47,6 @@ #include "BLI_winstuff.h" #endif -#include "BMF_Api.h" -#include "BIF_language.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "DNA_ID.h" #include "DNA_nla_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/src/header_script.c b/source/blender/src/header_script.c index 7a6b04e320c..27755aafd21 100644 --- a/source/blender/src/header_script.c +++ b/source/blender/src/header_script.c @@ -47,12 +47,6 @@ #include "BLI_blenlib.h" -#include "BMF_Api.h" -#include "BIF_language.h" -#ifdef INTERNATIONAL -#include "FTF_Api.h" -#endif - #include "BSE_headerbuttons.h" #include "DNA_ID.h" diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c index 68194e25d8a..73f0504ef1c 100644 --- a/source/blender/src/headerbuttons.c +++ b/source/blender/src/headerbuttons.c @@ -173,6 +173,7 @@ #include "mydevice.h" #include "blendef.h" +#include "interface.h" #include "nla.h" /* __NLA : To be removed later */ #include "butspace.h" // test_idbutton @@ -1585,16 +1586,9 @@ void do_global_buttons(unsigned short event) break; case B_RESTOREFONT: /* is button from space.c *info* */ - { - extern float lang_texsize; - - lang_texsize = 1.0; - FTF_SetScale(lang_texsize); - - U.fontsize= 0; - start_interface_font(); - allqueue(REDRAWALL, 0); - } + U.fontsize= 0; + start_interface_font(); + allqueue(REDRAWALL, 0); break; case B_USETEXTUREFONT: /* is button from space.c *info* */ @@ -1607,15 +1601,6 @@ void do_global_buttons(unsigned short event) allqueue(REDRAWALL, 0); break; - case B_SCALETEXTUREFONT: /* is button from space.c *info* */ - { - extern float lang_texsize; - - FTF_SetScale(lang_texsize); - allqueue(REDRAWALL, 0); - } - break; - case B_DOLANGUIFONT: /* is button from space.c *info* */ if(U.transopts & USER_DOTRANSLATE) start_interface_font(); diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index 4a08b6ee983..df60ea61a38 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -3452,10 +3452,7 @@ static uiOverDraw *ui_draw_but_tip(uiBut *but) uiOverDraw *od; float x1, x2, y1, y2; - #ifdef INTERNATIONAL - extern float lang_texsize; - if(G.ui_international == TRUE) { float llx,lly,llz,urx,ury,urz; //for FTF_GetBoundingBox() @@ -3464,15 +3461,11 @@ static uiOverDraw *ui_draw_but_tip(uiBut *but) x1= (but->x1+but->x2)/2; x2= 10+x1+ but->aspect*FTF_GetStringWidth(but->tip, FTF_USE_GETTEXT | FTF_INPUT_UTF8); //BMF_GetStringWidth(but->font, but->tip); y1= but->y1-(ury+FTF_GetSize())-12; y2= but->y1-12; - y1 *= lang_texsize; - y2 *= lang_texsize; } else { FTF_GetBoundingBox(but->tip, &llx,&lly,&llz,&urx,&ury,&urz, FTF_NO_TRANSCONV | FTF_INPUT_UTF8); x1= (but->x1+but->x2)/2; x2= 10+x1+ but->aspect*FTF_GetStringWidth(but->tip, FTF_NO_TRANSCONV | FTF_INPUT_UTF8); //BMF_GetStringWidth(but->font, but->tip); y1= but->y1-(ury+FTF_GetSize())-12; y2= but->y1-12; - y1 *= lang_texsize; - y2 *= lang_texsize; } } else { x1= (but->x1+but->x2)/2; x2= 10+x1+ but->aspect*BMF_GetStringWidth(but->font, but->tip); @@ -3528,6 +3521,8 @@ static uiOverDraw *ui_draw_but_tip(uiBut *but) glColor3ub(0,0,0); ui_rasterpos_safe( x1+3, y1+5.0/but->aspect, but->aspect); + BIF_SetScale(1.0); + BIF_DrawString(but->font, but->tip, (U.transopts & USER_TR_TOOLTIPS)); ui_flush_overdraw(od); /* to show it in the frontbuffer */ diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index b6bb28fbf66..f420a903de0 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -117,6 +117,7 @@ void ui_rasterpos_safe(float x, float y, float aspect) if(doit) glRasterPos2f(x, y); BIF_RasterPos(x, y); + BIF_SetScale(aspect); } /* ************** generic embossed rect, for window sliders etc ************* */ diff --git a/source/blender/src/language.c b/source/blender/src/language.c index 8f9c476a142..750483bf789 100644 --- a/source/blender/src/language.c +++ b/source/blender/src/language.c @@ -71,7 +71,6 @@ struct _LANGMenuEntry { static LANGMenuEntry *langmenu= 0; static int tot_lang = 0; -float lang_texsize = 1.0; #endif // INTERNATIONAL @@ -82,6 +81,13 @@ void BIF_RasterPos(float x, float y) #endif // INTERNATIONAL } +void BIF_SetScale(float aspect) +{ +#ifdef INTERNATIONAL + FTF_SetScale(aspect); +#endif // INTERNATIONAL +} + void refresh_interface_font(void) { #ifdef INTERNATIONAL diff --git a/source/blender/src/space.c b/source/blender/src/space.c index cd8951a5691..6663b4b63df 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2542,15 +2542,6 @@ void drawinfospace(ScrArea *sa, void *spacedata) (xpos+edgsp+(4*mpref)+(4*midsp)),y2,mpref,buth, &(U.transopts), 0, 0, 0, 0, "Use Textured Fonts"); - - if(U.transopts & USER_USETEXTUREFONT) { - extern float lang_texsize; - - uiDefButF(block, NUM, B_SCALETEXTUREFONT, "Scale Factor", - (xpos+edgsp+(4*mpref)+(4*midsp)),y1,mpref,buth, - &lang_texsize, 0.2, 2.0, 100, 2, "Tweak scaling for textured font"); - } - } /* end of INTERNATIONAL */ |