generic colorful screen #263
Aliases: generic colorful screen, screen, gcs
7 verbs · 36 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
look_self | this none this | rxd | #263 | 1 |
_display_width_for | this none this | rxd | #263 | 5 |
_tell_body | this none this | rxd | #263 | 6 |
tell_screen | this none this | rxd | #263 | 15 |
tell_screen_autowrap | this none this | rxd | #263 | 5 |
wrap_for_screen | this none this | rxd | #263 | 6 |
footer header | this none this | rxd | #263 | 1 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
border_bgcolor | #263 | rc | #361 | "~1b[46m" |
title_color | #263 | rc | #361 | "~1b[30m" |
main_color | #263 | rc | #361 | "~1b[36m" |
footer | #263 | rc | #361 | "a Care Dog joint" |
border_width | #263 | rc | #361 | 1 |
header | #263 | rc | #361 | "Generic Colorful Screen" |
handed | #5 | rc | #361 | <clear> |
wield_msg | #5 | rc | #361 | <clear> |
unwield_msg | #5 | rc | #361 | <clear> |
size | #5 | rc | #361 | <clear> |
look_place_msg | #5 | rc | #361 | <clear> |
value | #5 | rc | #361 | <clear> |
get_msg | #5 | rc | #361 | <clear> |
drop_msg | #5 | rc | #361 | <clear> |
get_fail_msg | #5 | rc | #361 | <clear> |
junk_ok | #5 | rc | #361 | <clear> |
floats | #5 | rc | #361 | <clear> |
long_name_msg | #5 | rc | #361 | <clear> |
article | #5 | rc | #361 | <clear> |
setup_list | #5 | rc | #361 | <clear> |
health | #5 | rc | #361 | <clear> |
health_max | #5 | rc | #361 | <clear> |
min_skill | #5 | rc | #361 | <clear> |
skill | #5 | rc | #361 | <clear> |
recipe_for | #5 | rc | #361 | <clear> |
carried_msg | #5 | rc | #361 | <clear> |
aliases | #1 | rc | #361 | {"generic colorful screen", "screen", "gcs"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {5107, 1298434481} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rwc | #361 | <clear> |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #5 generic thing → #1 root
Children: none
Call graph
Source
look_self
Referenced by
none
Source
1this:tell_screen_autowrap(player, {"This is a generic colorful screen. Someone should do something with it maybe, I dunno. Some code would probably help."});
_display_width_for
Referenced by
- #263:_tell_body line 2:
this:_display_width_for - #263:tell_screen line 3:
this:_display_width_for - #263:wrap_for_screen line 3:
this:_display_width_for
Source
1who = args[1]; 2len = `who.linelen ! ANY => 80'; 3"make positive"; 4len = (len > 0) ? len | (-len); 5return len;
_tell_body
Referenced by
none
Source
1{who, @stuff} = args; 2len = this:_display_width_for(who); 3bdr = this.border_width; 4border = (this.border_bgcolor + $su:space(bdr)) + $ansi.reset; 5string = (this.main_color + tostr(@stuff)) + $ansi.reset; 6player:tell(border, " ", $su:left(string, -((len - (bdr * 2)) - 2)), " ", border);
tell_screen
Referenced by
- #263:tell_screen_autowrap line 5:
this:tell_screen
Source
1":tell_screen(OBJ who, LIST lines) => tell 'who' lines, displayed in the screen. lines are not wrapped! (use tell_screen_autowrap for that) so make sure they're formatted properly."; 2{who, lines} = args; 3len = this:_display_width_for(who); 4bdr = this.border_width; 5dsp = (len - (bdr * 2)) - 2; 6border = (this.border_bgcolor + $su:space(bdr)) + $ansi.reset; 7header = ((this.border_bgcolor + this.title_color) + $su:left(" " + this:header(), -len)) + $ansi.reset; 8player:tell(header); 9for l in ({"", @lines, ""}) 10l = (typeof(l) == LIST) ? l | {l}; 11string = (this.main_color + tostr(@l)) + $ansi.reset; 12player:tell(border, " ", $su:left(string, -dsp), " ", border); 13endfor 14footer = (((this.border_bgcolor + this.title_color) + $su:right(this:footer(), len - 4)) + " ") + $ansi.reset; 15player:tell(footer);
tell_screen_autowrap
Referenced by
- #263:look_self line 1:
this:tell_screen_autowrap
Source
1":tell_screen_autowrap(OBJ who, LIST lines, STR color) => tell 'who' lines, wrapped to fit, in the screen. Optionally add color."; 2"equivalent to :tell_screen(who, :wrap_for_screen(who, lines [,color]))"; 3{who, lines, ?color = ""} = args; 4lines = this:wrap_for_screen(who, lines); 5this:tell_screen(player, lines);
wrap_for_screen
Referenced by
- #263:tell_screen_autowrap line 4:
this:wrap_for_screen
Source
1":wrap_for_screen(OBJ who, LIST lines [, STR color]) => LIST wrapped_lines. wraps with the proper width for this screen as viewed by who. Optionally add color (& reset properly.)"; 2{who, lines, ?color = ""} = args; 3len = this:_display_width_for(who); 4bdr = this.border_width; 5dsp = (len - (bdr * 2)) - 2; 6return $su:word_wrap(lines, dsp, color);
footer header
Referenced by
- #263:tell_screen line 7:
this:header - #263:tell_screen line 14:
this:footer
Source
1return this.(verb);