@urso/core 0.4.13 → 0.4.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.4.13",
3
+ "version": "0.4.17",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -39,12 +39,14 @@ PIXI.Text.prototype.drawLetterSpacing = function (text, x, y, isStroke) {
39
39
  }
40
40
  var currentPosition = x;
41
41
 
42
- var customColors = [];//colors patch block
43
- var textIndexOffset = this.text.indexOf(text);
42
+ var textIndexOffset = this.text.indexOf(text); //colors patch block
43
+ var allTextLength = this.text.length;
44
+ var customColors = new Array(allTextLength);
44
45
  if (this.fillCustomColors) {
45
- for (var k in this.fillCustomColors){
46
+ for (var k in this.fillCustomColors) {
46
47
  var colorsParams = this.fillCustomColors[k];
47
- customColors[colorsParams.position] = colorsParams.color;
48
+ //customColors[colorsParams.position] = colorsParams.color;
49
+ customColors.fill(colorsParams.color, colorsParams.position, allTextLength);
48
50
  }
49
51
  }
50
52
 
@@ -15,7 +15,7 @@ class ModulesObjectsModelsTextInput extends Urso.Core.Modules.Objects.BaseModel
15
15
  this.box = Urso.helper.recursiveGet('box', params, false);
16
16
  this.numbersOnly = Urso.helper.recursiveGet('numbersOnly', params, false);
17
17
  this.allowedSymbols = Urso.helper.recursiveGet('allowedSymbols', params, false);
18
- this.substituteText = Urso.helper.recursiveGet('substituteText', params, false);
18
+ //this.substituteText = Urso.helper.recursiveGet('substituteText', params, false); //todo remove this string
19
19
  this.maxLength = Urso.helper.recursiveGet('maxLength', params, false);
20
20
  }
21
21
 
@@ -53,7 +53,7 @@ class ModulesObjectsModelsTextInput extends Urso.Core.Modules.Objects.BaseModel
53
53
 
54
54
  _addBaseObject() {
55
55
  this._baseObject = new PIXI.TextInput({ input: this.input, box: this.box });
56
- this._baseObject.substituteText = this.substituteText;
56
+ //this._baseObject.substituteText = this.substituteText; //todo remove this string
57
57
 
58
58
  if(this.maxLength)
59
59
  this._baseObject.maxLength = this.maxLength
@@ -56,6 +56,7 @@ class ModulesObjectsModelsToggle extends UrsoCoreModulesObjectsModelsButton {
56
56
  this._changeTexture(`${this.status}Out`);
57
57
 
58
58
  this._isDisabled = false;
59
+ this._baseObject.buttonMode = true;
59
60
  }
60
61
 
61
62
  disable() {
@@ -64,6 +65,7 @@ class ModulesObjectsModelsToggle extends UrsoCoreModulesObjectsModelsButton {
64
65
 
65
66
  this._changeTexture(`${this.status}Disabled`);
66
67
  this._isDisabled = true;
68
+ this._baseObject.buttonMode = false;
67
69
  }
68
70
 
69
71
  _addBaseObject() {
@@ -60,7 +60,7 @@ class ModulesObserverController {
60
60
 
61
61
  _removeLocal(name, callback) {
62
62
  if (!this._observers[name] || !callback._ouid)
63
- Urso.logger.error('ModulesObserverController remove error');
63
+ return Urso.logger.error('ModulesObserverController remove error, no observer with', name, callback);
64
64
 
65
65
  const uid = callback._ouid;
66
66
  delete this._observers[name][uid];