Hey atom,
is it possible to add the ability to get bigger pushbuttons on the virtual keyboard (uiMidiKeyboard). Maybe you can add a property that allows to adjust the aspectratio. the request is to be able to use the keyboard with the fingertip without zooming the hole panel.
i tried following script, it gets bigger until all keyboard buttons are visible.
and there is now option to resize buttons width/height.
--
-- Called when a modulator value changes
-- @mod http://ctrlr.org/api/class_ctrlr_modulator.html
-- @value new numeric value of the modulator
--
ResizeKeyboard = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
modName = mod:getProperty("name")
keyboardMod = panel : getModulatorByName ("dev_Keyboard")
keyboardComp = keyboardMod : getComponent()
--rectangleValue = keyboardComp:getProperty("componentRectangle")
--rectValueArray = mysplit(rectangleValue, " ")
--x = rectValueArray[1]
--y = rectValueArray[2]
--width = rectValueArray[3]
--height = rectValueArray[4]
--currentRect = Rectangle (x,y,width,height)
-- https://www.juce.com/doc/classRectangle
--currentRect = keyboardComp:getBounds()
--console (string.format("Keyboard size = %s",currentRect:toString()))
currentLuaBounds = keyboardComp:getLuaBounds()
console (string.format("Keyboard size = %s",currentLuaBounds:toString():__add("")))
deltaX = 5
deltaY = 0
if (modName == "dev_Keyboard_Bigger") then
currentLuaBounds : expand (deltaX, deltaY)
elseif (modName == "dev_Keyboard_Smaller") then
currentLuaBounds : reduce (deltaX, deltaY)
end
currentLuaBounds:setX(0)
console (string.format("new Keyboard size = %s",currentLuaBounds:toString():__add("")))
--keyboardComp:setProperty ("componentRectangle", currentLuaBounds, false)
keyboardComp:setLuaBounds (currentLuaBounds)
end
greetings
t0f4st
-
This topic was modified 7 years, 7 months ago by t0f4st.