Code: Select all
double SXf(double val) {
double rapport=(double)device->getVideoDriver()->getScreenSize().Width*(double)val;
return (double)(rapport/(double)800.0);
}
double SYf(double val) {
double rapport=(double)device->getVideoDriver()->getScreenSize().Height*(double)val;
return (double)(rapport/(double)600.0);
}
void IniText() {
//icon position
//WORK!!!
life_icon_position.X=SX(11);
life_icon_position.Y=SY(450);
//end of icon position
//progress bars
//DON'T WORK!!!
life_progress_bar_pos.X=SXf(-3.85);
life_progress_bar_pos.Y=SYf(-1.745);
life_progress_bar_pos.Z=0;