mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 12:50:46 +00:00
#805 Editor mode for Define*Texts added
This commit is contained in:
@@ -2214,6 +2214,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
reload(false);
|
||||
return;
|
||||
}
|
||||
|
||||
TreeItem treeItem = (TreeItem) e.getPath().getLastPathComponent();
|
||||
if (!(treeItem instanceof SWFList)) {
|
||||
SWF swf = treeItem.getSwf();
|
||||
@@ -2226,7 +2227,8 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
} else {
|
||||
updateUi();
|
||||
}
|
||||
previewPanel.setEditText(false);
|
||||
|
||||
previewPanel.setEditText(Configuration.editorMode.get());
|
||||
reload(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -169,6 +169,10 @@ public class TextPanel extends JPanel {
|
||||
|
||||
public void setEditText(boolean edit) {
|
||||
textValue.setEditable(edit);
|
||||
updateButtonsVisibility(edit);
|
||||
}
|
||||
|
||||
private void updateButtonsVisibility(boolean edit) {
|
||||
textSaveButton.setVisible(edit);
|
||||
textEditButton.setVisible(!edit);
|
||||
textCancelButton.setVisible(edit);
|
||||
@@ -227,7 +231,7 @@ public class TextPanel extends JPanel {
|
||||
if (item instanceof TextTag) {
|
||||
TextTag textTag = (TextTag) item;
|
||||
if (mainPanel.alignText(textTag, textAlign)) {
|
||||
setEditText(false);
|
||||
updateButtonsVisibility(textValue.isEditable());
|
||||
item.getSwf().clearImageCache();
|
||||
mainPanel.refreshTree();
|
||||
}
|
||||
@@ -239,7 +243,7 @@ public class TextPanel extends JPanel {
|
||||
if (item instanceof TextTag) {
|
||||
TextTag textTag = (TextTag) item;
|
||||
if (mainPanel.translateText(textTag, delta)) {
|
||||
setEditText(false);
|
||||
updateButtonsVisibility(textValue.isEditable());
|
||||
item.getSwf().clearImageCache();
|
||||
mainPanel.refreshTree();
|
||||
}
|
||||
|
||||
@@ -317,3 +317,6 @@ config.description.showTraitSavedMessage = Show again trait saved message
|
||||
|
||||
config.name.updateProxyAddress = Http Proxy address for checking updates
|
||||
config.description.updateProxyAddress = Http Proxy address for checking updates. Format: example.com:8080
|
||||
|
||||
config.name.editorMode = Editor Mode
|
||||
config.description.editorMode = Make text areas edittable automatically when you select a Text or Script node
|
||||
|
||||
Reference in New Issue
Block a user