| 825 | } |
| 826 | |
| 827 | void RibbonMenu::drawActiveListButton_( float btnSize ) |
| 828 | { |
| 829 | auto activeListIt = RibbonSchemaHolder::schema().items.find( "Active Plugins List" ); |
| 830 | if ( activeListIt != RibbonSchemaHolder::schema().items.end() ) |
| 831 | { |
| 832 | setActiveListPos( ImGui::GetCursorScreenPos() ); |
| 833 | CustomButtonParameters cParams; |
| 834 | cParams.iconType = RibbonIcons::IconType::RibbonItemIcon; |
| 835 | cParams.pushColorsCb = [] ( bool enabled, bool )->int |
| 836 | { |
| 837 | if ( !enabled ) |
| 838 | { |
| 839 | ImGui::PushStyleColor( ImGuiCol_Text, ColorTheme::getRibbonColor( ColorTheme::RibbonColorsType::TextDisabled ).getUInt32() ); |
| 840 | ImGui::PushStyleColor( ImGuiCol_Button, Color( 0, 0, 0, 0 ).getUInt32() ); |
| 841 | ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ColorTheme::getRibbonColor( ColorTheme::RibbonColorsType::ToolbarHovered ).getUInt32() ); |
| 842 | ImGui::PushStyleColor( ImGuiCol_ButtonActive, ColorTheme::getRibbonColor( ColorTheme::RibbonColorsType::ToolbarClicked ).getUInt32() ); |
| 843 | } |
| 844 | else |
| 845 | { |
| 846 | ImGui::PushStyleColor( ImGuiCol_Text, Color::white().getUInt32() ); |
| 847 | ImGui::PushStyleColor( ImGuiCol_Button, Color( 60, 169, 20, 255 ).getUInt32() ); |
| 848 | ImGui::PushStyleColor( ImGuiCol_ButtonHovered, Color( 60, 169, 20, 200 ).getUInt32() ); |
| 849 | ImGui::PushStyleColor( ImGuiCol_ButtonActive, Color( 60, 169, 20, 255 ).getUInt32() ); |
| 850 | } |
| 851 | return 4; |
| 852 | }; |
| 853 | const ImVec2 itemSize = { btnSize, btnSize }; |
| 854 | DrawButtonParams params{ DrawButtonParams::SizeType::Small, itemSize, cMiddleIconSize,DrawButtonParams::RootType::Toolbar }; |
| 855 | buttonDrawer_.drawCustomButtonItem( activeListIt->second, cParams, params ); |
| 856 | } |
| 857 | } |
| 858 | |
| 859 | |
| 860 | void RibbonMenu::drawActiveList_() |
nothing calls this directly
no test coverage detected