| 677 | } |
| 678 | |
| 679 | bool buttonUniqueIcon( |
| 680 | const std::string& iconName, |
| 681 | const Vector2f& iconSize, |
| 682 | const std::string& text, |
| 683 | const ImVec2& buttonSize, |
| 684 | int* value, |
| 685 | int ownValue, |
| 686 | bool textUnderIcon /*= true*/, |
| 687 | ImGuiKey key /*= ImGuiKey_None*/ ) |
| 688 | { |
| 689 | StyleParamHolder sh; |
| 690 | if ( *value == ownValue ) |
| 691 | { |
| 692 | sh.addColor( ImGuiCol_Text, Color::white() ); |
| 693 | sh.addColor( ImGuiCol_Button, ColorTheme::instance().getRibbonColor( ColorTheme::RibbonColorsType::SelectedObjectFrame ) ); |
| 694 | } |
| 695 | else |
| 696 | { |
| 697 | sh.addColor( ImGuiCol_Text, ColorTheme::getRibbonColor( ColorTheme::RibbonColorsType::Text ) ); |
| 698 | sh.addColor( ImGuiCol_Button, ColorTheme::getRibbonColor( ColorTheme::RibbonColorsType::BackgroundSecStyle ) ); |
| 699 | } |
| 700 | auto res = UI::buttonIconFlatBG( iconName, iconSize, text, buttonSize, textUnderIcon, key ) || checkKey( key ); |
| 701 | if ( res ) |
| 702 | value[0] = ownValue; |
| 703 | |
| 704 | return res; |
| 705 | } |
| 706 | |
| 707 | bool toggle( const char* label, bool* value ) |
| 708 | { |
nothing calls this directly
no test coverage detected