Old 06-14-2022, 03:36 PM   #521
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by McSound View Post
So, the only gui which could display text in full unicode is gfx functions?
Yeah, for now only gfx can render cyrillic out of the box (except on Linux, I think).

Quote:
Originally Posted by McSound View Post
And another question: what if I use these custom glyphs and make my cirillic symbols of them with that utility? I know, it' absurd, but just in theory, could it work that way?
You could create a custom font (eg. using a free software like FontForge) having the cyrillic symbols shifted into the Basic Latin or Latin Supplement range. That would work (but really hacky for something that ought to be fixed in ReaImGui).
cfillion is offline   Reply With Quote
Old 06-14-2022, 09:41 PM   #522
McSound
Human being with feelings
 
McSound's Avatar
 
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 280
Default

Very well! Who could know how much it takes to wait for the fix, I don't know, after your words it doesn't seem to me so absurd after all Anyway thanks cfillion for this valuable info and great ReaImGUI!

Last edited by McSound; 06-14-2022 at 09:47 PM.
McSound is offline   Reply With Quote
Old 06-19-2022, 12:36 AM   #523
odedd
Human being with feelings
 
Join Date: Dec 2019
Posts: 193
Default

Hi.

I've been playing around with this library and it's amazing! Thank you very much for the port to ReaScript.

I'm trying to build a routing-matrix-like interface, which requires rendering a text at 90 degrees counterclockwise in the header row (just like in the reaper routing matrix).
From what I could gather it's impossible natively but there's a workaround that I don't really understand.

Can anybody help me please?

Thank you very much!
odedd is offline   Reply With Quote
Old 06-20-2022, 01:54 AM   #524
odedd
Human being with feelings
 
Join Date: Dec 2019
Posts: 193
Default

I looked into it some more, and it seems that vertical text is indeed possible, but requires some custom C++ code, which is way beyond my scope of understanding.

This comment sums up all the different solutions possible, and has five different code snippets at the bottom that could make rotating text possible.

Is it even possible to implement such code in ReaImGui?
odedd is offline   Reply With Quote
Old 06-21-2022, 01:26 PM   #525
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by odedd View Post
Is it even possible to implement such code in ReaImGui?
Not possible without access to lower-level APIs not exposed in ReaImGui. However maybe it could be simulated using a custom font with rotated glyphs backed-in?
cfillion is offline   Reply With Quote
Old 06-21-2022, 07:14 PM   #526
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

ReaImGui 0.7

This release adds window transparency and backward-compatibility shims for Lua. Many thanks to Justin for making some of these features and fixes possible!

Code:
• Add backward-compatibility script imgui.lua
• Fix broken mouse inputs after destroying a window while a mouse button is down
• Implement window transparency (requires REAPER v6.55+ on Linux)
• Increase maximum object allocation limit to 1000
• Linux: harden v0.6's improved mouse and keyboard input (now requires REAPER v6.57+)
• Optimize object pointer validation (about 2x faster)
• Patch dear imgui to enable background alpha and corner rounding for top-level windows
• Update dear imgui to v1.88 (release notes)

API changes:
• Add ColorConvert{Double4ToU32,U32ToDouble4}
• Add DebugTextEncoding
• Add GetWindowViewport
• Add HoveredFlags_NoNavOverride
• Add ShowDebugLogWindow
• Combo and ListBox: use null bytes for delimiting items as in vanilla dear imgui (now requires REAPER 6.44+ in Lua and EEL, t=261079)
• Distinguish between empty and nil optional strings in Lua on REAPER 6.58+ [t=266405]
• Expose additional context settings via {Get,Set}ConfigVar
• Nerf ColorConvert{RGBtoHSV,HSVtoRGB}'s packed integer return value and optional alpha argument [t=266396]
• Python: unexpose output-only values from the argument list
• Python: unexpose unsafe buffer size arguments
• Rename CaptureKeyboardFromApp to SetNextFrameWantCaptureKeyboard
• Rename KeyModFlags_* constants to ModFlags_*
• Reorder GetVersion's return values and add IMGUI_VERSION_NUM
• Replace {Get,Set}ConfigFlags with {Get,Set}ConfigVar(ConfigVar_Flags)
Window transparency

Col_WindowBg with alpha less than 100%, WindowFlags_NoBackground and StyleVar_WindowRounding now take effect for all windows.

REAPER v6.55+ and a compositing window manager are required on Linux for enabling the alpha channel.

Backward-compatibility shims

Lua scripts can request a specific version of ReaImGui's API by including imgui.lua:

Code:
dofile(reaper.GetResourcePath() .. '/Scripts/ReaTeam Extensions/API/imgui.lua')
  ('X.Y.Z') -- latest version the script is written for
Shims are provided for adding compatibility with existing scripts written for 0.6.x:

Code:
dofile(reaper.GetResourcePath() .. '/Scripts/ReaTeam Extensions/API/imgui.lua')
  ('0.6')
cfillion is offline   Reply With Quote
Old 06-23-2022, 12:19 AM   #527
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default Script help

Hello,

I have a couple of questions, and perhaps a script request.

While playing around with the various slider/drag types I noticed that you can set a "step" amount or rather what is refered to as 'v_speed' when using the DragDouble, however I don't see a way to set a step size when using SliderDouble.
Is this possible, for examp; to have the slider send values in pre-defined increments such as 0.0125 or whatever, if not could this please be considered as a feature request?

Next question, say I have six or so buttons and I would like only the most recently clicked to be highlighted and any previously clicked should go back to its original color, in other words, only one of the six buttons should be highlighted at a time. Is it possible? An example would be super helpful.


Now, the script request. I know how to write very basic lua code and can usually follow others code pretty well, however somethings are just outside of my current understanding, hence the request.

I would like a UI with 2 buttons. Btn1 that when clicked would cause a variable to ramp up from a user defined start value to a defined end value using a defined step size and time values as well. Btn2 when clicked would do a ramp down instead. Some other functionality I would love is a pause button that can continue from where it was paused when clicked a second time.
Maybe a radio button that would have options of ('single-shot', 'loop up or down', and 'loop up then back down'), with a linked input field to set the number of times to loop.

One other thing, not quite as important, but would be awesome is a slider that would adjust the ramp to be more like a curve which would allow for either a 'start fast end slow' or 'start slow end fast' type of functioning.

So this thing would be sort of like a very basic LFO. One other important thing to mention is that the variable's value isn't necessarily in the 0.0-1.0 range, it might, for example be in the range of 1.0-100.0, it really just depends on what the user sets as start/end values.

TIA to anyone whom can help with parts or even all of this.
JackOrez is offline   Reply With Quote
Old 06-23-2022, 12:51 AM   #528
nikolalkc
Human being with feelings
 
nikolalkc's Avatar
 
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 338
Default

Quote:
Originally Posted by cfillion View Post
ReaImGui 0.7

This release adds window transparency and backward-compatibility shims for Lua.
Thank you for making and maintaining this extension. This is a great update.
__________________
Youtube | Website | Twitter
nikolalkc is offline   Reply With Quote
Old 06-23-2022, 09:36 AM   #529
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Jackores I think you should do smaller questions

But to answer the button question.

About buttons: the easiest way to do what you want with normal buttons is to set the colors per button and have stored which is the latest button pressed. Then using a highlighted color in that button.
daniellumertz is offline   Reply With Quote
Old 06-28-2022, 10:25 PM   #530
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default

@daniellumertz

Thank you for the tip, hopefuly I can figure it out.
I suspect the "Highlight Last Loaded Snapshot" feature of your Track Snapshot script may hold the key?

Speaking of which, I made a couple of little mods to your script.
See this post.
https://forums.cockos.com/showpost.p...&postcount=129
JackOrez is offline   Reply With Quote
Old 06-28-2022, 11:54 PM   #531
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default

You know how in the imGUI demo there is the ability to attach windows to each other?
What I'm wondering is, can this be done with two individual scripts that are running, or do they need to be part of the same script?

JackOrez is offline   Reply With Quote
Old 06-29-2022, 12:42 AM   #532
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by JackOrez View Post
You know how in the imGUI demo there is the ability to attach windows to each other?
What I'm wondering is, can this be done with two individual scripts that are running, or do they need to be part of the same script?
They need to be part of the same script (same ReaImGui context to be specific).
cfillion is offline   Reply With Quote
Old 07-03-2022, 08:10 PM   #533
nvk
Human being with feelings
 
nvk's Avatar
 
Join Date: Jul 2019
Posts: 156
Default

I started using this for the first time last week, and just want to say it's been an absolute joy. Making UI in ReaScript was always such a chore, and this has honestly reinvigorated scripting for me.

One random issue I've been having, and I was curious if anyone knows a good way to do this, is with ImGui_DragInt.

Code:
channelNames = {'Mono', 'Stereo'}
rv, channels = r.ImGui_DragInt(ctx, 'Channels', channels, 0.05, 1, 8, channelNames[channels] or '%d')
The behavior I'm hoping for is that when I have a number of channels that corresponds to an entry in the table channelNames, it will display that name instead of the integer. This does work, but the only issue is that when I input the number manually instead of using the slider it doesn't accept the input anymore even though it's an integer.
nvk is offline   Reply With Quote
Old 07-03-2022, 08:39 PM   #534
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

That is a odd behavior, reproduced here.
It seems it only work if in some part of the name it have the integer like

Code:
rv, channels = r.ImGui_DragInt(ctx, 'Channels', channels, 0.05, 1, 8, channelNames[channels]..'%d')
Will return Mono1 Stereo2 3 4 5 6 7 8
I know its now what you are looking for, just pointing out, maybe it is a bug?
daniellumertz is offline   Reply With Quote
Old 07-03-2022, 09:01 PM   #535
nvk
Human being with feelings
 
nvk's Avatar
 
Join Date: Jul 2019
Posts: 156
Default

Quote:
Originally Posted by daniellumertz View Post
That is a odd behavior, reproduced here.
It seems it only work if in some part of the name it have the integer like

Code:
rv, channels = r.ImGui_DragInt(ctx, 'Channels', channels, 0.05, 1, 8, channelNames[channels]..'%d')
Will return Mono1 Stereo2 3 4 5 6 7 8
I know its now what you are looking for, just pointing out, maybe it is a bug?

Interesting, that's good to know and could perhaps point to what's causing the problem!
nvk is offline   Reply With Quote
Old 07-03-2022, 09:14 PM   #536
nvk
Human being with feelings
 
nvk's Avatar
 
Join Date: Jul 2019
Posts: 156
Default

Another thing I was wondering about is the re-ordering of tab items. From what I've read online, it seems like this order of tabs is supposed to be saved in the ini file, but in my tests that doesn't seem to be the case. I'm also not sure of a way to query the current order of the tabs so I could save the order myself.
nvk is offline   Reply With Quote
Old 07-04-2022, 04:30 PM   #537
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Regular tabbars don't have persistent storage and the public API doesn't include a way to get the tab order either. Might be a good feature request for dear imgui though.

Last edited by cfillion; 07-04-2022 at 04:36 PM.
cfillion is offline   Reply With Quote
Old 07-05-2022, 01:56 PM   #538
nvk
Human being with feelings
 
nvk's Avatar
 
Join Date: Jul 2019
Posts: 156
Default

Quote:
Originally Posted by cfillion View Post
Regular tabbars don't have persistent storage and the public API doesn't include a way to get the tab order either. Might be a good feature request for dear imgui though.
Oh good to know, thanks for the info!
nvk is offline   Reply With Quote
Old 07-06-2022, 04:57 PM   #539
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default

@cfillion,

I had this question from a previous post and was wondering if you could provide an answer?

While playing around with the various slider/drag types I noticed that you can set a "step" amount or rather what is refered to as 'v_speed' when using the DragDouble, however I don't see a way to set a step size when using SliderDouble.
Is this possible, for examp; to have the slider send values in pre-defined increments such as 0.0125 or whatever, if not could this please be considered as a feature request?

Thank you

Last edited by JackOrez; 07-06-2022 at 05:30 PM.
JackOrez is offline   Reply With Quote
Old 07-06-2022, 05:04 PM   #540
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default Bug?

@cfillion,

I'm using a dual monitor setup and any time I move a ReaImGui script window to the 2nd display it becomes locked there and can not be moved at all. In order to regain control I have to exit the script and remove the entry in that .ini file that keeps track of all ReaImGui windows.
Is this a bug, or is there something on my end that I can change to fix this?

Last edited by JackOrez; 07-06-2022 at 05:11 PM.
JackOrez is offline   Reply With Quote
Old 07-06-2022, 05:10 PM   #541
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default

Regarding the recent addition of alpha trans., Any script that uses the default style seems to have a little bit of alpha already applied. Which file and line would I need to change to prevent this?
JackOrez is offline   Reply With Quote
Old 07-06-2022, 05:58 PM   #542
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by JackOrez View Post
While playing around with the various slider/drag types I noticed that you can set a "step" amount or rather what is refered to as 'v_speed' when using the DragDouble, however I don't see a way to set a step size when using SliderDouble.
Is this possible, for examp; to have the slider send values in pre-defined increments such as 0.0125 or whatever, if not could this please be considered as a feature request?
Dear ImGui's sliders don't support steps, but instead you can snap the value (or do a custom slider):
Code:
local function SteppedSliderDouble(ctx, label, value, v_min, v_max, step, format, flags)
  local changed, value = reaper.ImGui_SliderDouble(ctx, label, value, v_min, v_max, format, flags)
  if changed then
    value = math.floor((value / step) + 0.5) * step
  end
  return changed, value
end

local ctx = reaper.ImGui_CreateContext('Test')
local function loop()
  changed, value = SteppedSliderDouble(ctx, 'test', value or 0, 0, 1, 0.125)
  reaper.defer(loop)
end
reaper.defer(loop)
Quote:
Originally Posted by JackOrez View Post
I'm using a dual monitor setup and any time I move a ReaImGui script window to the 2nd display it becomes locked there and can not be moved at all. In order to regain control I have to exit the script and remove the entry in that .ini file that keeps track of all ReaImGui windows.
Is this a bug, or is there something on my end that I can change to fix this?
Sounds like one. Is the second monitor set to a different DPI setting than the first? What's their layout and which OS?

Quote:
Originally Posted by JackOrez View Post
Regarding the recent addition of alpha trans., Any script that uses the default style seems to have a little bit of alpha already applied. Which file and line would I need to change to prevent this?
Code:
-- default background is 0x0F0F0FF0 (alpha = 240)
reaper.ImGui_PushStyleColor(ctx, reaper.ImGui_Col_WindowBg(), 0x0F0F0FFF)

-- windows with opaque background here

reaper.ImGui_PopStyleColor(ctx)
cfillion is offline   Reply With Quote
Old 07-06-2022, 09:17 PM   #543
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default

Thank you so much for the assistance.

As for the monitor issue, not at my computer right now so I can't check dpi.
It is a Win10 system and the monitors are setup in combined mode so that they share one large work space.
If you need any other info just let me know.
JackOrez is offline   Reply With Quote
Old 07-07-2022, 03:25 AM   #544
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default

Quote:
Originally Posted by cfillion View Post
Dear ImGui's sliders don't support steps, but instead you can snap the value (or do a custom slider):
So I tried that code, and at first I thought it was'nt working correctly, then I happened to notice that it snaps to the correct value only when the mouse button is released. You mention in the above quote "(or do a custom slider)". Does that mean there is another way other than the code you posted, and if so would that display the step values while dragging as opposed to only on release?

Thank you
JackOrez is offline   Reply With Quote
Old 07-07-2022, 03:37 AM   #545
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default Another strange bug

I noticed another strange bug, I've tried various things to see if I could reproduce but it seems almost random?

Sometimes when launching a script the window will appear as though it's in a collapsed to titlebar state, however if you click the arrow button to unroll, nothing happens, so you have to actually drag the bottom corner and resize.
JackOrez is offline   Reply With Quote
Old 07-07-2022, 04:05 AM   #546
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by JackOrez View Post
So I tried that code, and at first I thought it was'nt working correctly, then I happened to notice that it snaps to the correct value only when the mouse button is released. You mention in the above quote "(or do a custom slider)". Does that mean there is another way other than the code you posted, and if so would that display the step values while dragging as opposed to only on release?

Thank you
I think 'do a custom slider' means create a class using the low level draw functions. There is a post in this thread where they shared a custom knob if you search you could use to try to understand drawing in Imgui

EDIT: Post #157
https://forum.cockos.com/showpost.ph...&postcount=157
daniellumertz is offline   Reply With Quote
Old 07-07-2022, 07:05 AM   #547
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default

Quote:
Originally Posted by daniellumertz View Post
I think 'do a custom slider' means create a class using the low level draw functions. There is a post in this thread where they shared a custom knob if you search you could use to try to understand drawing in Imgui

EDIT: Post #157
https://forum.cockos.com/showpost.ph...&postcount=157
Thats what I figured, un​for​tu​nate​ly I wouldn't even know where to begin as far as a slider is concerned.

Thank you for that link though, it might come in handy someday if I ever decide to work with knobs.

Hey, while I have your attention. I was playin' around with your micro rhythm script and noticed that when the option for update on slider change is active, it spams the undo history several times with the slightest movement. Perhaps a function could be added that only adds an undo point after x amount of milliseconds once the mouse button is released?
I know we can just use that "do it" button after adjusting the slider, but it's so helpful to see the interaction.
JackOrez is offline   Reply With Quote
Old 07-07-2022, 08:00 AM   #548
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by JackOrez View Post
Thats what I figured, un​for​tu​nate​ly I wouldn't even know where to begin as far as a slider is concerned.

Thank you for that link though, it might come in handy someday if I ever decide to work with knobs.

Hey, while I have your attention. I was playin' around with your micro rhythm script and noticed that when the option for update on slider change is active, it spams the undo history several times with the slightest movement. Perhaps a function could be added that only adds an undo point after x amount of milliseconds once the mouse button is released?
I know we can just use that "do it" button after adjusting the slider, but it's so helpful to see the interaction.
Basically you start by drawing a rectangle to outline the slider then a smaller rectangle with another color where the slider value is. Check if the mouse is inside the retangle if mouse is clicking and was clicking then compare with last mouse position if it moved then change the value. Well there is a bunch of school geometry math involved You probably can pull that off if you try.

If you want to continue the subject about my script please lets use the proper thread! But I dont know if there is much I can do in that subject
daniellumertz is offline   Reply With Quote
Old 07-13-2022, 05:35 AM   #549
McSound
Human being with feelings
 
McSound's Avatar
 
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 280
Default

This simple code
Code:
local buttonColor  = r.ImGui_ColorConvertHSVtoRGB(7.0, 0.6, 0.6, 1.0)
r.ImGui_PushStyleColor(ctx, r.ImGui_Col_Button(), buttonColor)
now gives an error "number has no integer representation"
How to fix it?
McSound is offline   Reply With Quote
Old 07-13-2022, 06:43 AM   #550
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Code:
r.ImGui_PushStyleColor(ctx, r.ImGui_Col_Button(), 0xff3d3dff)
Or, if you do need the HSV to RGB conversion, ColorConvertHSVtoRGB was changed in 0.7 and now just returns separate r g b values.

Code:
local r, g, b = r.ImGui_ColorConvertHSVtoRGB(1.0, 0.6, 0.6)
local buttonColor = reaper.ImGui_ColorConvertDouble4ToU32(r, g, b, 1.0)
r.ImGui_PushStyleColor(ctx, r.ImGui_Col_Button(), buttonColor)
If you do this often, a helper function would be more practical:
Code:
function HSV(h, s, v, a)
  local r, g, b = reaper.ImGui_ColorConvertHSVtoRGB(h, s, v)
  return reaper.ImGui_ColorConvertDouble4ToU32(r, g, b, a or 1.0)
end

r.ImGui_PushStyleColor(ctx, r.ImGui_Col_Button(), HSV(1.0, 0.6, 0.6))

Last edited by cfillion; 07-13-2022 at 06:30 PM.
cfillion is offline   Reply With Quote
Old 07-13-2022, 06:43 AM   #551
kartalex
Human being with feelings
 
Join Date: Dec 2015
Posts: 172
Default

(deleted message)

Last edited by kartalex; 07-13-2022 at 08:47 AM.
kartalex is offline   Reply With Quote
Old 07-13-2022, 12:16 PM   #552
McSound
Human being with feelings
 
McSound's Avatar
 
Join Date: Jun 2021
Location: Moscow, Russia
Posts: 280
Default

cfillion: Just nice! Much appreciated! It's very kind of you to help all of us lightningly ))
McSound is offline   Reply With Quote
Old 07-17-2022, 10:44 AM   #553
tronce
Human being with feelings
 
Join Date: Oct 2017
Posts: 18
Default

Hello,

can somebody test the demo "ReaImGui_Hello World.eel" script in macOs to see if s.he had the same issue please?

In a new project, I create 3 tracks and try to assign different track notes for each with the help of the script but it's like the next selected track gets the previous track's note because the multi-lines text field seems to not refresh.

I did try in windows and can't reproduce this.

Reaper 6.64, reaimgui 0.7, macOs 12.4 in macbook air m1

Thank you
tronce is offline   Reply With Quote
Old 07-17-2022, 06:20 PM   #554
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by tronce View Post
In a new project, I create 3 tracks and try to assign different track notes for each with the help of the script but it's like the next selected track gets the previous track's note because the multi-lines text field seems to not refresh.
Fixing! It happens if the text field is still active when changing selected track.

https://github.com/cfillion/reaimgui...a68a9cc5e276db

Last edited by cfillion; 07-17-2022 at 06:25 PM.
cfillion is offline   Reply With Quote
Old 07-17-2022, 11:21 PM   #555
tronce
Human being with feelings
 
Join Date: Oct 2017
Posts: 18
Default

Wouaw it's magic!

it works very well, thank you very much cfillion!
tronce is offline   Reply With Quote
Old 07-18-2022, 11:05 AM   #556
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 177
Default

I am having three issues...

1) My main window has no close box in the upper right hand and I don't know what I did to remove it... or what has to be done to add it.

2) When I double click on the title bar the window goes away and I get the following error:

...Data\Roaming\REAPER\Scripts\My Scripts\numbers2notes.lua:174: ImGui_End: ImGui assertion failed: (g.CurrentWindowStack.Size > 1) && "Calling End() too many times!"

and the following shows in the Console

ImGui assertion failed: SizeOfFontStack >= g.FontStack.Size && "PushFont/PopFont Mismatch!"

My assumption is that the loop is still trying to push and pop after the window is no longer there.

3) I have a multiline text entry that allows me to enter text, but whenever I leave the entry the text returns to the original state.

Anything in this line that looks wrong, or any suggestions for other things to check?

rv, chartingArea = r.ImGui_InputTextMultiline(ctx, " ", chartingArea, 1385, 532, reaper.ImGui_InputTextFlags_AllowTabInput())
Rockum is offline   Reply With Quote
Old 07-18-2022, 07:48 PM   #557
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by Rockum View Post
1) My main window has no close box in the upper right hand and I don't know what I did to remove it... or what has to be done to add it.
Set ImGui_Begin's 3rd parameter (p_open) to true.

Quote:
Originally Posted by Rockum View Post
2) When I double click on the title bar the window goes away and I get the following error:
Don't push window contents or call ImGui_End if ImGui_Begin returns false.

Code:
local visible, open = reaper.ImGui_Begin(ctx, 'My window', true)
if visible then
  reaper.ImGui_Text(ctx, 'Hello World!')
  reaper.ImGui_End(ctx)
end
Quote:
Originally Posted by Rockum View Post
3) I have a multiline text entry that allows me to enter text, but whenever I leave the entry the text returns to the original state.
There might be multiple items with ID/label set to " ". You can use "##chartingArea" to provide a hidden yet unique ID.
cfillion is offline   Reply With Quote
Old 07-18-2022, 09:17 PM   #558
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 177
Default

Hey, thanks so much ! ! !

#1 Fixed! *

#2 Fixed!

#3 Fixed!

* The close box is now there. Unfortunately it doesn't work but being there is progress.

I spent hours fishing for an answer, your response was really helpful.
Rockum is offline   Reply With Quote
Old 07-19-2022, 04:58 AM   #559
souk21
Human being with feelings
 
souk21's Avatar
 
Join Date: Mar 2021
Posts: 463
Default

Hello !
First of all thanks a *lot* for ReaImGui, it's a joy to work with compared to plain gfx. Definitely a game changer !

I stumbled into two small bugs. Definitely no show-stoppers but I figured I would report it if that can help.

First one is:
When using WindowRounding > 0 there's a one pixel gap between the title bar and the rest of the window

You can sort of see the white background appearing in this gif


Second one:
When ReaImGui window is at the topmost position of the screen, mouse position seems to be incorrectly reported (see following video)

https://i.imgur.com/hjg549r.mp4

Thanks again !
souk21 is offline   Reply With Quote
Old 07-24-2022, 11:56 AM   #560
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 25
Default Script request

Hoping someone can provide a script that does the following,
A slider that can be controlled via mouse wheel with these attributes, wheel alone increments/decrements by tenths (0.0, 0.1, etc.). Shift key+Wheel by hundredths (0.00, 0.01). Ctrl key+Wheel by thousandths (0.000, 0.001), and Shift+Ctrl+Wheel by 10 thousandths (0.0000, 0.0001). I need to be able to set upper and lower bounds of the slider as well.

I tried this script, https://forums.cockos.com/showpost.p...1&postcount=27 but it no longer works, guessing it's because it was meant to run with older version of ImGui.

Thank you
JackOrez is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.