| 517 | } |
| 518 | |
| 519 | void RearrangeTabButtons(CUITabControl* pTab, xr_vector<Fvector2>& vec_sign_places) |
| 520 | { |
| 521 | TABS_VECTOR* btn_vec = pTab->GetButtonsVector(); |
| 522 | TABS_VECTOR::iterator it = btn_vec->begin(); |
| 523 | TABS_VECTOR::iterator it_e = btn_vec->end(); |
| 524 | vec_sign_places.clear(); |
| 525 | vec_sign_places.resize(btn_vec->size()); |
| 526 | |
| 527 | Fvector2 pos; |
| 528 | pos.set((*it)->GetWndPos()); |
| 529 | Fvector2 sign_sz; |
| 530 | sign_sz.set(9.0f + 3.0f, 11.0f); |
| 531 | u32 idx = 0; |
| 532 | float btn_text_len = 0.0f; |
| 533 | CUIStatic* st = NULL; |
| 534 | |
| 535 | for (; it != it_e; ++it, ++idx) |
| 536 | { |
| 537 | if (idx != 0) |
| 538 | { |
| 539 | st = xr_new<CUIStatic>(); |
| 540 | st->SetAutoDelete(true); |
| 541 | pTab->AttachChild(st); |
| 542 | st->SetFont((*it)->GetFont()); |
| 543 | st->SetTextColor(color_rgba(90, 90, 90, 255)); |
| 544 | st->SetText("//"); |
| 545 | st->SetWndSize((*it)->GetWndSize()); |
| 546 | st->AdjustWidthToText(); |
| 547 | st->SetWndPos(pos); |
| 548 | pos.x += st->GetWndSize().x; |
| 549 | } |
| 550 | |
| 551 | vec_sign_places[idx].set(pos); |
| 552 | vec_sign_places[idx].y += iFloor(((*it)->GetWndSize().y - sign_sz.y) / 2.0f); |
| 553 | vec_sign_places[idx].y = (float)iFloor(vec_sign_places[idx].y); |
| 554 | pos.x += sign_sz.x; |
| 555 | |
| 556 | (*it)->SetWndPos(pos); |
| 557 | (*it)->AdjustWidthToText(); |
| 558 | btn_text_len = (*it)->GetWndSize().x; |
| 559 | pos.x += btn_text_len + 3.0f; |
| 560 | } |
| 561 | } |
| 562 | bool CUIPdaWnd::OnKeyboard(int dik, EUIMessages keyboard_action) |
| 563 | { |
| 564 | if (WINDOW_KEY_PRESSED == keyboard_action && IsShown()) |
no test coverage detected