Page 1 of 1

Suggestion - Notepad

Posted: 04 Feb 2016 05:54
by Mayobe
An account-tied notepad would be handy. Something like 1KB of storage in a menu similar to the settings menu would be cool.

Re: Suggestion - Notepad

Posted: 12 Feb 2016 08:38
by Vlek
You're able to save information in your personal userdata cubbyhole. I wouldn't save too too much in it though. I've been told they monitor the usage.

Re: Suggestion - Notepad

Posted: 12 Feb 2016 10:57
by Mayobe
Yeah, that's what I'm doing at the moment, but it's kind of a pain when it could just be a text box.

Re: Suggestion - Notepad

Posted: 12 Feb 2016 13:32
by Kitriana
Or you could just save the info on your personal computer using word or some other notepad feature.

Re: Suggestion - Notepad

Posted: 12 Feb 2016 14:43
by Mayobe
Then it's not tied to my account.

Re: Suggestion - Notepad

Posted: 08 Mar 2016 03:59
by Vlek
Mayobe wrote:Yeah, that's what I'm doing at the moment, but it's kind of a pain when it could just be a text box.
... Wait, what? You know how to save to userdata, but you don't know how to make your own textbox that reads/saves from it?

You're using a webclient, so just make your own div that sits above everything that either can be minimized to a titlebar at the bottom and returned to a spot on your screen, make it moveable/resizeable, or some combination of both.

Re: Suggestion - Notepad

Posted: 08 Mar 2016 05:29
by Mayobe
Yeah, I'm okay with JS in general but DOM is a large collection of things I'm too lazy to deal with.

Maybe if I get bored one day I'll look at repurposing the dialogue window.

What I was wanting to do was to copy some reference materials into it so that I could refer to them from wherever I'm playing, but I've ended up just saving them in my puush account and linking to them.

I still use my userdata notepad for short notes and stuff:

Code: Select all

Pattern: mknote

Execute the following javascript:

gwc.userdata.notes.push(args['*']);
gwc.output.append("Added note #" + (gwc.userdata.notes.length - 1).toString());
gwc.output.color("magenta");
---------------------------------------------------------
Pattern: notes

Execute the following javascript:

if(gwc.userdata.notes.length > 0) {
  for(var i = 0; i < gwc.userdata.notes.length; i += 1) {
    var str = i.toString() + "] " + gwc.userdata.notes[i];
    gwc.output.append(str);
    gwc.output.color("cyan");
  }
}
else {
  gwc.output.append("There are no notes recorded!");
  gwc.output.color("magenta");
}
gwc.output.append(">");
---------------------------------------------------------
Pattern: rmnote

Execute the following javascript:

var which = parseInt(args[1], 10);

if(which >= 0 && which < gwc.userdata.notes.length) {
  gwc.userdata.notes.splice(which, 1);
  gwc.output.append("Removed note #" + which + ".");
}
else {
  gwc.output.append("No such note!");
}
gwc.output.color("magenta");
gwc.output.append(">");
---------------------------------------------------------
Pattern: clear_all_notes

Execute the following javascript:

gwc.userdata.notes = [];
gwc.output.append("Notepad cleared.");
gwc.output.color("red");

---------------------------------------------------------
Pattern: dn

Execute the following javascript:

var which = parseInt(args[1], 10);

if(which >= 0 && which < gwc.userdata.notes.length) {
  gwc.connection.send(gwc.userdata.notes[which], true);
}
else {
  gwc.output.append("No such note!");
  gwc.output.color("magenta");
}

(If someone wants to use this then you must call 'clear_all_notes' once before the others will start working.)