thanks @rrraptor for the detailed example, now i think i got it, it's a bit misleading that second parameter is 'optional' and third parameter can take its place.
another question to hinder your progress: it seems the app remembers previous settings, where are those stored? how can i set them manually? (e.g. to force a window to be not collapsed on startup even if it was collapsed at the end of last run of the app)
thanks @rrraptor for the detailed example, now i think i got it, it's a bit misleading that second parameter is 'optional' and third parameter can take its place.
@rrraptor , for the mirrored filled slider i need that the values are also reversed (that is, it goes from 100 to 0). i can set the range to 100,0 but strangely then i cannot pull it to to 0, the filledslider stops at 1.
Same for regular "sliderInt", so that is a bug in original ImGui code. I'll try to fix it.
thanks @rrraptor for the detailed example, now i think i got it, it's a bit misleading that second parameter is 'optional' and third parameter can take its place.
another question to hinder your progress: it seems the app remembers previous settings, where are those stored? how can i set them manually? (e.g. to force a window to be not collapsed on startup even if it was collapsed at the end of last run of the app)
Yes, it stores the settings somewhere in a file, but I don't know where yet. I haven't figured out this problem yet.
about the reversed range slider bug let's hope it will be fixed soon, imgui seems to be very actively deveoped and it must be easy to fix it on their side.
should do the same, right? but they don't. first, what tint value i need to have no effect on the image? second, is this really the right uv values (1,1,0,0) that is the same as the default?
will do the trick Or you can simply pass nil if it is an optional parameter and you dont know its default value or if its faster to type "nil" instead of "0xffffff"
second, is this really the right uv values (1,1,0,0) that is the same as the default?
No. Gideros expects the texture with power of two (POT) size, and if your image is 256x256 then yes, uvs must be (1,1,0,0), but if it is not then its something like this: (textureWidth / closestPOTWidth, textureHeight / closestPOTHeight, 0, 0) e.g. if your texture is 200x170 its uvs must be (200/256, 170/256, 0, 0).
I can make it so the formula will be (textureWidth / closestPOTWidth) * userUV1x where userUV1x is ur desired uv x coordinate. That makes more sense.
it was said that easiest to include images in widgets is to use custom fonts, yet setting fonts is not yet available apparently. i hope you will be able to add that too sometime.
still happily playing around with imgui. can you tell me how can i know if in a combo box an item was clicked on? (after which i wish to close the popup window which was opened only for this combo box)
it was said that easiest to include images in widgets is to use custom fonts, yet setting fonts is not yet available apparently. i hope you will be able to add that too sometime.
about combo, let me rephrase, i have a currentItem, isOpen = ImGui:combo(label, currentItem, items) element and i want to trigger something when this combo gets closed. as a workaround i can make a variable temp which is 0, is changed to 1 when isOpen==true and i trigger the event i want (closing the containing popup window) when (isOpen==false & temp==1), but i'm sure there must be some straightforward imgui function for that.
in the imgui demo there is a style editor which has an export button for colors, it would be quite convenient if somehow it would export the appropriate lua code. like i have many themes here but it's a hassle to convert them to lua: https://github.com/ocornut/imgui/issues/707
about combo, let me rephrase, i have a currentItem, isOpen = ImGui:combo(label, currentItem, items) element and i want to trigger something when this combo gets closed. as a workaround i can make a variable temp which is 0, is changed to 1 when isOpen==true and i trigger the event i want (closing the containing popup window) when (isOpen==false & temp==1), but i'm sure there must be some straightforward imgui function for that.
Flag name actually not "isOpen", my mistake. Its must be something like isSelected. So you need to use
item, isSelected = imgui:combo(...)if(isSelected)then-- do somethingend
another note, probably you know that, but setCursorPosX is not available.
I'm not an expert in ImGui, so I don't know what it is for, so I decided not to implement it yet (as well as some other functions). Can you tell me what it is for?
in the imgui demo there is a style editor which has an export button for colors, it would be quite convenient if somehow it would export the appropriate lua code. like i have many themes here but it's a hassle to convert them to lua: https://github.com/ocornut/imgui/issues/707
you write that first is tintColor but it's the backgroundColor in fact.
Hmmm, I'll change the order in sources, so it will match with ImGui:image(texture, w, h, [tintColor = 0xffffff, 1, bgColor = 0xffffff]) Also, I changed uv arguments. First, they are swapped ( [uv0, uv1] instead of [uv1, uv0] ). Second, no need to calculate uv1 by your self. Now it works like a scale argument.
Btw, I can give you access to edit github page if you want All I need is ur nickname.
setCursorPosX seems to be position to an exact place the 'cursor', so e.g. the next text element is starting from there. i could use sameLine() though to have the same functionality.
"Also, result is a bit different. Its 0x0f87f9 instead of 0x0f87fa. I guess its ok...?" -well the point would be to get the exact value, whatever it is (so e.g. i can match some other color with pushstylecolor to be the same).
Comments
https://github.com/ocornut/imgui/blob/4448734041bfff23c86dbc68dac88e69df112536/imgui.h#L794
Fragmenter - animated loop machine and IKONOMIKON - the memory game
New dll on github.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
it seems the app remembers previous settings, where are those stored? how can i set them manually? (e.g. to force a window to be not collapsed on startup even if it was collapsed at the end of last run of the app)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
what about that:
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh
Likes: keszegh
Fragmenter - animated loop machine and IKONOMIKON - the memory game
i try to change the uv mapping of an image on a button.
and for a start as i understand
but they don't.
first, what tint value i need to have no effect on the image?
second, is this really the right uv values (1,1,0,0) that is the same as the default?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
(textureWidth / closestPOTWidth, textureHeight / closestPOTHeight, 0, 0) e.g. if your texture is 200x170 its uvs must be (200/256, 170/256, 0, 0).
I can make it so the formula will be (textureWidth / closestPOTWidth) * userUV1x where userUV1x is ur desired uv x coordinate. That makes more sense.
Likes: MoKaLux
it was said that easiest to include images in widgets is to use custom fonts, yet setting fonts is not yet available apparently. i hope you will be able to add that too sometime.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
i have a
currentItem, isOpen = ImGui:combo(label, currentItem, items)
element and i want to trigger something when this combo gets closed.
as a workaround i can make a variable temp which is 0, is changed to 1 when isOpen==true and i trigger the event i want (closing the containing popup window) when (isOpen==false & temp==1), but i'm sure there must be some straightforward imgui function for that.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/ocornut/imgui/issues/707
Fragmenter - animated loop machine and IKONOMIKON - the memory game
also
pressFlag = ImGui:imageButton(texture, w, h, [padding = -1, tintColor = 0xffffff, 1, borderColor = 0xffffff, 0, uv1x = 1, uv1y = 1, uv0x = 0, uv0y = 0])
you write that first is tintColor but it's the backgroundColor in fact.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Also, I changed uv arguments.
First, they are swapped ( [uv0, uv1] instead of [uv1, uv0] ).
Second, no need to calculate uv1 by your self. Now it works like a scale argument.
Btw, I can give you access to edit github page if you want All I need is ur nickname. Oh, my bad
https://github.com/MultiPain/Gideros_ImGui/blob/3c628cc45a9e871653f230de7fbc9f1510d3067a/main.cpp#L85
Must be
Likes: keszegh
"Also, result is a bit different. Its 0x0f87f9 instead of 0x0f87fa. I guess its ok...?"
-well the point would be to get the exact value, whatever it is (so e.g. i can match some other color with pushstylecolor to be the same).
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/MultiPain/Gideros_ImGui/blob/master/README.md#loggingcapture
https://github.com/MultiPain/Gideros_ImGui/blob/master/README.md#style-settersgetters
https://github.com/MultiPain/Gideros_ImGui/blob/master/README.md#cursor--layout
Likes: keszegh, MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I need to test it )))