| 169 | } |
| 170 | |
| 171 | void ScriptingEditor::checkContent() |
| 172 | { |
| 173 | const bool contentEmpty = scriptContent->getContentHeight() == 0; |
| 174 | |
| 175 | if(contentEmpty) contentButton->setToggleState(false, dontSendNotification); |
| 176 | |
| 177 | Button *t = contentButton; |
| 178 | |
| 179 | t->setColour(TextButton::buttonColourId, !contentEmpty ? Colour (0x77cccccc) : Colour (0x4c4b4b4b)); |
| 180 | t->setColour (TextButton::buttonOnColourId, Colours::white.withAlpha(0.7f)); |
| 181 | t->setColour (TextButton::textColourOnId, Colour (0xaa000000)); |
| 182 | t->setColour (TextButton::textColourOffId, Colour (0x99ffffff)); |
| 183 | |
| 184 | contentButton->setEnabled(!contentEmpty); |
| 185 | |
| 186 | resized(); |
| 187 | } |
| 188 | |
| 189 | Button* ScriptingEditor::getSnippetButton(int i) |
| 190 | { |
no test coverage detected