Mahlet-Inc / hobbits

A multi-platform GUI for bit-based analysis, processing, and visualization
https://mahlet-inc.github.io
MIT License
660 stars 45 forks source link

Option to display offsets in hex #160

Open hut8 opened 1 year ago

hut8 commented 1 year ago

It would be super great if these offsets could optionally be displayed in hex rather than decimal:

image

I'll try to get to this myself!

hello-adam commented 1 year ago

I would be happy to pull this in if you added it. I think you would do the hex text rendering somewhere in here: https://github.com/Mahlet-Inc/hobbits/blob/master/src/hobbits-widgets/displayhelper.cpp#L298

And then if you wanted per-display toggles, you'd need to add a control for that in each display plugin's AbstractParameterEditor implementation: https://github.com/Mahlet-Inc/hobbits/blob/master/src/hobbits-plugins/displays/Hex/hexform.cpp

and then a way to read and use that parameter configuration: https://github.com/Mahlet-Inc/hobbits/blob/master/src/hobbits-plugins/displays/Hex/hex.cpp#L12

Or, as a lazy option, you could make it a global setting (src/hobbitscore/settings*)

hut8 commented 1 year ago

Oh wow, thanks for the guidance! Very much appreciated. I'll get to this ASAP