mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
refactor: Better interface for the event system
This commit is contained in:
@@ -73,7 +73,7 @@ namespace hex::plugin::builtin::ui {
|
||||
this->m_currDataVisualizer = ContentRegistry::HexEditor::getVisualizerByName("hex.builtin.visualizer.hexadecimal.8bit");
|
||||
this->m_bytesPerRow = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.bytes_per_row", this->m_bytesPerRow);
|
||||
|
||||
EventManager::subscribe<EventSettingsChanged>(this, [this] {
|
||||
EventSettingsChanged::subscribe(this, [this] {
|
||||
this->m_selectionColor = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.highlight_color", 0x60C08080);
|
||||
this->m_syncScrolling = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.sync_scrolling", false);
|
||||
this->m_byteCellPadding = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.byte_padding", false);
|
||||
@@ -82,7 +82,7 @@ namespace hex::plugin::builtin::ui {
|
||||
}
|
||||
|
||||
HexEditor::~HexEditor() {
|
||||
EventManager::unsubscribe<EventSettingsChanged>(this);
|
||||
EventSettingsChanged::unsubscribe(this);
|
||||
}
|
||||
|
||||
constexpr static u16 getByteColumnSeparatorCount(u16 columnCount) {
|
||||
|
||||
Reference in New Issue
Block a user