| 27 | } |
| 28 | |
| 29 | void CUICustomMap::Init(shared_str name, CInifile& gameLtx, LPCSTR sh_name) |
| 30 | { |
| 31 | m_name = name; |
| 32 | LPCSTR tex; |
| 33 | Fvector4 tmp; |
| 34 | if (gameLtx.line_exist(m_name, "texture")) |
| 35 | { |
| 36 | tex = gameLtx.r_string(m_name, "texture"); |
| 37 | tmp = gameLtx.r_fvector4(m_name, "bound_rect"); |
| 38 | } |
| 39 | else |
| 40 | { |
| 41 | tex = "ui\\ui_nomap2"; |
| 42 | tmp.set(-10000.0f, -10000.0f, 10000.0f, 10000.0f); |
| 43 | } |
| 44 | if (!Heading()) |
| 45 | { |
| 46 | tmp.x *= UI()->get_current_kx(); |
| 47 | tmp.z *= UI()->get_current_kx(); |
| 48 | } |
| 49 | m_BoundRect.set(tmp.x, tmp.y, tmp.z, tmp.w); |
| 50 | CUIStatic::InitEx(tex, sh_name, 0, 0, m_BoundRect.width(), m_BoundRect.height()); |
| 51 | |
| 52 | SetStretchTexture(true); |
| 53 | ClipperOn(); |
| 54 | |
| 55 | SetWindowName(m_name.c_str()); |
| 56 | } |
| 57 | |
| 58 | void RotateCoord(float x, float y, const float angle, float& x_, float& y_, float _kx) |
| 59 | { |
no test coverage detected