mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 11:37:33 +08:00
Bugfixes, LocalizedText is an entity again
This commit is contained in:
@@ -2,6 +2,7 @@ import Entity from "./Entity"
|
||||
import ObjectReference from "./primitive/ObjectReference"
|
||||
|
||||
export default class FunctionReferenceEntity extends Entity {
|
||||
|
||||
static attributes = {
|
||||
MemberParent: ObjectReference,
|
||||
MemberName: ""
|
||||
|
||||
19
js/entity/LocalizedTextEntity.js
Executable file
19
js/entity/LocalizedTextEntity.js
Executable file
@@ -0,0 +1,19 @@
|
||||
import Entity from "./Entity"
|
||||
|
||||
export default class LocalizedTextEntity extends Entity {
|
||||
|
||||
static attributes = {
|
||||
namespace: String,
|
||||
key: String,
|
||||
value: String
|
||||
}
|
||||
|
||||
getAttributes() {
|
||||
return LocalizedTextEntity.attributes
|
||||
}
|
||||
|
||||
toString() {
|
||||
"NSLOCTEXT(" + `"${this.namespace}"` + ", " + `"${this.key}"` + ", " + `"${this.value}"` + ")"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import Entity from "./Entity"
|
||||
import Guid from "./primitive/Guid"
|
||||
import LocalizedTextEntity from "./primitive/LocalizedTextEntity"
|
||||
import LocalizedTextEntity from "./LocalizedTextEntity"
|
||||
import ObjectReference from "./primitive/ObjectReference"
|
||||
import PinReferenceEntity from "./PinReferenceEntity"
|
||||
import TypeInitialization from "./TypeInitialization"
|
||||
|
||||
@@ -3,7 +3,7 @@ import Primitive from "./Primitive"
|
||||
export default class Guid extends Primitive {
|
||||
|
||||
static generateGuid(random) {
|
||||
let values = new Uint32Array(4);
|
||||
let values = new Uint32Array(4)
|
||||
if (random === true) {
|
||||
crypto.getRandomValues(values)
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import Primitive from "./Primitive"
|
||||
|
||||
export default class LocalizedTextEntity extends Primitive {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} namespace
|
||||
* @param {String} key
|
||||
* @param {String} value
|
||||
*/
|
||||
constructor(namespace, key, value) {
|
||||
super()
|
||||
this.namespace = namespace
|
||||
this.key = key
|
||||
this.value = value
|
||||
}
|
||||
|
||||
toString() {
|
||||
"NSLOCTEXT(" + `"${this.namespace}"` + ", " + `"${this.key}"` + ", " + `"${this.value}"` + ")"
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user