|
@@ -44,6 +44,7 @@ module RpgCards {
|
44
|
44
|
count: number;
|
45
|
45
|
title: string;
|
46
|
46
|
title_size: string;
|
|
47
|
+ title_icon_text: string;
|
47
|
48
|
color: string;
|
48
|
49
|
color_front: string;
|
49
|
50
|
color_back: string;
|
|
@@ -59,6 +60,7 @@ module RpgCards {
|
59
|
60
|
this.count = 1;
|
60
|
61
|
this.title = "New card";
|
61
|
62
|
this.title_size = null;
|
|
63
|
+ this.title_icon_text = null;
|
62
|
64
|
this.color = null;
|
63
|
65
|
this.color_front = null;
|
64
|
66
|
this.color_back = null;
|
|
@@ -75,6 +77,7 @@ module RpgCards {
|
75
|
77
|
result.count = json.count || 1;
|
76
|
78
|
result.title = json.title || "";
|
77
|
79
|
result.title_size = json.title_size || null;
|
|
80
|
+ result.title_icon_text = json.title_icon_text || null;
|
78
|
81
|
result.color = json.color || null;
|
79
|
82
|
result.color_front = json.color_front || null;
|
80
|
83
|
result.color_back = json.color_back || null;
|
|
@@ -91,6 +94,7 @@ module RpgCards {
|
91
|
94
|
count: this.count,
|
92
|
95
|
title: this.title,
|
93
|
96
|
title_size: this.title_size,
|
|
97
|
+ title_icon_text: this.title_icon_text,
|
94
|
98
|
color: this.color,
|
95
|
99
|
color_front: this.color_front,
|
96
|
100
|
color_back: this.color_back,
|
|
@@ -132,6 +136,9 @@ module RpgCards {
|
132
|
136
|
public getTitleSize(options: Options): string {
|
133
|
137
|
return this.title_size || options.default_title_size || "13";
|
134
|
138
|
}
|
|
139
|
+ public getTitleIconText(options: Options): string {
|
|
140
|
+ return this.title_icon_text || "";
|
|
141
|
+ }
|
135
|
142
|
public getColorFront(options: Options): string {
|
136
|
143
|
return this.color_front || this.color || options.default_color || "black";
|
137
|
144
|
}
|
|
@@ -347,12 +354,13 @@ module RpgCards {
|
347
|
354
|
|
348
|
355
|
private _title(card: Card, options: Options, ind: string, ind0: string): string {
|
349
|
356
|
var title = card.getTitle(options);
|
350
|
|
- var title_size = card.getTitleSize(options)
|
|
357
|
+ var title_size = card.getTitleSize(options);
|
|
358
|
+ var title_icon_text = card.getTitleIconText(options);
|
351
|
359
|
var icon = card.getIconFront(options);
|
352
|
360
|
var result = "";
|
353
|
361
|
result += ind + '<card-title size="' + title_size + '">\n';
|
354
|
362
|
result += ind + ind0 + '<h1>' + title + '</h1>\n';
|
355
|
|
- result += ind + ind0 + '<h2>' + "" + '</h2>\n';
|
|
363
|
+ result += ind + ind0 + '<h2>' + title_icon_text + '</h2>\n';
|
356
|
364
|
result += this._icon(icon, ind + ind0, ind0);
|
357
|
365
|
result += ind + '</card-title>\n';
|
358
|
366
|
return result;
|