Skip to content

Commit

Permalink
create canvas console controller
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed Jun 20, 2024
1 parent f910fd3 commit 3bd255a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.github.creme332.controller;

import com.github.creme332.model.AppState;
import com.github.creme332.view.CanvasConsole;

public class CanvasConsoleController {
public CanvasConsoleController(CanvasConsole console, AppState app) {
new ToolBarController(console.getToolbar(), app.getCanvasModel());
new SideMenuController(app, console.getSidebar());
new ToastController(app, console.getToast());
new ZoomPanelController(app.getCanvasModel(), console.getZoomPanel());
}
}
5 changes: 1 addition & 4 deletions src/main/java/com/github/creme332/controller/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ public Controller() {

// create controllers for views
new MenuBarController(app, frame.getMyMenuBar());
new ZoomPanelController(app.getCanvasModel(), frame.getCanvasConsole().getZoomPanel());
new CanvasController(app, frame.getMyCanvas());
new TutorialScreenController(app, frame.getTutorialCenter());
new ToolBarController(frame.getCanvasConsole().getToolbar(), app.getCanvasModel());
new SideMenuController(app, frame.getCanvasConsole().getSidebar());
new ToastController(app, frame.getCanvasConsole().getToast());
new CanvasConsoleController(frame.getCanvasConsole(), app);

// play start animation
frameController.playStartAnimation();
Expand Down

0 comments on commit 3bd255a

Please sign in to comment.