No, it's a little more complicated than that.
I just became a Patreon supporter highest tier.
Can I send you a message there with more detailed code?
No, it's a little more complicated than that.
I just became a Patreon supporter highest tier.
Can I send you a message there with more detailed code?
I understand that... and it does.
But when I run your code, and click on the logo button, button 4 activates even if button 1 was activated before the logo button was pushed.
I want whatever button was active before to return to being active when the logo is pressed a 2nd time and the splash screen goes away.
Maybe a better way to explain this is I want to 'push' the state of the buttons onto a stack/array and then 'pop' their state after the splash screen goes away.
No.
I'll explain further...
The splash screen happens when the program loads.
AND
It happens when the logo button is clicked on.
When program first loads, I want button 1 to be active.
But when the logo button is clicked, I want whatever button was active to return to being active.
Thank you for the code... it is much simpler.
However, using this code leaves the last button activated instead of the first.
Any idea how I can have the first button be activated/highlighted and NOT switch to the last one?
//! pnlTab
const pnlTab = Content.getAllComponents("StylesPanel");
//! btnHideAll
const btnHideAll = Content.getComponent("SplashScreenTriggerButton");
btnHideAll.setControlCallback(onbtnHideAllControl);
inline function onbtnHideAllControl(component, value)
{
setTabVisibility();
}
//! btnTab
const btnTab = Content.getAllComponents("Rhythm_Button");
for (x in btnTab)
{
x.setControlCallback(onbtnTabControl);
}
inline function onbtnTabControl(component, value)
{
local index = btnTab.indexOf(component);
for (i = 0; i < btnTab.length; i++)
btnTab[i].setValue(index == i);
setTabVisibility();
}
//! Functions
inline function setTabVisibility()
{
for (i = 0; i < btnTab.length; i++)
{
pnlTab[i].showControl(btnTab[i].getValue() && !btnHideAll.getValue());
}
rhythmDisplayid.set("visible", !btnHideAll.getValue());
spashScreenNameID.set("visible", btnHideAll.getValue());
}
I have 4 panels controlled by 4 buttons... they work great. No issues.
However, I want to hide all 4 of the panels when I hit a 5th button which is not part of the 4 original buttons (for a logo screen)
In my custom callback I have the following code:
It hides the panels just fine, but will not restore the panels visibility when the logo goes away.
What am I doing wrong?
if (value)
{
for (i = 0; i < NUM_TABS; i++)
{
panels[i] = Content.getComponent("StylesPanel" + (i + 1));
buttons[i] = Content.getComponent("Rhythm_Button" + (i + 1));
values[i] = panels[i].get("visible");
for (l = 0; l < panels.length; l++)
{
panels[l].set("visible", false);
}
}
panels[NUM_TABS] = Content.getComponent("RhythmDisplayNumber");
panels[NUM_TABS].set("visible", false);
}
else
{
for (i = 0; i < NUM_TABS; i++)
{
if (buttons[i].getValue() == 1);
{
panels[i].set("visible", true);
}
}
panels[NUM_TABS] = Content.getComponent("RhythmDisplayNumber");
panels[NUM_TABS].set("visible", true);
}
Found the typo... fixed it...
Thanks for the video.
I've been watching your videos ever since I first found out about HISE (which was only a couple of weeks ago)
Funny thing is, looks like I've already watched that particular video.
I'll watch it more closely this time.
Thanks for all your help and rapid response.
BTW, also I really appreciate the work you've done with the instructional videos...
Great job!
All the very best to you!
L
Not sure I understand exactly what you mean.
Let me repeat it back to you and see if this is correct...
Set all panels off except for 1st one (the one I want to be active)
Put buttons into an array (not quite sure how to do this yet)
Set all buttons 'off' initially, but when a button is pressed, it is set to 'on' in the array.
Is that right?
Code Looks better but I get errors:
Interface:! AssignRhythmButtonsToPanels.js (10): Found 'return' when expecting ')' {SW50ZXJmYWNlfEFzc2lnblJoeXRobUJ1dHRvbnNUb1BhbmVscy5qc3wxODZ8MTB8MTM=}
Interface:! AssignRhythmButtonsToPanels.js (10): Found 'return' when expecting ')' {SW50ZXJmYWNlfEFzc2lnblJoeXRobUJ1dHRvbnNUb1BhbmVscy5qc3wxODZ8MTB8MTM=}
I'm all ears...
Please share how the getActiveRadioButton could be improved. I'm interested.
I'll check the save in preset settings.
I do want the buttons saved in preset, but I need to be able to set the button's states during init.
[edit]
Just tried toggling save in preset - makes no difference
I have the following code.
No matter what order I place the buttons and panels, panel 4 is always visible and the rest are invisible.
The buttons work just fine manually. But they don't initialize properly.
I want panel 1 to be visible and the rest to not be when the program loads... not after a button is pressed.
How can this be done?
const var Rhythm_Button4 = Content.getComponent("Rhythm_Button4");
const var Rhythm_Button3 = Content.getComponent("Rhythm_Button3");
const var Rhythm_Button2 = Content.getComponent("Rhythm_Button2");
const var Rhythm_Button1 = Content.getComponent("Rhythm_Button1");
const var StylesPanel4 = Content.getComponent("StylesPanel4");
const var StylesPanel3 = Content.getComponent("StylesPanel3");
const var StylesPanel2 = Content.getComponent("StylesPanel2");
const var StylesPanel1 = Content.getComponent("StylesPanel1");
const var RhythmDisplayNumber = Content.getComponent("RhythmDisplayNumber");
function getActiveRadioButton() {
if (Rhythm_Button4.getValue()) {
return "4";
}
else if (Rhythm_Button3.getValue()) {
return "3";
}
else if (Rhythm_Button2.getValue()) {
return "2";
}
else if (Rhythm_Button1.getValue()) {
return "1";
}
else {
return "1";
}
}
inline function onRhythm_Button4Control(component, value)
{
RhythmDisplayNumber.set("text", getActiveRadioButton());
StylesPanel1.set("visible", 0);
StylesPanel2.set("visible", 0);
StylesPanel3.set("visible", 0);
StylesPanel4.set("visible", 1);
};
Content.getComponent("Rhythm_Button4").setControlCallback(onRhythm_Button4Control);
inline function onRhythm_Button3Control(component, value)
{
RhythmDisplayNumber.set("text", getActiveRadioButton());
StylesPanel1.set("visible", 0);
StylesPanel2.set("visible", 0);
StylesPanel3.set("visible", 1);
StylesPanel4.set("visible", 0);
};
Content.getComponent("Rhythm_Button3").setControlCallback(onRhythm_Button3Control);
inline function onRhythm_Button2Control(component, value)
{
RhythmDisplayNumber.set("text", getActiveRadioButton());
StylesPanel1.set("visible", 0);
StylesPanel2.set("visible", 1);
StylesPanel3.set("visible", 0);
StylesPanel4.set("visible", 0);
};
Content.getComponent("Rhythm_Button2").setControlCallback(onRhythm_Button2Control);
inline function onRhythm_Button1Control(component, value)
{
RhythmDisplayNumber.set("text", getActiveRadioButton());
StylesPanel1.set("visible", 1);
StylesPanel2.set("visible", 0);
StylesPanel3.set("visible", 0);
StylesPanel4.set("visible", 0);
};
Content.getComponent("Rhythm_Button1").setControlCallback(onRhythm_Button1Control);
Thank you.
Where can I set "CONFIRM_PRESET_OVERWRITE" and "READ_ONLY_FACTORY_PRESETS"?
I don't see that in preferences.
Also, the reason for 3&4 is time and muscle memory. (for me, not product)
"Do you want to save this preset?"
"Do you want to overwrite the preset?"
"This will save the current XML file"
"Overwrite the existing XML?"
How can I get rid of these annoying confirmation boxes?
I'm willing to re-compile, but don't know where I can globally disable these.
Is there a technical reason why 4.0 will not work with Catalina?
Given it requires Big Sur, it basically means I can't run it on my laptop since Big Sur does not run on my laptop.
[EDIT]
Nevermind... I build my own version from source and it works fine on Catalina now.
Keep in mind, however the downloaded compiled version does NOT! You have to re-compile it to work with Catalina.
That makes sense. And thank you for taking the time to answer.
BTW, I just have to say, I am so totally impressed with your work.
HISE is an absolutely AMAZING tool!
Thank you for all your hard work on it.
Larry
I've been developing a new app using HISE.
I come from a musical audio and sample library development background but I do have some expertise in programming in various languages including C, Lua, HTML, CSS, PHP.
My question pertains to the new licensing changes announced for Juce 8.
Specifically it states:
*Products that provide JUCE as a service
You may not create, make available as a service, nor distribute software that creates software that contains JUCE. This encompasses all projects and products that provide the ability to generate plug-ins and standalone software that uses JUCE.
Please contact sales@juce.com for an alternative licence agreement if you want to provide products that generate software containing JUCE.*
Does this mean all the work I've been putting into HISE will be limited to Juce 7?
Or will I be able to continue developing in HISE for JUCE for versions 8 and above?
Thank you!