home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Re-use old annotation when writing new one.
[plomrogue2-experiments]
/
new2
/
rogue_chat_nocanvas_monochrome.html
diff --git
a/new2/rogue_chat_nocanvas_monochrome.html
b/new2/rogue_chat_nocanvas_monochrome.html
index 096b6d55fa3f8eee0726999b57b1faa44bae5da6..ad654611d3249f68751e5163e46e903d96a8d3e4 100644
(file)
--- a/
new2/rogue_chat_nocanvas_monochrome.html
+++ b/
new2/rogue_chat_nocanvas_monochrome.html
@@
-173,6
+173,7
@@
let mode_edit = new Mode('edit', false, false);
let tui = {
mode: mode_chat,
log: [],
let tui = {
mode: mode_chat,
log: [],
+ input_prompt: '> ',
input: '',
input_lines: [],
window_width: terminal.cols / 2,
input: '',
input_lines: [],
window_width: terminal.cols / 2,
@@
-189,6
+190,12
@@
let tui = {
}
this.mode = mode;
this.empty_input();
}
this.mode = mode;
this.empty_input();
+ if (mode == mode_annotate && explorer.position in explorer.info_db) {
+ let info = explorer.info_db[explorer.position];
+ if (info != "(none)") {
+ this.add_to_input(explorer.info_db[explorer.position]);
+ }
+ }
this.full_refresh();
},
draw_mode_line: function() {
this.full_refresh();
},
draw_mode_line: function() {
@@
-258,14
+265,14
@@
let tui = {
}
},
add_to_input: function(str) {
}
},
add_to_input: function(str) {
- if (this.input.length + str.length > this.window_width * terminal.rows) {
+ if (this.input
_prompt.length + this.input
.length + str.length > this.window_width * terminal.rows) {
return;
}
this.input += str;
this.recalc_input_lines();
},
recalc_input_lines: function() {
return;
}
this.input += str;
this.recalc_input_lines();
},
recalc_input_lines: function() {
- this.input_lines = this.msg_into_lines_of_width(
"> "
+ this.input, this.window_width);
+ this.input_lines = this.msg_into_lines_of_width(
this.input_prompt
+ this.input, this.window_width);
this.height_input = this.input_lines.length;
},
shorten_input: function() {
this.height_input = this.input_lines.length;
},
shorten_input: function() {