|
From: <cro...@li...> - 2005-04-07 23:06:43
|
Module Name: CFJavaEditor
Committed By: cavesomething
Date: Thu Apr 7 23:06:36 UTC 2005
Modified Files:
CFJavaEditor/src/cfeditor: CMapPropertiesDialog.java MapArchObject.java
Log Message:
Changed map properties dialog to have a box for entering region, and made the editor not strip it out
Start of context diffs
Index: CFJavaEditor/src/cfeditor/CMapPropertiesDialog.java
diff -c CFJavaEditor/src/cfeditor/CMapPropertiesDialog.java:1.10 CFJavaEditor/src/cfeditor/CMapPropertiesDialog.java:1.11
*** CFJavaEditor/src/cfeditor/CMapPropertiesDialog.java:1.10 Thu Nov 18 07:35:38 2004
--- CFJavaEditor/src/cfeditor/CMapPropertiesDialog.java Thu Apr 7 16:06:34 2005
***************
*** 44,49 ****
--- 44,50 ----
private JTextArea m_textArea; // the msg text/arch text
private JTextArea m_loreArea; // the lore text
private JTextField m_nameField = new JTextField(); // name of arch
+ private JTextField m_regionField = new JTextField(); // map's region
private JTextField m_levelWidthField = new JTextField(); // len x
private JTextField m_levelHeightField = new JTextField(); // len y
private JCheckBox m_unique = new JCheckBox(); // map unique
***************
*** 119,124 ****
--- 120,126 ----
IGUIConstants.DIALOG_INSETS ) ) );
createPanelLine(mapPanel, m_nameField, 16, m_level.getMapName(), "Name: ");
+ createPanelLine(mapPanel, m_regionField, 16, map.getMapRegion(), "Region: ");
createPanelLine(mapPanel, m_levelWidthField, 10,
String.valueOf(m_level.getMapWidth()), "Width: ");
createPanelLine(mapPanel, m_levelHeightField, 10,
***************
*** 393,398 ****
--- 395,401 ----
int t_difficulty, t_darkness;
int t_temp, t_pressure, t_humid;
int t_winds, t_windd, t_sky;
+ String t_region;
// first check if the entries are all okay
try {
***************
*** 405,411 ****
t_reset_timeout = parseProperty(m_resetTimeout.getText(), "Reset Timeout");
t_difficulty = parseProperty(m_difficulty.getText(), "Difficulty");
t_darkness = parseProperty(m_darkness.getText(), "Darkness");
!
if (!IGUIConstants.isoView) {
t_temp = parseProperty(m_temp.getText(), "Temperature");
t_pressure = parseProperty(m_pressure.getText(), "Pressure");
--- 408,415 ----
t_reset_timeout = parseProperty(m_resetTimeout.getText(), "Reset Timeout");
t_difficulty = parseProperty(m_difficulty.getText(), "Difficulty");
t_darkness = parseProperty(m_darkness.getText(), "Darkness");
! t_region = m_regionField.getText();
!
if (!IGUIConstants.isoView) {
t_temp = parseProperty(m_temp.getText(), "Temperature");
t_pressure = parseProperty(m_pressure.getText(), "Pressure");
***************
*** 458,463 ****
--- 462,468 ----
m_control.setLevelProperties (m_level, m_textArea.getText(), m_loreArea.getText(),
m_nameField.getText(), t_width, t_height);
+ map.setMapRegion(t_region);
map.setEnterX(t_enter_x);
map.setEnterY(t_enter_y);
map.setResetTimeout(t_reset_timeout);
***************
*** 546,551 ****
--- 551,557 ----
m_textArea.setText(m_level.getMapText());
m_loreArea.setText(m_level.getMapLore());
m_nameField.setText(m_level.getMapName());
+ m_regionField.setText(""+map.getMapRegion());
m_levelWidthField.setText(""+map.getWidth());
m_levelHeightField.setText(""+map.getHeight());
m_enterX.setText(""+map.getEnterX());
Index: CFJavaEditor/src/cfeditor/MapArchObject.java
diff -c CFJavaEditor/src/cfeditor/MapArchObject.java:1.7 CFJavaEditor/src/cfeditor/MapArchObject.java:1.8
*** CFJavaEditor/src/cfeditor/MapArchObject.java:1.7 Sun Jan 9 14:05:35 2005
--- CFJavaEditor/src/cfeditor/MapArchObject.java Thu Apr 7 16:06:35 2005
***************
*** 89,94 ****
--- 89,95 ----
private String name; // map name (this is the name that appears in the game)
private String filename; // name of the map file
+ private String region; // the region the map is in
private String[] tile_path = new String[MAX_TILE]; // Used with map tiling. 0=north, 1=east, 2=south, 3=west
/**
***************
*** 156,161 ****
--- 157,164 ----
public void setOutdoor(boolean b) {outdoor=b;}
public String getTilePath(int n) {return tile_path[n];}
public void setTilePath(int n, String s) {tile_path[n]=s;}
+ public String getMapRegion() {return region;}
+ public void setMapRegion(String new_region) {region=new_region;}
public int getTemp() {return temp;}
public void setTemp(int t) {temp=t;}
***************
*** 307,312 ****
--- 310,317 ----
}
else if (line.startsWith("name"))
name = line.substring(line.indexOf(" ")+1).trim();
+ else if (line.startsWith("region"))
+ region = line.substring(line.indexOf(" ")+1).trim();
else if (line.startsWith("width") || line.startsWith("x "))
width = getLineValue(line);
else if (line.startsWith("height") || line.startsWith("y "))
***************
*** 440,446 ****
stream.write("arch map\n");
if (name.length() > 0)
stream.write("name "+name+"\n");
!
// maptext
stream.write(TAG_START_TEXT+"\n");
stream.write(msgText.toString().trim()+"\n");
--- 445,452 ----
stream.write("arch map\n");
if (name.length() > 0)
stream.write("name "+name+"\n");
! if (region.length() > 0)
! stream.write("region "+region+"\n");
// maptext
stream.write(TAG_START_TEXT+"\n");
stream.write(msgText.toString().trim()+"\n");
|