mirror of
https://github.com/allankoechke/qml-virtualkey.git
synced 2026-12-03 01:17:51 +00:00
15 lines
339 B
JavaScript
15 lines
339 B
JavaScript
.pragma library
|
|
|
|
function isMobilePlatform() {
|
|
return ["android", "blackberry", "ios", "winrt", "winphone"].indexOf(Qt.platform.os)>=0;
|
|
}
|
|
|
|
function mix(a, b, u) {
|
|
return a*(1.-u)+b*u
|
|
}
|
|
|
|
String.prototype.setCharAt = function(index,chr) {
|
|
if(index > this.length-1) return str;
|
|
return this.substr(0,index) + chr + this.substr(index+1);
|
|
}
|