Code Monkey home page Code Monkey logo

egui_memory_editor's Introduction

Egui Memory Editor

Crates io link Documentation on docs.rs

This is a simple memory editor/viewer utility for the immediate mode UI library egui

screenshot

Features

  • Multiple memory regions with different address ranges can be created.
  • Can jump to an arbitrary address using the goto functions.
  • Can select certain values in the main UI by right-clicking, which you can then see in the Data Preview section.
  • Can have an optional write function to allow editing fields by left clicking on them.

Usage

It's best to look at the example in the examples/ folder, but one can initialise the editor with any struct of their choosing.

For example, a custom memory struct:

let mut memory = Memory::new();
// Create a memory editor with a variety of ranges, need at least one, but can be as many as you want.
let mut mem_editor = MemoryEditor::new()
.with_address_range("All", 0..0xFFFF)
.with_address_range("IO", 0xFF00..0xFF80)
.with_window_title("Hello Editor!");

// In your egui rendering simply include the following.
// The write function is optional, if you don't set it the UI will be in read-only mode.
let mut is_open = true;
mem_editor.window_ui(
    ctx,
    &mut is_open,
    &mut memory,
    |mem, address| mem.read_value(address).into(),
    |mem, address, val| mem.write_value(address, val),
);

Running example

To run the example do the following:

  1. git clone https://github.com/Hirtol/egui_memory_editor
  2. cd egui_memory_editor
  3. cargo run --example simple --release

Feature Showcase

gif

egui_memory_editor's People

Contributors

hirtol avatar ragarnoy avatar ax9d avatar kryptos-fr avatar ptxmac avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.