Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff8aa9fcfb | |||
| e8bf23f987 |
@@ -444,8 +444,11 @@ int OnCalculate(const int rates_total,
|
||||
int TxtW(string s,int fs,bool bold)
|
||||
{
|
||||
TextSetFont(bold?"Consolas Bold":"Consolas",-fs*10);
|
||||
uint w=0,h=0; TextGetSize(s,w,h);
|
||||
return (int)w;
|
||||
uint w=0,h=0;
|
||||
bool ok=TextGetSize(s,w,h);
|
||||
int est=(int)MathCeil(StringLen(s)*fs*0.62); // fallback se TextGetSize non disponibile
|
||||
if(!ok || (int)w<=0) return est;
|
||||
return MathMax((int)w,est); // mai meno della stima
|
||||
}
|
||||
//+------------------------------------------------------------------+
|
||||
void DrawInfo()
|
||||
|
||||
Reference in New Issue
Block a user