I tried following the tutorials but when i copy paste the code in the plugins manager it just gives me errors
import { RPM } from "../path.js"
const pluginName = "ShowText";
const inject = RPM.Manager.Plugins.inject;
// Start code here
new Graphic.Text('mytext', {
x: 0,
y: 0,
w: 0,
h: 0,
align: Align.Left,
fontSize: Utils.defaultValue(Datas.Systems.dbOptions.v_tSize, Constants.DEFAULT_FONT_SIZE),
fontName: Utils.defaultValue(Datas.Systems.dbOptions.v_tFont, Constants.DEFAULT_FONT_NAME),
verticalAlign: AlignVertical.Center,
color: Utils.defaultValue(Datas.Systems.dbOptions.v_tcText, System.Color.WHITE),
bold: false,
italic: false,
backColor: Utils.defaultValue(Datas.Systems.dbOptions.v_tcBackground, null),
strokeColor: Utils.defaultValue(Datas.Systems.dbOptions.tOutline, false) ? Utils.defaultValue(Datas.Systems.dbOptions.v_tcOutline, null) : null
});
failed to load resource: net::ERR_FILE_NOT_FOUND
code.js:8 Uncaught ReferenceError: Graphic is not defined at code.js:8
Platform.js:144 Uncaught ReferenceError: Graphic is not defined at code.js:8
Am i misunderstanding?
@wano Like this? import { RPM } from "../path.js" import { System } from "../../System/index.js"; import { Graphic } from "../../Graphic/index.js"; const pluginName = "ShowText"; const inject = RPM.Manager.Plugins.inject; // Start code here new RPM.Graphic.Text('mytext', { x: 0, y: 0, w: 0, h: 0, align: Align.Left, fontSize: Utils.defaultValue(Datas.Systems.dbOptions.v_tSize, Constants.DEFAULT_FONT_SIZE), fontName: Utils.defaultValue(Datas.Systems.dbOptions.v_tFont, Constants.DEFAULT_FONT_NAME), verticalAlign: AlignVertical.Center, color: Utils.defaultValue(Datas.Systems.dbOptions.v_tcText, System.Color.WHITE), bold: false, italic: false, backColor: Utils.defaultValue(Datas.Systems.dbOptions.v_tcBackground, null), strokeColor: Utils.defaultValue(Datas.Systems.dbOptions.tOutline, false) ? Utils.defaultValue(Datas.Systems.dbOptions.v_tcOutline, null) : null });
Yeah but not only Graphic. Also, Dats, Align, Utils etc.