Quote:
Originally Posted by devilsknite1
SO is there really no way to display line breaks in the GUI even though it's in the file itself?
|
Try loading lines, since the GuiMLTextControl's lines can be set with object.setlines()
Save the string, since that worked before.
Could work...
PHP Code:
// Load lines, save strings
function onActionServerSide(afi, svar1, svar2) {
switch (afi) {
case "callTextTypeFile":
temp.text_type_file.loadLines(svar1);
triggerClient("gui", name, "displayTextTypeFile", temp.text_type_file);
break;
case "editTextTypeFile":
temp.text_type_file.saveString(svar2, 0);
break;
}
}
//#CLIENTSIDE
// Receive the lines and display on gui
function onActionClientside(cmd, param) {
switch (cmd) {
case "displayTextTypeFile":
MyGuiMultiLineTextControl.setlines(param);
break;
}
}
// Send a string rather than lines
function sendStringToServer() {
temp.mytext = MyGuiMultiLineTextControl.text;
triggerServer("gui", name, "editTextTypeFile", temp.mytext, "MyFile.txt");
}