refactored from main to canvas.h - basic functionality working
This commit is contained in:
@@ -105,9 +105,9 @@ namespace VISEQ::APP::UI{
|
||||
DrawText(text.c_str(), position.x-offset/2.0f, position.y-(float)size/2.0f+1, size, color );
|
||||
}
|
||||
|
||||
void drawPerNodeConfig(Camera2D *camera){
|
||||
void drawPerNodeConfig(Camera2D camera){
|
||||
for(auto& n : gm->nodes | std::views::filter([](std::shared_ptr<Node> n){ return n->config; })){
|
||||
Vector2 np = GetWorldToScreen2D((Vector2){n->position.x, n->position.y}, *camera);
|
||||
Vector2 np = GetWorldToScreen2D((Vector2){n->position.x, n->position.y}, camera);
|
||||
|
||||
n->config = !GuiWindowBox((Rectangle){np.x + 10, np.y + 10, 240, 440}, "config");
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace VISEQ::APP::UI{
|
||||
}
|
||||
}
|
||||
|
||||
void draw(Vec2Df *mouse_pos, Camera2D *camera){
|
||||
void draw(Vec2Df mouse_pos, Camera2D camera){
|
||||
drawSideBar();
|
||||
drawPerNodeConfig(camera);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user