Skip to content

Commit

Permalink
- fixed #557
Browse files Browse the repository at this point in the history
- fixed #567
  • Loading branch information
christoph-hart committed Sep 30, 2024
1 parent c0c81bd commit 2057eb7
Show file tree
Hide file tree
Showing 7 changed files with 3,890 additions and 3,859 deletions.
2 changes: 1 addition & 1 deletion JUCE/modules/juce_gui_basics/menus/juce_PopupMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ struct MenuWindow : public Component
targetPoint = relativeTo->localPointToGlobal (targetPoint);

auto* display = Desktop::getInstance().getDisplays().getDisplayForPoint (targetPoint * scaleFactor);
auto parentArea = display->safeAreaInsets.subtractedFrom (display->totalArea);
auto parentArea = display->safeAreaInsets.subtractedFrom (display->userArea);

if (auto* pc = options.getParentComponent())
{
Expand Down
2 changes: 1 addition & 1 deletion currentGitHash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff009c8f612d68acd88f3f1852df1c818bcba47c
c0c81bd559dbdafcb535d28e404f35a7f4956311
2 changes: 1 addition & 1 deletion hi_backend/backend/currentGit.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define PREVIOUS_HISE_COMMIT "ff009c8f612d68acd88f3f1852df1c818bcba47c"
#define PREVIOUS_HISE_COMMIT "c0c81bd559dbdafcb535d28e404f35a7f4956311"
18 changes: 18 additions & 0 deletions hi_scripting/scripting/api/ScriptingApiObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2612,6 +2612,8 @@ struct ScriptingObjects::ScriptingModulator::Wrapper
API_METHOD_WRAPPER_0(ScriptingModulator, isBypassed);
API_VOID_METHOD_WRAPPER_1(ScriptingModulator, setIntensity);
API_METHOD_WRAPPER_0(ScriptingModulator, getIntensity);
API_VOID_METHOD_WRAPPER_1(ScriptingModulator, setIsBipolar);
API_METHOD_WRAPPER_0(ScriptingModulator, isBipolar);
API_METHOD_WRAPPER_0(ScriptingModulator, getCurrentLevel);
API_METHOD_WRAPPER_0(ScriptingModulator, exportState);
API_VOID_METHOD_WRAPPER_1(ScriptingModulator, restoreState);
Expand Down Expand Up @@ -2659,6 +2661,8 @@ moduleHandler(m_, dynamic_cast<JavascriptProcessor*>(p))
ADD_API_METHOD_0(isBypassed);
ADD_TYPED_API_METHOD_1(setIntensity, VarTypeChecker::Number);
ADD_API_METHOD_0(getIntensity);
ADD_TYPED_API_METHOD_1(setIsBipolar, VarTypeChecker::Number);
ADD_API_METHOD_0(isBipolar, VarTypeChecker::Number);
ADD_TYPED_API_METHOD_1(getAttribute, VarTypeChecker::Number);
ADD_TYPED_API_METHOD_1(getAttributeId, VarTypeChecker::Number);
ADD_TYPED_API_METHOD_1(getAttributeIndex, VarTypeChecker::String);
Expand Down Expand Up @@ -2771,6 +2775,20 @@ void ScriptingObjects::ScriptingModulator::setAttribute(int index, float value)
mod->setAttribute(index, value, ProcessorHelpers::getAttributeNotificationType());
}

void ScriptingObjects::ScriptingModulator::setIsBipolar(bool shouldBeBipolar)
{
if (checkValidObject())
dynamic_cast<Modulation*>(mod.get())->setIsBipolar(shouldBeBipolar);
}

bool ScriptingObjects::ScriptingModulator::isBipolar() const
{
if (checkValidObject())
return dynamic_cast<Modulation*>(mod.get())->isBipolar();

return false;
}

float ScriptingObjects::ScriptingModulator::getAttribute(int parameterIndex)
{
if (checkValidObject())
Expand Down
6 changes: 6 additions & 0 deletions hi_scripting/scripting/api/ScriptingApiObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,12 @@ namespace ScriptingObjects
/** Sets the attribute of the Modulator. You can look up the specific parameter indexes in the manual. */
void setAttribute(int index, float value);

/** Sets the modulator to a bipolar range (if applicable). */
void setIsBipolar(bool shouldBeBipolar);

/** Returns true if the modulator works in bipolar mode. */
bool isBipolar() const;

/** Returns the attribute with the given index. */
float getAttribute(int index);

Expand Down
7,717 changes: 3,862 additions & 3,855 deletions hi_scripting/scripting/api/XmlApi.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hi_scripting/scripting/api/XmlApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace XmlApi
{
extern const char* apivaluetree_dat;
const int apivaluetree_datSize = 297450;
const int apivaluetree_datSize = 297736;

}

Expand Down

0 comments on commit 2057eb7

Please sign in to comment.