Advertisement
Guest User

Untitled

a guest
Nov 27th, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var app = Angular.module("editor", ['mp.colorPicker']);
  2.  
  3. app.controller("colorPicker", function($scope) {
  4.     $scope.colorChanged = function() {
  5.         input.setColor($scope.color);
  6.     };
  7. });
  8.  
  9. app.controller("toolsSelector", function($scope) {
  10.     $scope.tool = "wall";
  11.     $scope.setTool = function(tool) {
  12.         $scope.tool = tool;
  13.         input.setTool(tool);
  14.     };
  15.     $scope.activeTool = function(tool) {
  16.         return tool == $scope.tool ? "active" : "";
  17.     };
  18.     $scope.tools = [{
  19.         name : "Wall",
  20.         icon : "pencil",
  21.         type : "wall"
  22.     },{
  23.         name : "Spawn",
  24.         icon : "sign-in",
  25.         type : "start"
  26.     },{
  27.         name : "Target",
  28.         icon : "sign-out",
  29.         type : "target"
  30.     },{
  31.         name : "Color",
  32.         icon : "paint-brush",
  33.         type : "color"
  34.     }];
  35. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement