v2.5.1: fixed underscores in custom notes being used for highlighting
This commit is contained in:
Binary file not shown.
@@ -512,7 +512,8 @@ public class Item implements Bundlable {
|
|||||||
note = Notes.findCustomRecord(getClass());
|
note = Notes.findCustomRecord(getClass());
|
||||||
}
|
}
|
||||||
if (note != null){
|
if (note != null){
|
||||||
return Messages.get(this, "custom_note", note.title()) + "\n\n" + desc();
|
//we swap underscore(0x5F) with low macron(0x2CD) here to avoid highlighting in the item window
|
||||||
|
return Messages.get(this, "custom_note", note.title().replace('_', 'ˍ')) + "\n\n" + desc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,8 @@ public class Ring extends KindofMisc {
|
|||||||
} else if (Notes.findCustomRecord(customNoteID) == null) {
|
} else if (Notes.findCustomRecord(customNoteID) == null) {
|
||||||
Notes.CustomRecord note = Notes.findCustomRecord(getClass());
|
Notes.CustomRecord note = Notes.findCustomRecord(getClass());
|
||||||
if (note != null){
|
if (note != null){
|
||||||
desc = Messages.get(this, "custom_note", note.title()) + "\n\n" + super.info();
|
//we swap underscore(0x5F) with low macron(0x2CD) here to avoid highlighting in the item window
|
||||||
|
desc = Messages.get(this, "custom_note", note.title().replace('_', 'ˍ')) + "\n\n" + super.info();
|
||||||
} else {
|
} else {
|
||||||
desc = super.info();
|
desc = super.info();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -328,6 +328,10 @@ public class CustomNoteButton extends IconButton {
|
|||||||
resize(width, (int)delete.bottom());
|
resize(width, (int)delete.bottom());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean useHighlighting() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addNote(Notes.CustomRecord note, String promptTitle, String prompttext){
|
private static void addNote(Notes.CustomRecord note, String promptTitle, String prompttext){
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class WndTitledMessage extends Window {
|
|||||||
add(titlebar);
|
add(titlebar);
|
||||||
|
|
||||||
RenderedTextBlock text = PixelScene.renderTextBlock( 6 );
|
RenderedTextBlock text = PixelScene.renderTextBlock( 6 );
|
||||||
|
if (!useHighlighting()) text.setHightlighting(false);
|
||||||
text.text( message, width );
|
text.text( message, width );
|
||||||
text.setPos( titlebar.left(), titlebar.bottom() + 2*GAP );
|
text.setPos( titlebar.left(), titlebar.bottom() + 2*GAP );
|
||||||
add( text );
|
add( text );
|
||||||
@@ -66,4 +67,8 @@ public class WndTitledMessage extends Window {
|
|||||||
|
|
||||||
resize( width, (int)text.bottom() + 2 );
|
resize( width, (int)text.bottom() + 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean useHighlighting(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user