Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a MoveInfo parsing proxy between SidePanel and MoveTreeDisplayHandler #67

Open
hexaquarks opened this issue Nov 4, 2023 · 0 comments

Comments

@hexaquarks
Copy link
Owner

MoveTreeDisplayHandler currently returns an std::vector<MoveInfo> through generateMoveInfo(). This struct is generic in that it has no UI-related specifications. It only indicates the row, indent, content, etc., of the move that shall be displayed on the SidePanel. When we draw the side panel, ideally, the process would be const but it currently isn't because of drawMoves() which is a non-trivial process in itself.

In this task, I want to inject a proxy that would take the std::vector<MoveInfo> and output an std::vector<MoveInfoDisplay>. Here MoveInfoDisplay is a struct that holds a reference to MoveInfo but also has the necessary information to draw the move, i.e., position, dimensions, etc.

With this, we could do SidePanel::draw() const { drawMoves(); /* ... other const draw methods */ }
#66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant