|
|
|
11-15-2018, 12:49 PM
|
#361
|
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
Quote:
Originally Posted by Lokasenna
Did you remember to include a call to the original methods inside both of yours? If you forget that, then the element literally doesn't know anymore what it's supposed to be doing.
|
I'm not sure, are these right? I just copy from where I declared them the first time. And "onmousedown" still worked but "ondrag" didn't
PS:I said the ondrag thing did not work, it meaned the slider was not only failed to run functionB, but also failed to drag the slider’s handle
Code:
function functionB()
some codes
end
function functionA()
some codes
GUI.New("mylider", "Slider", { --recreate the slider
z = 11,
x = 1096.0,
y = 5.0,
w = 106,
min=0,
max=newvalue, -- new value of max
defaults=0,
caption = "myslider",
font = 3,
col_txt = "txt",
--col_fill = "elm_frame",
show_values=false
})
function GUI.elms.myslider:onmousedown() --have to declare it again
GUI.Slider.onmousedown(self)
funntionB()
end
function GUI.elms.myslider:ondrag() --have to declare it again
GUI.Slider.ondrag(self)
functionB()
end
reaper.defer(functionA)
end
Last edited by dsyrock; 11-15-2018 at 06:19 PM.
|
|
|
11-17-2018, 10:08 PM
|
#362
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
How do I , oh how do I... not the song, but how do I call a function once the text is entered in the "Textbox" ?
|
|
|
11-17-2018, 11:46 PM
|
#363
|
Human being with feelings
Join Date: Feb 2017
Posts: 4,813
|
Maybe Check the events in textbox class? onSomething. I am not on computer so can't help.
|
|
|
11-18-2018, 05:07 AM
|
#364
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Thanks, I could see onmousedown() ondoubleclick() onupdate() ontype() onwheel() ondrag()
Code:
function GUI.elms.bar1_1:onmousedown()
reaper.SetEditCurPos(0.0, 0, 0)
reaper.Main_OnCommand(40616,0) --Markers: Edit region near cursor
end
to bring up Edit region near cursor.
I can't see how to get
red, green, blue = reaper.ColorFromNative(region_color)
in a frame background color
bg = ????,
..
|
|
|
11-18-2018, 09:35 AM
|
#365
|
Human being with feelings
Join Date: Feb 2017
Posts: 4,813
|
Quote:
Originally Posted by MusoBob
to bring up Edit region near cursor.
I can't see how to get
red, green, blue = reaper.ColorFromNative(region_color)
in a frame background color
bg = ????,
..
|
maybe better to ask in another thread, as more people will be able to reply : )
|
|
|
11-18-2018, 12:22 PM
|
#366
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
red, green, blue = reaper.ColorFromNative(region_color)
GUI.colors["region"] = {red, green, blue, 255}
GUI.New("frame_1", "Frame", {
z = 11,
x = x1+0.0,
y = y1+192.0,
w = 255,
h = 40,
shadow = false,
fill = false,
color = "elm_frame",
bg = "region",
round = 0,
text = "17",
txt_indent = 0,
txt_pad = 0,
pad = 1,
font = 4,
col_txt = "txt"
})
Last edited by MusoBob; 11-18-2018 at 03:30 PM.
|
|
|
11-18-2018, 04:35 PM
|
#367
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
I can update the textbox value
GUI.Val("bar1_1", chord_name)
I need to also to update the Frame bg color in the above post.
|
|
|
11-21-2018, 10:08 AM
|
#368
|
Human being with feelings
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
|
Thank you Lokasenna for this GUI library and tools!
I thought of trying to copy a specific keyswitch panel idea and with the help of the GUI Builder, the first step was really easy. But now that I have buttons in four columns like I want them, how could I go about changing the visibility of those columns depending on what buttons are pressed?
The idea is following: left column stays always visible/active, so it's on top of the hierarchy. The visibility/availability of any other columns to the right would then depend on what button was pressed on the previous column. In this example picture, there could be e.g. a column 5, but because of the choices made on previous columns, it's not available.
Another related question; how to highlight or frame the last pressed button on every column like in the mock-up above?
Any ideas appreciated, thanks.
---
edit: testing layer visibility management next...
Last edited by xpander; 11-22-2018 at 05:37 PM.
|
|
|
11-21-2018, 12:48 PM
|
#369
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
That's what I'm trying to do in the previous post, to update the frame.
You could have a frame behind the button that changes color.
This could also change with the on/off state if it's a Reaper toggle action
You can also use images and change them.
I think to update my buttons I had to add a ondelete so to delete the old button first.
This is show cue markers toggle:
Code:
function update_show_chords_in_items()
--Delete old buttons before updating
if reaper.GetToggleCommandState(40691) == 1 then onstate = "black" textstate = "red"
else
onstate = "gray" textstate = "yellow"
end
GUI.elms.show_chords_in_items_btn:ondelete()
GUI.New("show_chords_in_items_btn", "Button", 3, 275+x1, 180+y1, 135, 20, "Show Chords in Items", btn_click_show_chords_in_items)
GUI.elms.show_chords_in_items_btn.col_txt = textstate
GUI.elms.show_chords_in_items_btn.col_fill = onstate
GUI.elms.show_chords_in_items_btn:init()
end
if reaper.GetToggleCommandState(40691) == 1 then onstate = "black" textstate = "red"
else
onstate = "gray" textstate = "yellow"
end
Code:
function update_chord_buttons()
--Delete old buttons before updating
GUI.elms.lb_chords_on:ondelete()
GUI.elms.lb_key_chord:ondelete()
|
|
|
11-24-2018, 06:51 AM
|
#370
|
Human being with feelings
Join Date: Feb 2017
Posts: 4,813
|
I am away from PC. If nothing mentioning in frame class about border color, maybe you can layer a second layer of frame behind the other, with some more pixels on height and width, so that fill color can work as a border. Not sure, just a thought.
|
|
|
12-02-2018, 02:43 PM
|
#371
|
Human being with feelings
Join Date: Aug 2017
Posts: 336
|
When docked, and trying to resize the width, it crashes.
What can I do to prevent the script from crashing when resizing the width of the GUI (I've got mine in the Docker when this happens)?
Code:
Error: Reaper DAW Interface GUI.lua:1852: attempt to index a nil value (global 'gui')
Stack traceback:
Core.lua:70: in metamethod '__index'
Reaper DAW Interface GUI.lua:1852: in field 'func'
Core.lua:292: in function <C:\OneDriveTemp\OneDrive\Lokasenna_GUI v2\Library\Core.lua:280>
[C]: in function 'xpcall'
Core.lua:280: in function <C:\OneDriveTemp\OneDrive\Lokasenna_GUI v2\Library\Core.lua:279>
Lokasenna_GUI: (the file is not owned by any package entry)
Reaper: 5.962/x64
Platform: Win64
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
|
|
|
12-03-2018, 09:02 AM
|
#372
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Docking Lokasenna GUI?
Is it possible to dock a script made with Lokasenna GUI?
Cant do it on linux.....
Regards
TompaD
|
|
|
12-03-2018, 03:35 PM
|
#373
|
Human being with feelings
Join Date: Aug 2017
Posts: 336
|
Quote:
Originally Posted by tompad
Is it possible to dock a script made with Lokasenna GUI?
Cant do it on linux.....
Regards
TompaD
|
I'm not sure if this is the 'right' way to do it, but here's how I am docking it on start up for Windows 10 / 7:
Code:
local function Init()
reaper.Main_OnCommand(41172) -- Dock/undock currently focused window
end
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
Last edited by tXShooter; 12-03-2018 at 03:36 PM.
Reason: Typo
|
|
|
12-24-2018, 10:56 AM
|
#374
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by tXShooter
I'm not sure if this is the 'right' way to do it, but here's how I am docking it on start up for Windows 10 / 7:
Code:
local function Init()
reaper.Main_OnCommand(41172) -- Dock/undock currently focused window
end
|
This dont work for me - I am trying to make my window dockable by dragging it to a blue field, like a toolbar.
|
|
|
12-24-2018, 11:08 AM
|
#375
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,622
|
Keep in mind, the Linux version is still missing stuff. This might not work because it might not be implemented yet.
|
|
|
12-24-2018, 02:09 PM
|
#376
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by mespotine
Keep in mind, the Linux version is still missing stuff. This might not work because it might not be implemented yet.
|
Ok, I better take a break from this and focus on other script things. :-)
|
|
|
12-24-2018, 02:17 PM
|
#377
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Options in a matrix
Hi again!
Is this possible to do with Options?
I want a matrix with 4 x 4 options and when I click one
of the options all the others are not active(green).
Like this:
XXXX
XXOX
XXXX
XXXX
I started with making 4 columns with 4 options each, but every
column start with one option selected (green). I cant find a way
to disable the green dot in columns. Is it possible?
Merry Christmas
Tompad
|
|
|
12-24-2018, 02:22 PM
|
#378
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by mespotine
|
Oooh - I see Santa is coming!
Have to take a look at this for my ToDo-script!
Needed something to check if a project is closed or a new
one is started (to close my ToDo-script and save list).
|
|
|
12-25-2018, 07:51 AM
|
#379
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by tompad
Hi again!
Is this possible to do with Options?
I want a matrix with 4 x 4 options and when I click one
of the options all the others are not active(green).
Like this:
XXXX
XXOX
XXXX
XXXX
I started with making 4 columns with 4 options each, but every
column start with one option selected (green). I cant find a way
to disable the green dot in columns. Is it possible?
Merry Christmas
Tompad
|
Oh my! I never stop be amazed about my mind! Why do I need options??
I can do the same with a matrix of buttons! Sigh!
So buttons will it be!
|
|
|
12-25-2018, 02:32 PM
|
#380
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,622
|
Quote:
Originally Posted by tompad
Oooh - I see Santa is coming!
Have to take a look at this for my ToDo-script!
Needed something to check if a project is closed or a new
one is started (to close my ToDo-script and save list).
|
That's what I added that feature for
|
|
|
12-25-2018, 02:34 PM
|
#381
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,622
|
Feature Request.
Could you add an option for adding background-images, instead of a background-color?
Like, making wnd_bg -1, -1, -1, -1 and setting GUI.colors.wnd_bg_filename="filename" setting an image instead of the background-color.
I would also love to see a class for images. I tried to make my own, but couldn't get far, unfortunately...
|
|
|
01-02-2019, 04:36 PM
|
#382
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Certainly doable, and I have image functionality on my to-do list.
In the meantime one of the posts in my GUI tutorial (see my sig) covers how you would go about converting the existing classes to use images instead of drawing. It uses a really old version of the GUI though, so there would be a bit of work to adapt it.
|
|
|
01-02-2019, 04:41 PM
|
#383
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Highlights around buttons - I do this in Theory Helper... if memory serves, I modified the button class in that script so that if a certain property was true, it drew the highlight in its draw method.
Linux docking - It should work find AFAIK. You just can't right-click on window titlebars to dock them because Reaper has no access to the right-click menu on Linux.
|
|
|
01-03-2019, 12:28 PM
|
#384
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by Lokasenna
Linux docking - It should work find AFAIK. You just can't right-click on window titlebars to dock them because Reaper has no access to the right-click menu on Linux.
|
How do I do it? Nothing happens (no blue line)when dragging window in place.
|
|
|
01-04-2019, 12:43 PM
|
#385
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Ah, I see. Yeah, Linux handles windows differently so that's currently a problem. I imagine scripts should be able to dock windows using the API, but I never use docking for anything so I'm not sure.
|
|
|
01-05-2019, 01:22 PM
|
#386
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Hi, a crash report. I just run ReaLauncher for the fist time and got this:
Code:
Error: Class - Menubox.lua:141: bad argument #1 to 'floor' (number expected, got table)
Stack traceback:
Core.lua:87: in function <...am Scripts\Development\Lokasenna_GUI v2\Library\Core.lua:78>
[C]: in function 'math.floor'
Class - Menubox.lua:141: in function <...ent\Lokasenna_GUI v2\Library\Classes/Class - Menubox.lua:135>
(...tail calls...)
solger_ReaLauncher.lua:825: in function 'UpdatePathDisplayMode'
solger_ReaLauncher.lua:1157: in method 'onmousedown'
Class - Tabs.lua:202: in method 'ondrag'
Core.lua:871: in field 'Update'
Core.lua:434: in field 'Main_Update_Elms'
Core.lua:301: in function <...am Scripts\Development\Lokasenna_GUI v2\Library\Core.lua:297>
[C]: in function 'xpcall'
Core.lua:297: in function <...am Scripts\Development\Lokasenna_GUI v2\Library\Core.lua:296>
Lokasenna_GUI: v2.16.2
Reaper: 5.965
Platform: Win32
|
|
|
01-05-2019, 07:13 PM
|
#387
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Cheers. I'm guessing it's a ReaLauncher issue, but I'll keep an eye on that thread all the same.
|
|
|
01-06-2019, 04:08 AM
|
#388
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
Quote:
Originally Posted by bFooz
Hi, a crash report. I just run ReaLauncher for the fist time and got this:
|
Quote:
Originally Posted by Lokasenna
Cheers. I'm guessing it's a ReaLauncher issue, but I'll keep an eye on that thread all the same.
|
Yeah, that's a bug in the ReaLauncher code which can sometimes cause this error when switching between Tabs.
I'm already making some code changes for the next update, so this error should not be happening anymore in the next ReaLauncher version.
|
|
|
01-06-2019, 12:57 PM
|
#389
|
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
How to control widget via midi?
I'm looking through the API to see how to control something from incoming MIDI, and not finding anything. All the midi commands seem to relate to takes, not incoming midi.
I guess if FXparameters and reaper controls are being controlled by midi, you could poll them?
I should look at how LBXStripper does it, I guess....
|
|
|
01-06-2019, 03:02 PM
|
#390
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Not sure if LBXStripper has a different approach, as I'm a bit of a stranger to MIDI processing, but the best approach I've found is to have separate actions associated with your script that a user can bind to MIDI keys in the action list.
When one of the actions is run, it sets a variable in an ExtState or text file that your main script can periodically check, doing something when it sees that the variable has changed.
|
|
|
01-08-2019, 11:14 AM
|
#391
|
Human being with feelings
Join Date: Sep 2009
Location: Northern Lights
Posts: 743
|
Hi,
Is it possible to make a GUI for these simulators https://forum.cockos.com/showthread.php?t=215161 with your GUI Library? Would be awesome to learn it
Rock On!
__________________
OS: Manjaro KDE Plasma, Reaper For Linux (64Bit) native linux-vst plugins, LSP-Plugins, TpL-Plugins, Harrison's AVA & VST Plugins. Behringer U-PHORIA UMC22.
|
|
|
01-17-2019, 09:45 PM
|
#392
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
My GUI is unfortunately limited to Lua scripts, so no.
|
|
|
02-14-2019, 03:43 AM
|
#393
|
Human being with feelings
Join Date: Aug 2011
Posts: 517
|
Thank you for this Lokasenna! Works great!
Is there a way to update the contents of the GUI, based on what a funcion triggered by the script is doing?
I am tryin to add a button that allows the user to browse for a file on his HD, then i´d wnat to have the path of this file shown on the interface. Right now this only works after i have closed the script and opened it back again.
I am using: GUI.Val("Textbox1", path)
|
|
|
02-14-2019, 06:27 AM
|
#394
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Once you have the new path, GUI.Val("Textbox1", newPath) should do it.
If you put your script on Dropbox or something and post a link I'm happy to have a look.
|
|
|
02-19-2019, 03:38 PM
|
#395
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Dear GUI Librarians:
I'm in the planning stages of a huge rewrite for V3, so I'd love some feedback on what things you find awkward to do in V2, feature suggestions (I'm not promising anything though), changes to how the GUI is structured internally, etc.
There are also a few scripters out there that use a modified version of the GUI for their scripts. If that's you, please let me know what you've changed and why, so I can try to either incorporate your work or make it easier to customize without having to provide a dedicated copy of the GUI with your scripts.
Cheers.
|
|
|
02-20-2019, 02:51 AM
|
#396
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Hi, from a visual and usage point of view, I would remove shadows on button, tabs, lines etc.
The mouse cursour could change when hovered over text fields.
When you gab a fader by its handle, it doesn't jump.
Click over checkbox text toggles checkbox (this now works with radio buttons).
|
|
|
02-20-2019, 03:09 AM
|
#397
|
Human being with feelings
Join Date: Feb 2017
Posts: 305
|
Hi Lokasenna,
How about to do kind of blog or something on that while you'll rewrite one?
|
|
|
02-20-2019, 09:08 AM
|
#398
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Quote:
Originally Posted by bFooz
Hi, from a visual and usage point of view, I would remove shadows on button, tabs, lines etc.
...
|
Nice ideas, thanks.
Why no shadows, out of curiosity? I've always found them really useful.
|
|
|
02-20-2019, 09:23 AM
|
#399
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Me too, actually. But maybe an option to turn them on/off would do?
|
|
|
02-20-2019, 09:24 AM
|
#400
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Quote:
Originally Posted by Ivannn Bennnettt
Hi Lokasenna,
How about to do kind of blog or something on that while you'll rewrite one?
|
Since Loka has a very limited amount of time, I think this would be overkill.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:14 AM.
|