Skip to content

Commit

Permalink
Addded mouse down to combobox and momentary buttons laf (#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhealey authored Jan 19, 2025
1 parent 24af3f6 commit badeed7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hi_scripting/scripting/api/ScriptingGraphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3980,7 +3980,7 @@ void ScriptingObjects::ScriptedLookAndFeel::Laf::drawToggleButton(Graphics &g_,
obj->setProperty("enabled", b.isEnabled());
obj->setProperty("text", b.getButtonText());
obj->setProperty("over", isMouseOverButton);
obj->setProperty("down", isButtonDown);
obj->setProperty("down", b.isMouseButtonDown(true));
obj->setProperty("value", b.getToggleState());

setColourOrBlack(obj, "bgColour", b, HiseColourScheme::ComponentOutlineColourId);
Expand Down Expand Up @@ -4152,6 +4152,7 @@ void ScriptingObjects::ScriptedLookAndFeel::Laf::drawComboBox(Graphics& g_, int
obj->setProperty("active", cb.getSelectedId() != 0);
obj->setProperty("enabled", cb.isEnabled() && cb.getNumItems() > 0);
obj->setProperty("hover", cb.isMouseOver(true) || cb.isMouseButtonDown(true) || cb.isPopupActive());
obj->setProperty("down", cb.isMouseButtonDown(true));

setColourOrBlack(obj, "bgColour", cb, HiseColourScheme::ComponentOutlineColourId);
setColourOrBlack(obj, "itemColour1", cb, HiseColourScheme::ComponentFillTopColourId);
Expand Down

0 comments on commit badeed7

Please sign in to comment.