Open tambry opened 8 years ago
Hi Raul,
What you typically want here is to "seek" directly in the visible portion of the display. If you item heights are fixed this is trivial. Look at the ImGuiListClipper helper in imgui_demo.cpp and in issues https://github.com/ocornut/imgui/search?q=ImGuiListClipper&type=Issues&utf8=%E2%9C%93
If your item heights are variable this would be a little more work for you, you may need to create some adhoc data structure to help you identity the item number based on a Y position.
-Omar
Thank you very much for the advice, works like a charm! I'm currently slightly confused by how to set the width of a column. PushItemWidth seems to have no effect on the column. Would you be able to... push me in the right direction?
SetColumnOffset
tho all the columns API is largely lacking (see the various threads about columns).
Thank you very much. Seems like for now I don't have any problems with ImGui and I can continue with reverse-engineering.
@ocornut Is there any easy way to make a whole column line selectable? Using ImGui::Selectable I can make a part of the line selectable, but I'd prefer to have the whole line clickable and selectable.
Have you looked at the flags for Selectale() ? Please look at the existing code and demo more carefully :)
Managed to not notice the usage in the demo. Thank you very much once again and I'll try to take a more through look the next time.
@ocornut Hi. Sorry again for bothering you once again. This time I've got 3 issues.
ImGui::SetScrollFromPosY(line * ImGui::GetTextLineHeight())
^ Doesn't seem to quite centre the line.The part where I use ImGui is available here: https://github.com/NGEmu/NGEmu/blob/master/NGEmu/Debugger/Debugger.cpp#L128
Hi!
So I'm just beginning to use ImGui to write a debugger for my N-Gage emulator project (NGEmu for short). The first thing that I want to accomplish is displaying a big list, which would always point to the PC (program counter) and which would display if the line contains a breakpoint (red dot?), the memory address (up to 0x380000), the bytes at the memory address and the instruction name, if the memory location contains an instruction. It should also be able to group the bytes together depending on the instruction. Adding such a huge number of elements every frame is obviously not possible. Is there a way to get the number of elements being displayed by the list and then have it add the needed elements?
An example posted in #123 for ProDBG seems to more or less showcase the structure for a disassembly window that I want.