From 18 Jan, 2021 0:00 UTC: All services will be temporary unavailable for maintenance
  • R/O
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

無人機動兵器ダンジョン探索ゲーム JAVAベース


Commit MetaInfo

修订版32 (tree)
时间2015-06-26 18:05:45
作者manjihq

Log Message

ハードウェア設計画面の調整
ステータス表示のソフトチップ部分で例外が発生するのを修正

更改概述

差异

--- CarnageHack2/trunk/src/CarnageHack/OkeSoftTracePanel.java (revision 31)
+++ CarnageHack2/trunk/src/CarnageHack/OkeSoftTracePanel.java (revision 32)
@@ -84,8 +84,8 @@
8484 for (y = 0; y < OkeSoftData.CHIPMAXY; y++) {
8585 for (x = 0; x < OkeSoftData.CHIPMAXX; x++) {
8686 OkeSoftChip chip = software.get(x, y);
87- if (chip.nullchip() == false) {
88- offg.setColor(software.get(x, y).is_condchip()
87+ if (chip != null && chip.nullchip() == false) {
88+ offg.setColor(chip.is_condchip()
8989 ? condCodeColor : normalCodeColor);
9090 offg.fillRect(x * viewChipWidth + 2 + 1,
9191 y * viewChipHeight + 2 + 1,
--- CarnageHack2/trunk/src/CarnageHack/OkeHardPanel.java (revision 31)
+++ CarnageHack2/trunk/src/CarnageHack/OkeHardPanel.java (revision 32)
@@ -63,12 +63,14 @@
6363 setLayout(layout);
6464
6565 gbc.fill = GridBagConstraints.BOTH;
66+ gbc.ipadx = 4;
67+ gbc.gridwidth = 1;
6668 gbc.weightx = 1.0;
6769 label = new Label(
6870 CarnageHack.resource.getString("hardwareMAIN_WEAPON"));
6971 layout.setConstraints(label, gbc);
7072 add(label);
71- gbc.weightx = 1.0;
73+ gbc.anchor = GridBagConstraints.WEST;
7274 choice = new Choice();
7375 choice.addItemListener(new OkeHardPanelChoiceEvent(this,
7476 "MAINWEAPON"));
@@ -77,16 +79,18 @@
7779 set_combo(choice, main_weapon_list);
7880 main_bullette_max = hardware.get_main_bullette();
7981 gbc.gridwidth = GridBagConstraints.REMAINDER;
80- gbc.weightx = 1.0;
82+ gbc.anchor = GridBagConstraints.CENTER;
83+ gbc.weightx = 0;
8184 main_weapon_status = new Label();
8285 layout.setConstraints(main_weapon_status, gbc);
8386 add(main_weapon_status);
8487 gbc.gridwidth = 1;
88+ gbc.weightx = 1.0;
8589 label = new Label(CarnageHack.resource.getString("hardwareBULLETTE"));
8690 layout.setConstraints(label, gbc);
8791 add(label);
8892 gbc.gridwidth = GridBagConstraints.REMAINDER;
89- gbc.weightx = 1.0;
93+ gbc.weightx = 0;
9094 gbc.fill = GridBagConstraints.NONE;
9195 gbc.anchor = GridBagConstraints.WEST;
9296 text = new TextField(Integer.toString(main_bullette_max), 5);
@@ -103,11 +107,10 @@
103107 gbc.weightx = 1.0;
104108 gbc.fill = GridBagConstraints.BOTH;
105109 gbc.anchor = GridBagConstraints.CENTER;
106- label
107- = new Label(CarnageHack.resource.getString("hardwareSUB_WEAPON"));
110+ label = new Label(CarnageHack.resource.getString("hardwareSUB_WEAPON"));
108111 layout.setConstraints(label, gbc);
109112 add(label);
110- gbc.weightx = 1.0;
113+ gbc.anchor = GridBagConstraints.WEST;
111114 choice = new Choice();
112115 choice.addItemListener(new OkeHardPanelChoiceEvent(this,
113116 "SUBWEAPON"));
@@ -116,16 +119,18 @@
116119 set_combo(choice, sub_weapon_list);
117120 sub_bullette_max = hardware.get_sub_bullette();
118121 gbc.gridwidth = GridBagConstraints.REMAINDER;
119- gbc.weightx = 1.0;
122+ gbc.anchor = GridBagConstraints.CENTER;
123+ gbc.weightx = 0;
120124 sub_weapon_status = new Label();
121125 layout.setConstraints(sub_weapon_status, gbc);
122126 add(sub_weapon_status);
123127 gbc.gridwidth = 1;
128+ gbc.weightx = 1.0;
124129 label = new Label(CarnageHack.resource.getString("hardwareBULLETTE"));
125130 layout.setConstraints(label, gbc);
126131 add(label);
127132 gbc.gridwidth = GridBagConstraints.REMAINDER;
128- gbc.weightx = 1.0;
133+ gbc.weightx = 0;
129134 gbc.fill = GridBagConstraints.NONE;
130135 gbc.anchor = GridBagConstraints.WEST;
131136 text = new TextField(Integer.toString(sub_bullette_max), 5);
@@ -145,7 +150,7 @@
145150 label = new Label(CarnageHack.resource.getString("hardwareCPU"));
146151 layout.setConstraints(label, gbc);
147152 add(label);
148- gbc.weightx = 1.0;
153+ gbc.anchor = GridBagConstraints.WEST;
149154 choice = new Choice();
150155 choice.addItemListener(new OkeHardPanelChoiceEvent(this, "CPU"));
151156 layout.setConstraints(choice, gbc);
@@ -152,7 +157,8 @@
152157 add(choice);
153158 set_combo(choice, cpu_list);
154159 gbc.gridwidth = GridBagConstraints.REMAINDER;
155- gbc.weightx = 1.0;
160+ gbc.weightx = 0;
161+ gbc.anchor = GridBagConstraints.CENTER;
156162 cpu_status = new Label();
157163 layout.setConstraints(cpu_status, gbc);
158164 add(cpu_status);
@@ -165,7 +171,7 @@
165171 label = new Label(CarnageHack.resource.getString("hardwareENGINE"));
166172 layout.setConstraints(label, gbc);
167173 add(label);
168- gbc.weightx = 1.0;
174+ gbc.anchor = GridBagConstraints.WEST;
169175 choice = new Choice();
170176 choice.addItemListener(new OkeHardPanelChoiceEvent(this, "ENGINE"));
171177 layout.setConstraints(choice, gbc);
@@ -172,7 +178,8 @@
172178 add(choice);
173179 set_combo(choice, engine_list);
174180 gbc.gridwidth = GridBagConstraints.REMAINDER;
175- gbc.weightx = 1.0;
181+ gbc.weightx = 0;
182+ gbc.anchor = GridBagConstraints.CENTER;
176183 engine_status = new Label();
177184 layout.setConstraints(engine_status, gbc);
178185 add(engine_status);
@@ -185,7 +192,7 @@
185192 label = new Label(CarnageHack.resource.getString("hardwareARMOR"));
186193 layout.setConstraints(label, gbc);
187194 add(label);
188- gbc.weightx = 1.0;
195+ gbc.anchor = GridBagConstraints.WEST;
189196 choice = new Choice();
190197 choice.addItemListener(new OkeHardPanelChoiceEvent(this, "ARMOR"));
191198 layout.setConstraints(choice, gbc);
@@ -192,7 +199,8 @@
192199 add(choice);
193200 set_combo(choice, armor_list);
194201 gbc.gridwidth = GridBagConstraints.REMAINDER;
195- gbc.weightx = 1.0;
202+ gbc.weightx = 0;
203+ gbc.anchor = GridBagConstraints.CENTER;
196204 armor_status = new Label();
197205 layout.setConstraints(armor_status, gbc);
198206 add(armor_status);
@@ -205,7 +213,7 @@
205213 label = new Label(CarnageHack.resource.getString("hardwareFUELTANK"));
206214 layout.setConstraints(label, gbc);
207215 add(label);
208- gbc.weightx = 1.0;
216+ gbc.anchor = GridBagConstraints.WEST;
209217 choice = new Choice();
210218 choice.addItemListener(new OkeHardPanelChoiceEvent(this, "FUELTANK"));
211219 layout.setConstraints(choice, gbc);
@@ -212,7 +220,8 @@
212220 add(choice);
213221 set_combo(choice, fueltank_list);
214222 gbc.gridwidth = GridBagConstraints.REMAINDER;
215- gbc.weightx = 1.0;
223+ gbc.weightx = 0;
224+ gbc.anchor = GridBagConstraints.CENTER;
216225 fueltank_status = new Label();
217226 layout.setConstraints(fueltank_status, gbc);
218227 add(fueltank_status);
@@ -225,7 +234,7 @@
225234 label = new Label(CarnageHack.resource.getString("hardwareOPTION"));
226235 layout.setConstraints(label, gbc);
227236 add(label);
228- gbc.weightx = 1.0;
237+ gbc.anchor = GridBagConstraints.WEST;
229238 choice = new Choice();
230239 choice.addItemListener(new OkeHardPanelChoiceEvent(this, "OPTION"));
231240 layout.setConstraints(choice, gbc);
@@ -232,7 +241,8 @@
232241 add(choice);
233242 set_combo(choice, option_list);
234243 gbc.gridwidth = GridBagConstraints.REMAINDER;
235- gbc.weightx = 1.0;
244+ gbc.weightx = 0;
245+ gbc.anchor = GridBagConstraints.CENTER;
236246 option_status = new Label();
237247 layout.setConstraints(option_status, gbc);
238248 add(option_status);
@@ -271,8 +281,6 @@
271281 layout.setConstraints(dummy, gbc);
272282 add(dummy);
273283
274- gbc.gridwidth = GridBagConstraints.REMAINDER;
275- gbc.weightx = 0.0;
276284 dummy = new Panel(); //ダミー
277285 layout.setConstraints(dummy, gbc);
278286 add(dummy);
@@ -417,9 +425,6 @@
417425 wk += "("
418426 + CarnageHack.resource.getString("hardwareMOBILTY")
419427 + nspeed + ")";
420- for (i = wk.length(); i <= 80; i++) {
421- wk += " ";
422- }
423428 total_weight.setText(wk);
424429 }
425430 }
@@ -610,6 +615,9 @@
610615 }
611616 }
612617 update_total_weight();
618+ if (getParent() != null) {
619+ getParent().validate();
620+ }
613621 }
614622
615623 public void action(TextField text, String cmd) {