From 9cc2097ac1e5d107816b1330987c541967d6fe37 Mon Sep 17 00:00:00 2001 From: William Toohey Date: Thu, 4 Feb 2016 18:19:56 +1000 Subject: [PATCH] Move seek buttons --- fonts/HuesExtra.eot | Bin 2840 -> 2956 bytes fonts/HuesExtra.svg | 2 ++ fonts/HuesExtra.ttf | Bin 2676 -> 2792 bytes fonts/HuesExtra.woff | Bin 2752 -> 2868 bytes src/css/hues-editor.css | 1 + src/js/HuesEditor.js | 55 +++++++++++++++++++++++----------------- 6 files changed, 35 insertions(+), 23 deletions(-) diff --git a/fonts/HuesExtra.eot b/fonts/HuesExtra.eot index a5635feba0c11927758e9cb0c89ad48b76b00e29..f39aeb891ed24265b3c22fec73b09ee0e281f01f 100644 GIT binary patch delta 386 zcmbOs)+5f^!_C0(Vj`nnkOf6icAbi5@KU#U|`q-#0kl{i3Q?emnKgdZ2L0_+=@F9G>efP9sV+>#2*JeJ=;{th7D zB_}^Qk#`&a8X*4jX%ifti`{;^Y)Ydq$qgOBlTwc{YDwT+LSBz~I2#!0f;P^n|&fu^=N9HZ(9gFgpA@ z@b7>FGsC|HASR>3U$796y#Qn^BO?QY1JePZUZ7u9VR{)FKx!Qzn!p-Bih)W&p!vi4 z_3`{RUm3Vr!2C-$xOTLHSeI_>Xq~)=!<GLhAs#lMK5aH2z*5bIwC28KOAoRFNGSRfvDY2w5aGWAjOc33em zFjg=yu+?OwCZ=#~BadQ$Ug(LqpcvnxP*ZjD8s-N0+MH7 zW@bD&Ifc=lk!$i2MsG&0%^w(7vnhfUFcdNr`N#9yd}ZKf0rM|idFlaTfau98oaT)D YlVdn-CNJPrU}Ineit}$i#d(Mk01;$7KL7v# diff --git a/fonts/HuesExtra.svg b/fonts/HuesExtra.svg index 4ebd281..16637be 100644 --- a/fonts/HuesExtra.svg +++ b/fonts/HuesExtra.svg @@ -18,4 +18,6 @@ + + \ No newline at end of file diff --git a/fonts/HuesExtra.ttf b/fonts/HuesExtra.ttf index 946e462edd8248a4358348f198bcc11523190ab6..2b3a8438d6c5ce8baff25820b9b9053475d0961e 100644 GIT binary patch delta 405 zcmew&@(ezIdC?>7E5K!HCX1-Xe81q@OQs~H$L6@Yw&yu{qpnO>Yg4V(@@ zOWF$Zi%WnG1p=-UAbAF6=8F>#*fa7>V)SO@+3dr(nytQp!GXDf*#YP$26I7UK}INS zXkc_;boh7R-vI|^hJOn{Oh$*lU?CuT0mw{7U{E+P9RTVDhJY$eFGB-Jtph|8SOZ8g zP$>vBe^|dhp5Nvx12+qpf9VF-j#d!s(v2OhlO;IJ83iW?aM*AFWgA$4nkM&fD2On} aFc*Oh5M)@%zya3BG&zw=c=LIVrHladc3$%U delta 287 zcmaDM`bDIkfsuiMft#U$ftkU;KUm+0Ux@WDP-G7fCnV=47Kn#kn#jPwCgx(21U5i$^FNM5i~!xWVIlwk delta 335 zcmdlYc0g35+~3WOfsp|SxDGIIgXxmVirm7J4Y*k*Y75u1{!PwJEMQ<@%mB)TfUtPj zrHSc@#UQagKt2Z)3#8{%rUAu{Ffg#yfN<2j9ab5si77xO4nQ?#Ak49ipEm<22o$RT z@>M{XeFO7_jNB3+pJNV?Zv(=HdCb*0`N@e4{tO&9fC362%oW9Bm77=rw3y=uOpHN- zVRc?&ZYl!`1^U29PjP{INlYJPy8M!vkU|h|n z2oz^vC}b$|kLS1f%D~M6=3lz<)C0r-(UZ?`m^1QEX5qA%?7^uZ01hmEhLvECGcYiL L0&8 { + this.core.soundManager.seek(-this.core.soundManager.buildLength); + }; // drag handle var handleContainer = document.createElement("div"); @@ -539,7 +546,13 @@ HuesEditor.prototype.uiCreateEditArea = function() { document.addEventListener("mouseup", mouseup); }); - this.loopEdit = this.uiCreateSingleEditor("Rhythm  ", "sound", "rhythm", "edit-loop", editArea); + this.loopEdit = this.uiCreateSingleEditor("Rhythm ", "sound", "rhythm", "edit-loop", editArea); + this.seekLoop = this.loopEdit._seek; + // BACK |< + this.seekLoop.innerHTML = ""; + this.seekLoop.onclick = () => { + this.core.soundManager.seek(0); + }; this.buildEdit._hilight.textContent = "[none]"; this.loopEdit._hilight.innerHTML = @@ -574,6 +587,11 @@ HuesEditor.prototype.uiCreateSingleEditor = function(title, soundName, rhythmNam var nameLabel = document.createElement("span"); header.appendChild(nameLabel); nameLabel.innerHTML = title; + + var seek = this.createButton("", header, true, "hues-icon"); + header.appendChild(seek); + container._seek = seek; + var beatCount = document.createElement("span"); header.appendChild(beatCount); beatCount.className = "beat-count"; @@ -780,15 +798,6 @@ HuesEditor.prototype.uiCreateControls = function() { controls.id = "edit-controls"; this.root.appendChild(controls); - this.seekStart = this.createButton("<< Start", controls, true); - this.seekStart.onclick = () => { - this.core.soundManager.seek(-this.core.soundManager.buildLength); - }; - this.seekLoop = this.createButton("< Loop", controls, true); - this.seekLoop.onclick = () => { - this.core.soundManager.seek(0); - }; - var playRateLab = document.createElement("span"); playRateLab.className = "settings-individual"; playRateLab.textContent = "1.00x";