This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void DrawNode::drawSolidRoundedRect(const Vec2 &origin, const Vec2 &destination, float radius, unsigned int segments, const Color4F &color) | |
{ | |
const float coef = 2.0f * (float)M_PI/(segments - 8); | |
Vec2 *vertices = new (std::nothrow) Vec2[segments]; | |
if( ! vertices ) | |
return; | |
// Draw right edge | |
vertices[0].x = destination.x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:;(function(root,factory){typeof define=="function"&&define.amd?define([],factory):typeof exports=="object"?module.exports=factory():root.download=factory()})(this,function(){return function download(data,strFileName,strMimeType){var self=window,defaultMime="application/octet-stream",mimeType=strMimeType||defaultMime,payload=data,url=!strFileName&&!strMimeType&&payload,anchor=document.createElement("a"),toString=function(a){return String(a)},myBlob=self.Blob||self.MozBlob||self.WebKitBlob||toString,fileName=strFileName||"download",blob,reader;myBlob=myBlob.call?myBlob.bind(self):Blob,String(this)==="true"&&(payload=[payload,mimeType],mimeType=payload[0],payload=payload[1]);if(url&&url.length<2048){fileName=url.split("/").pop().split("?")[0],anchor.href=url;if(anchor.href.indexOf(url)!==-1){var ajax=new XMLHttpRequest;return ajax.open("GET",url,!0),ajax.responseType="blob",ajax.onload=function(e){download(e.target.response,fileName,defaultMime)},setTimeout(function(){ajax.send()},0),ajax}}if(/^data:( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var csv = $('.gl-gear-needed__ingredient-header-primary').map((i, gearDiv) => { | |
var gearName = $(gearDiv).find('.gl-gear-needed__ingredient-header-name').text(); | |
var gearRemainingText = $(gearDiv).find('.gl-gear-needed__progress').attr('title'); | |
var matchResult = gearRemainingText.match(/(\d+) of (\d+)/); | |
var assignedCount = matchResult[1]; | |
var totalCount = matchResult[2]; | |
return gearName + ',' + totalCount + ',' + assignedCount; | |
}).toArray().join('\n'); | |
csv = "Name,Total,Assigned,Hoarded\n" + csv; | |
window.download(csv, "GLGearNeeded.csv", "text/csv"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var csv = $('.media-list li.media').map((i, gearDiv) => { | |
var gearName = $(gearDiv).find('.media-heading h5').text(); | |
var totalCount = parseInt($(gearDiv).find('.media-heading p').text().substring(1)); | |
return gearName + ',' + totalCount; | |
}).toArray().join('\n'); | |
csv = "Name,Total\n" + csv; | |
window.download(csv, "FullGearList.csv", "text/csv"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.download=t()}(this,function(){return function e(t,n,o){var a,i,r=window,d="application/octet-stream",s=o||d,c=t,l=!n&&!o&&c,u=document.createElement("a"),f=function(e){return String(e)},p=r.Blob||r.MozBlob||r.WebKitBlob||f,m=n||"download";if(p=p.call?p.bind(r):Blob,"true"===String(this)&&(s=(c=[c,s])[0],c=c[1]),l&&l.length<2048&&(m=l.split("/").pop().split("?")[0],u.href=l,-1!==u.href.indexOf(l))){var b=new XMLHttpRequest;return b.open("GET",l,!0),b.responseType="blob",b.onload=function(t){e(t.target.response,m,d)},setTimeout(function(){b.send()},0),b}if(/^data\:[\w+\-]+\/[\w+\-]+[,;]/.test(c)){if(!(c.length>2096103.424&&p!==f))return navigator.msSaveBlob?navigator.msSaveBlob(v(c),m):w(c);s=(c=v(c)).type||d}function v(e){for(var t=e.split(/[:;,]/),n=t[1],o=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),a=o.length,i=0,r=new Uint8Array(a);i<a;++i)r[i]=o.charCodeAt(i);return new p([r],{ty |
OlderNewer