diff --git a/trunk/src/com/jpexs/decompiler/flash/SWF.java b/trunk/src/com/jpexs/decompiler/flash/SWF.java index 03272dd0b..c4bfd0dd9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWF.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWF.java @@ -219,6 +219,7 @@ public final class SWF implements TreeItem { public SWFSourceInfo sourceInfo; public String file; public String fileTitle; + public boolean isAS3; public HashMap characters; public List abcList; public JPEGTablesTag jtt; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/FontEmbedDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/FontEmbedDialog.java index 15d5365da..219ac958b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/FontEmbedDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/FontEmbedDialog.java @@ -88,7 +88,6 @@ public class FontEmbedDialog extends AppDialog implements ActionListener { return chars; } - @SuppressWarnings("unchecked") public FontEmbedDialog(String selectedFont, String selectedChars, int style) { setSize(900, 600); this.style = style; @@ -99,7 +98,7 @@ public class FontEmbedDialog extends AppDialog implements ActionListener { cnt.setLayout(new BoxLayout(cnt, BoxLayout.Y_AXIS)); individialSample = new JLabel(); - sourceFont = new JComboBox<>(new Vector(FontTag.fontNames)); + sourceFont = new JComboBox<>(new Vector<>(FontTag.fontNames)); sourceFont.setSelectedItem(selectedFont); cnt.add(sourceFont); JPanel rangesPanel = new JPanel(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromCacheFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromCacheFrame.java index cf1aab6af..dda5765f8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromCacheFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromCacheFrame.java @@ -197,7 +197,6 @@ public class LoadFromCacheFrame extends AppFrame implements ActionListener { } - @SuppressWarnings("unchecked") private void filter() { String search = searchField.getText(); List filtered = new ArrayList<>(); @@ -206,7 +205,7 @@ public class LoadFromCacheFrame extends AppFrame implements ActionListener { filtered.add(en); } } - list.setListData(new Vector(filtered)); + list.setListData(new Vector<>(filtered)); } private static String entryToFileName(CacheEntry en) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromMemoryFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromMemoryFrame.java index d30f01303..cbd903945 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromMemoryFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromMemoryFrame.java @@ -245,7 +245,6 @@ public class LoadFromMemoryFrame extends AppFrame implements ActionListener { } } - @SuppressWarnings("unchecked") public LoadFromMemoryFrame(final MainFrame mainFrame) { setSize(800, 600); //setAlwaysOnTop(true); @@ -291,7 +290,7 @@ public class LoadFromMemoryFrame extends AppFrame implements ActionListener { tableRes = new JTable(resTableModel); TableRowSorter sorter = new TableRowSorter<>(resTableModel); tableRes.setRowSorter(sorter); - list = new JList(model); + list = new JList<>(model); list.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 3458723f8..71ad6da3e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -825,9 +825,11 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec swfs.add(swf); swf.abcList = abcList; - tagTree.setModel(new TagTreeModel(mainFrame, swfs)); - + boolean hasAbc = !abcList.isEmpty(); + swf.isAS3 = hasAbc; + + tagTree.setModel(new TagTreeModel(mainFrame, swfs)); if (hasAbc) { if (abcPanel == null) { @@ -1448,11 +1450,15 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec if (searchDialog.result) { final String txt = searchDialog.searchField.getText(); if (!txt.isEmpty()) { - if (abcPanel != null) { - new CancellableWorker() { - @Override - protected Void doInBackground() throws Exception { - if (abcPanel.search(txt, searchDialog.ignoreCaseCheckBox.isSelected(), searchDialog.regexpCheckBox.isSelected())) { + final SWF swf = getCurrentSwf(); + + new CancellableWorker() { + @Override + protected Void doInBackground() throws Exception { + boolean found = false; + if (swf.isAS3) { + if (abcPanel != null && abcPanel.search(txt, searchDialog.ignoreCaseCheckBox.isSelected(), searchDialog.regexpCheckBox.isSelected())) { + found = true; View.execInEventDispatch(new Runnable() { @Override public void run() { @@ -1460,17 +1466,10 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec showCard(CARDACTIONSCRIPT3PANEL); } }); - } else { - View.showMessageDialog(null, translate("message.search.notfound").replace("%searchtext%", txt), translate("message.search.notfound.title"), JOptionPane.INFORMATION_MESSAGE); } - return null; - } - }.execute(); - } else { - new CancellableWorker() { - @Override - protected Void doInBackground() { + } else { if (actionPanel.search(txt, searchDialog.ignoreCaseCheckBox.isSelected(), searchDialog.regexpCheckBox.isSelected())) { + found = true; View.execInEventDispatch(new Runnable() { @Override public void run() { @@ -1478,16 +1477,30 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } }); } else { - View.showMessageDialog(null, translate("message.search.notfound").replace("%searchtext%", txt), translate("message.search.notfound.title"), JOptionPane.INFORMATION_MESSAGE); } - return null; } - }.execute(); - } + + if (!found && searchDialog.searchInTextsCheckBox.isSelected()) { + if (searchText(txt, searchDialog.ignoreCaseCheckBox.isSelected(), searchDialog.regexpCheckBox.isSelected(), swf)) { + found = true; + } + } + + if (!found) { + View.showMessageDialog(null, translate("message.search.notfound").replace("%searchtext%", txt), translate("message.search.notfound.title"), JOptionPane.INFORMATION_MESSAGE); + } + + return null; + } + }.execute(); } } } + private boolean searchText(String txt, boolean ignoreCase, boolean regexp, SWF swf) { + return false; + } + public void autoDeobfuscateChanged() { clearCache(); if (abcPanel != null) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/SearchDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/SearchDialog.java index 6461cd732..ea55b6fd2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/SearchDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/SearchDialog.java @@ -44,6 +44,7 @@ public class SearchDialog extends AppDialog implements ActionListener { public JTextField searchField = new MyTextField(); public JCheckBox ignoreCaseCheckBox = new JCheckBox(translate("checkbox.ignorecase")); public JCheckBox regexpCheckBox = new JCheckBox(translate("checkbox.regexp")); + public JCheckBox searchInTextsCheckBox = new JCheckBox(translate("checkbox.searchText")); public boolean result = false; public SearchDialog() { @@ -65,10 +66,15 @@ public class SearchDialog extends AppDialog implements ActionListener { panField.add(new JLabel(translate("label.searchtext"))); panField.add(searchField); cnt.add(panField); + JPanel checkPanel = new JPanel(new FlowLayout()); checkPanel.add(ignoreCaseCheckBox); checkPanel.add(regexpCheckBox); + // todo: honfika: add checkbox when text search is implemented + //searchInTextsCheckBox.setSelected(true); + //checkPanel.add(searchInTextsCheckBox); cnt.add(checkPanel); + cnt.add(panButtons); getRootPane().setDefaultButton(okButton); View.centerScreen(this); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 3068f58ad..bc2315287 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -82,7 +82,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr public TraitsList navigator; public ABC abc; public SWF swf; - public JComboBox abcComboBox; + public JComboBox abcComboBox; public int listIndex = -1; public DecompiledEditorPane decompiledTextArea; public JScrollPane decompiledScrollPane; @@ -90,7 +90,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr //public JSplitPane splitPaneTreeVSNavigator; //public JSplitPane splitPaneTreeNavVSDecompiledDetail; private JTable constantTable; - public JComboBox constantTypeList; + public JComboBox constantTypeList; public JLabel asmLabel = new HeaderLabel(AppStrings.translate("panel.disassembled")); public JLabel decLabel = new HeaderLabel(AppStrings.translate("panel.decompiled")); public DetailPanel detailPanel; @@ -266,7 +266,6 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr //colModel.getColumn(0).setMaxWidth(50); } - @SuppressWarnings("unchecked") public void clearSwf() { this.swf = null; this.abc = null; @@ -275,7 +274,6 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr navigator.clearABC(); } - @SuppressWarnings("unchecked") public void setSwf(SWF swf) { if (this.swf != swf) { this.swf = swf; @@ -331,7 +329,6 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr Helper.emptyObject(this); } - @SuppressWarnings("unchecked") public ABCPanel(MainPanel mainPanel) { DefaultSyntaxKit.initKit(); @@ -392,7 +389,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr JPanel pan2 = new JPanel(); pan2.setLayout(new BorderLayout()); - pan2.add((abcComboBox = new JComboBox(new ABCComboBoxModel(new ArrayList()))), BorderLayout.NORTH); + pan2.add((abcComboBox = new JComboBox<>(new ABCComboBoxModel(new ArrayList()))), BorderLayout.NORTH); navigator = new TraitsList(this); @@ -468,7 +465,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr JPanel panConstants = new JPanel(); panConstants.setLayout(new BorderLayout()); - constantTypeList = new JComboBox(new Object[]{"UINT", "INT", "DOUBLE", "DECIMAL", "STRING", "NAMESPACE", "NAMESPACESET", "MULTINAME"}); + constantTypeList = new JComboBox<>(new String[]{"UINT", "INT", "DOUBLE", "DECIMAL", "STRING", "NAMESPACE", "NAMESPACESET", "MULTINAME"}); constantTable = new JTable(); if (abc != null) { autoResizeColWidth(constantTable, new UIntTableModel(abc)); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java index af38ea6b3..f3d4d73d8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java @@ -55,29 +55,26 @@ public class TraitsList extends JList implements ListSelectionListener { setBackground(Color.white); } - @SuppressWarnings("unchecked") public void clearABC() { this.abc = null; this.abcTags = null; - setModel(new DefaultListModel()); + setModel(new DefaultListModel<>()); } - @SuppressWarnings("unchecked") public void setABC(List abcTags, ABC abc) { this.abc = abc; this.abcTags = abcTags; - setModel(new DefaultListModel()); + setModel(new DefaultListModel<>()); setClassIndex(-1, -1); } - @SuppressWarnings("unchecked") public void setClassIndex(int classIndex, int scriptIndex) { if (classIndex >= abc.instance_info.length) { return; } this.classIndex = classIndex; if (classIndex == -1) { - setModel(new DefaultListModel()); + setModel(new DefaultListModel<>()); } else { if (abc != null) { setModel(new TraitsListModel(abcTags, abc, classIndex, scriptIndex, sorted)); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java index 1464ee86d..b87df9386 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java @@ -25,7 +25,7 @@ import java.util.List; import javax.swing.ListModel; import javax.swing.event.ListDataListener; -public final class TraitsListModel implements ListModel { +public final class TraitsListModel implements ListModel { private List items; private List abcTags; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java index 78fb34d1b..46cf50ce0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java @@ -51,7 +51,6 @@ public class UsageFrame extends AppFrame implements ActionListener, MouseListene private ABC abc; private ABCPanel abcPanel; - @SuppressWarnings("unchecked") public UsageFrame(List abcTags, ABC abc, int multinameIndex, ABCPanel abcPanel) { this.abcPanel = abcPanel; List usages = abc.findMultinameUsage(multinameIndex); @@ -60,7 +59,7 @@ public class UsageFrame extends AppFrame implements ActionListener, MouseListene for (MultinameUsage u : usages) { usageListModel.addElement(u); } - usageList = new JList(usageListModel); + usageList = new JList<>(usageListModel); usageList.setBackground(Color.white); gotoButton.setActionCommand(ACTION_GOTO); gotoButton.addActionListener(this); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties index 17da85a1b..d91fac279 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties @@ -421,3 +421,5 @@ disassemblingProgress.deobfuscating = Deobfuscating decompilation.skipped = Decompilation skipped decompilation.unsupported = Unsupported by decompiler decompilerMark = decompiler mark + +fontNotFound = Font with id=%fontId% was not found. diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_fr.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_fr.properties index 643dddcac..a6208200e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_fr.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_fr.properties @@ -327,7 +327,7 @@ menu.general = G\u00e9n\u00e9ral menu.language = Langue startup.welcometo = Bienvenue dans -startup.selectopen = Cliquez sur le bouton OUVRIR ou glissez un fichier SWF dans cette fen\u00eatre pour commencer. +startup.selectopen = Cliquez sur le bouton OUVRIR ou glissez un fichier SWF vers cette fen\u00eatre pour commencer. error.font.nocharacter = La police s\u00e9lectionn\u00e9e ne contient pas le caract\u00e8re "%char%". @@ -394,7 +394,7 @@ menu.tools.otherTools = Autre menu.tools.otherTools.clearRecentFiles = Purger les fichiers r\u00e9cents fontName.name = Nom de la police de caract\u00e8res : fontName.copyright = Droits d'auteur concernant la police de caract\u00e8res : -button.preview = Aper\u00e9u +button.preview = Aper\u00e7u button.reset = Reset errors.info = Il y a des INFORMATIONS inscrites dans le journal. Cliquez pour le consulter. errors.warning = Il y a des ALARMES inscrites dans le journal. Cliquez pour le consulter. @@ -414,3 +414,10 @@ timeFormat.minute = minute timeFormat.minutes = minutes timeFormat.second = seconde timeFormat.seconds = secondes + +disassemblingProgress.toString = total trait\u00e9 +disassemblingProgress.reading = Lecture +disassemblingProgress.deobfuscating = D\u00e9sobfuscation +decompilation.skipped = D\u00e9compilation abandonn\u00e9 +decompilation.unsupported = Non support\u00e9 par le d\u00e9compileur +decompilerMark = Marqueur du d\u00e9compileur diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties index b2beb2d0a..50bbc9d38 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties @@ -421,3 +421,5 @@ disassemblingProgress.deobfuscating = Deobfuszk\u00e1l\u00e1s decompilation.skipped = Visszaford\u00edt\u00e1s mell\u0151zve decompilation.unsupported = Visszaford\u00edt\u00e1s nem t\u00e1mogatott decompilerMark = visszaford\u00edt\u00e1si jel + +fontNotFound = Bet\u0171t\u00edpus (id=%fontId%) nem tal\u00e1lhat\u00f3. diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties index 61e24eecd..a77b0cfe7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties @@ -416,7 +416,7 @@ timeFormat.minutes = \u043c\u0438\u043d. timeFormat.second = \u0441\u0435\u043a. timeFormat.seconds = \u0441\u0435\u043a. -disassemblingProgress.toString = toString +disassemblingProgress.toString = \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u043a disassemblingProgress.reading = \u0427\u0442\u0435\u043d\u0438\u0435 disassemblingProgress.deobfuscating = \u0414\u0435\u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044f decompilation.skipped = \u0414\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u0430 diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/SearchDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/SearchDialog.properties index 5b5f53c39..72f539391 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/SearchDialog.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/SearchDialog.properties @@ -20,4 +20,6 @@ label.searchtext = Search text: dialog.title = ActionScript search error = Error -error.invalidregexp = Invalid pattern \ No newline at end of file +error.invalidregexp = Invalid pattern + +checkbox.searchText = Search in texts diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/SearchDialog_hu.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/SearchDialog_hu.properties index 1cef50708..6466c54fd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/SearchDialog_hu.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/SearchDialog_hu.properties @@ -20,4 +20,6 @@ label.searchtext = Keresett sz\u00f6veg: dialog.title = ActionScript keres\u00e9s error = Hiba -error.invalidregexp = \u00c9rv\u00e9nytelen minta \ No newline at end of file +error.invalidregexp = \u00c9rv\u00e9nytelen minta + +checkbox.searchText = Keres\u00e9s a sz\u00f6vegek k\u00f6z\u00f6tt diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java index 9d6c46cd6..9dfda81e6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java @@ -56,7 +56,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe static final String ACTION_REMOVE = "REMOVE"; private MainFrame mainFrame; - private JList swfList; + private JList swfList; private SWFListModel listModel; private JButton switchButton = new JButton(translate("proxy.start")); private boolean started = false; @@ -87,12 +87,11 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe /** * Constructor */ - @SuppressWarnings("unchecked") public ProxyFrame(final MainFrame mainFrame) { this.mainFrame = mainFrame; listModel = new SWFListModel(Configuration.getReplacements()); - swfList = new JList(listModel); + swfList = new JList<>(listModel); swfList.addMouseListener(this); swfList.setFont(new Font("Monospaced", Font.PLAIN, 12)); switchButton.addActionListener(this); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java index a2c8dc667..ee472378e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java @@ -28,7 +28,7 @@ import javax.swing.event.ListDataListener; * * @author JPEXS */ -public class SWFListModel implements ListModel { +public class SWFListModel implements ListModel { private List listeners = new ArrayList<>(); private List replacements; @@ -150,7 +150,7 @@ public class SWFListModel implements ListModel { * @return Element on index */ @Override - public Object getElementAt(int index) { + public Replacement getElementAt(int index) { return replacements.get(index); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java index 5181fed8d..15f9dd572 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.tags; +import com.jpexs.decompiler.flash.AppStrings; import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; @@ -158,7 +159,12 @@ public class DefineTextTag extends TextTag implements DrawableTag { if (params.length() > 0) { ret += "[" + params + "\r\n]"; } - ret += Helper.escapeString(rec.getText(tags, fnt)).replace("[", "\\[").replace("]", "\\]"); + + if (fnt == null) { + ret += AppStrings.translate("fontNotFound").replace("%fontId%", Integer.toString(rec.fontId)); + } else { + ret += Helper.escapeString(rec.getText(tags, fnt)).replace("[", "\\[").replace("]", "\\]"); + } } return ret; }