Phase 4.2: Add GridView UIDrawable type (addresses #252)
GridView is a new UIDrawable that renders a GridData object independently. Multiple GridViews can reference the same Grid for split-screen, minimap, or different camera/zoom perspectives on shared grid state. - New files: UIGridView.h/cpp with full rendering pipeline (copied from UIGrid::render, adapted to use grid_data pointer) - Add UIGRIDVIEW to PyObjectsEnum - Add UIGRIDVIEW cases to all switch(derived_type()) sites: Animation.cpp, UICollection.cpp, UIDrawable.cpp, McRFPy_API.cpp, ImGuiSceneExplorer.cpp - Python type: mcrfpy.GridView(grid=, pos=, size=, zoom=, fill_color=) - Properties: grid, center, zoom, fill_color, texture - Register type with metaclass for callback support All 258 existing tests pass. New GridView test suite added. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
13d5512a41
commit
4b13e5f5db
10 changed files with 824 additions and 2 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include "UICaption.h"
|
||||
#include "UISprite.h"
|
||||
#include "UIGrid.h"
|
||||
#include "UIGridView.h"
|
||||
#include "UIEntity.h"
|
||||
#include "ImGuiConsole.h"
|
||||
#include "PythonObjectCache.h"
|
||||
|
|
@ -285,6 +286,7 @@ const char* ImGuiSceneExplorer::getTypeName(UIDrawable* drawable) {
|
|||
case PyObjectsEnum::UICAPTION: return "Caption";
|
||||
case PyObjectsEnum::UISPRITE: return "Sprite";
|
||||
case PyObjectsEnum::UIGRID: return "Grid";
|
||||
case PyObjectsEnum::UIGRIDVIEW: return "GridView";
|
||||
case PyObjectsEnum::UILINE: return "Line";
|
||||
case PyObjectsEnum::UICIRCLE: return "Circle";
|
||||
case PyObjectsEnum::UIARC: return "Arc";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue