MCPcopy Create free account
hub / github.com/christophhart/HISE / checkContent

Method checkContent

hi_scripting/scripting/components/ScriptingEditor.cpp:171–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171void 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
189Button* ScriptingEditor::getSnippetButton(int i)
190{

Callers 1

refreshContentButtonMethod · 0.80

Calls 7

ColourFunction · 0.85
resizedFunction · 0.50
getContentHeightMethod · 0.45
setToggleStateMethod · 0.45
setColourMethod · 0.45
withAlphaMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected