Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var app = Angular.module("editor", ['mp.colorPicker']);
- app.controller("colorPicker", function($scope) {
- $scope.colorChanged = function() {
- input.setColor($scope.color);
- };
- });
- app.controller("toolsSelector", function($scope) {
- $scope.tool = "wall";
- $scope.setTool = function(tool) {
- $scope.tool = tool;
- input.setTool(tool);
- };
- $scope.activeTool = function(tool) {
- return tool == $scope.tool ? "active" : "";
- };
- $scope.tools = [{
- name : "Wall",
- icon : "pencil",
- type : "wall"
- },{
- name : "Spawn",
- icon : "sign-in",
- type : "start"
- },{
- name : "Target",
- icon : "sign-out",
- type : "target"
- },{
- name : "Color",
- icon : "paint-brush",
- type : "color"
- }];
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement