Skip to content

Commit

Permalink
Removed squareBandit and added new logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrApptastic committed Jun 11, 2019
1 parent 4d7137e commit 02bedd6
Show file tree
Hide file tree
Showing 4 changed files with 270 additions and 108 deletions.
4 changes: 2 additions & 2 deletions cptCanvas/ChatHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace cptCanvas
{
public class ChatHub : Hub
{
public void SendCoordinates(int x, int y, int s, string z)
public void SendCoordinates(int x, int y, int w, int h, string f, string s, int l, string m, string o, int u, int z, int q)
{
Clients.All.receiveCoordinates(x, y, s, z);
Clients.All.receiveCoordinates(x, y, w, h, f, s, l, m, o, u, z, q);
}

public void Send(string name, string message, string toast)
Expand Down
55 changes: 51 additions & 4 deletions cptCanvas/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,59 @@
<link href="Styles/style.css" rel="stylesheet" />
</head>
<body>
<canvas id="canvasBandit" width="1280" height="910"></canvas>
<div class="canvasBox">
<canvas id="overBandit"></canvas>
<canvas id="canvasBandit"></canvas>
</div>
<div id="toolBox">
<h2>Canvas Chat</h2>
<input type="text" id="message" />
<input type="button" id="sendmessage" value="Send" />
</div>
<div>
<input type="text" id="message" />
<input type="button" id="sendmessage" value="Send" />
</div>
<div>
<select id="colourSelect" name="colourSelect"></select>
<label for="colourSelect">Fill</label>
</div>
<div>
<select id="strokeSelect" name="strokeSelect"></select>
<label for="strokeSelect">Stroke</label>
</div>
<div>
<input type="range" id="widthRange" name="widthRange"
min="1" max="200" value="25" step="1">
<label for="widthRange">Width</label>
</div>
<div>
<input type="range" id="heightRange" name="heightRange"
min="1" max="200" value="25" step="1">
<label for="heightRange">Height</label>
</div>
<div>
<input type="range" id="lineRange" name="lineRange"
min="1" max="50" value="1" step="1">
<label for="lineRange">Line Width</label>
</div>
<div>
<select id="shadeSelect" name="shadeSelect"></select>
<label for="shadeSelect">Shadow Colour</label>
</div>
<div>
<input type="range" id="shadeBlurRange" name="shadeBlurRange"
min="0" max="50" value="0" step="1">
<label for="shadeBlurRange">Shadow Blur</label>
</div>
<div>
<input type="range" id="shadeXRange" name="shadeXRange"
min="1" max="100" value="0" step="1">
<label for="shadeXRange">Shadow X</label>
</div>
<div>
<input type="range" id="shadeYRange" name="shadeYRange"
min="0" max="100" value="0" step="1">
<label for="shadeYRange">Shadow Y</label>
</div>
</div>
<script src="Scripts/jquery-1.6.4.min.js"></script>
<script src="/Scripts/jquery.signalR-2.0.0.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
Expand Down
299 changes: 197 additions & 102 deletions cptCanvas/Scripts/canvasChat.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions cptCanvas/Styles/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
#toast-container > .toast-info, #toast-container > .toast-error, #toast-container > .toast-success, #toast-container > .toast-warning {
background-image: url("../Media/Icons/info.png") !important;
}

body {
margin: 0;
}

#canvasBandit {
cursor: none;
}

.canvasBox {
position: relative;
margin: 0;
padding: 0;
}

.canvasBox canvas {
position: absolute;
top: 0;
left: 0;
}

0 comments on commit 02bedd6

Please sign in to comment.