Closed andreamancuso closed 3 months ago
The recent changes enhance the Dear ImGui project by introducing an Image
widget to facilitate image rendering in a React-Imgui context. This addition includes new source files, a React component, and updates to support elements in both CMake configurations and TypeScript definitions, significantly enriching the library's capabilities for creating dynamic interfaces. The modifications aim to improve image handling and expand the range of components available to developers.
Files | Change Summary |
---|---|
.../CMakeLists.txt |
Added src/widget/image.cpp for Emscripten build, enhancing image handling. |
.../include/widget/image.h |
Introduced Image class with properties and methods for rendering images and handling dimensions. |
.../src/reactimgui.cpp , .../src/widget/image.cpp |
Updated ReactImgui to include Image widget and implemented rendering functionality for the new class. |
.../ts/src/lib/components/ImGuiDemo/ImGuiDemo.tsx |
Added <ReactImgui.Image> component to improve demo representation. |
.../ts/src/lib/components/ReactImgui/Image.tsx |
Implemented Image component using forwardRef , allowing rendering with props. |
.../ts/src/lib/components/ReactImgui/components.tsx |
Exported Image component in the components object. |
.../ts/src/lib/components/ReactImgui/types.ts |
Enhanced type definitions for WidgetPropsMap , adding properties for the Image widget. |
.../ts/src/lib/react-native/ReactNativePrivateInterface.js |
Added url property to enhance configuration options in the exported object. |
.../ts/src/lib/react-native/nativeFabricUiManager.ts |
Updated the class to manage the Image component, extending native capabilities. |
.../ts/src/lib/widgetRegistrationService.ts |
Introduced reloadImage(id: string) method to allow reloading images based on their IDs. |
sequenceDiagram
participant User
participant ReactImgui
participant Image
participant API
User->>ReactImgui: Request to render Image
ReactImgui->>Image: Create Image instance
Image->>API: Fetch image based on URL
API-->>Image: Return image data
Image->>ReactImgui: Image data ready for rendering
ReactImgui->>User: Display Image
🐇 In the realm of code, a new image blooms,
With colors bright, dispelling all glooms.
A widget so fine, to render and play,
In the world of ImGui, it brightens the day!
Hoppin' along, with pixels aglow,
A celebration of change, let's all give a show! 🎉
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Image
widget for rendering images in the React-Imgui context.Image
component within the demo application.WidgetRegistrationService
with a method to reload images.Bug Fixes
MapView
rendering logic.Documentation
Image
widget.Chores
Image
widget.