You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <aki...@us...> - 2006-11-30 22:04:47
|
Revision: 759 http://svn.sourceforge.net/gridarta/?rev=759&view=rev Author: akirschbaum Date: 2006-11-30 14:02:41 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Update archetypes, images and treasurelists. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/archetypes trunk/crossfire/resource/conf/crossfire.0 trunk/crossfire/resource/conf/treasures Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-11-30 20:02:11 UTC (rev 758) +++ trunk/crossfire/ChangeLog 2006-11-30 22:02:41 UTC (rev 759) @@ -1,3 +1,7 @@ +2006-11-30 Andreas Kirschbaum + + * Update archetypes, images and treasurelists. + 2006-11-29 Andreas Kirschbaum * Properly center error message in create new pickmap dialog. Modified: trunk/crossfire/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/conf/archetypes 2006-11-30 20:02:11 UTC (rev 758) +++ trunk/crossfire/resource/conf/archetypes 2006-11-30 22:02:41 UTC (rev 759) @@ -1,15485 +1,10696 @@ -Object door_0 -name door -face door_0.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 +Object elvenboots +name elven boots +name_pl elven boots +client_type 290 +nrof 1 +face elvenboots.111 +value 30000 +weight 500 +type 99 +exp 3 +material 8 +stealth 1 +editable 5120 +item_power 3 +body_foot -2 +editor_folder armour/boots end -Object door_1_1 -name door -face door_1.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 +Object high_boots +name jack boots +name_pl jack boots +client_type 291 +face high_boots.111 +value 60 +weight 6500 +ac 1 +nrof 1 +resist_physical 4 +type 99 +material 8 +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object door_1_3 -name door -face door_2.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 +Object high_boots_b +name jack boots +name_pl jack boots +client_type 291 +face high_boots_b.111 +value 1700 +weight 6500 +ac 1 +nrof 1 +Cha 1 +resist_death 1 +resist_physical 4 +type 99 +material 8 +materialname black leather +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object door_2_2_1 -name door -face door_3.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_1_2 -name door -face door_4.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_1_1 -name door -face door_5.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_2_2 -name door -face door_6.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_3_2 -name door -face door_7.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_1_4 -name door -face door_8.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_2_4 -name door -face door_9.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_1_2 -name door -face door_A.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_3_1 -name door -face door_B.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_2_3 -name door -face door_C.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_3_4 -name door -face door_D.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_3_3 -name door -face door_E.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_4 -name door -face door_F.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object locked_door1 -name locked door -face ldoor1.111 -type 20 -editor_folder door/Locked -msg -You need the special key to open this door. -endmsg -slaying set_individual_value -no_pass 1 -no_pick 1 -no_magic 1 -damned 1 -end -Object locked_door2 -name locked door -face ldoor2.111 -type 20 -editor_folder door/Locked -msg -You need the special key to open this door. -endmsg -slaying set_individual_value -no_pass 1 -no_pick 1 -no_magic 1 -damned 1 -end -Object key2 -name strange key -face key2.111 -type 21 -editor_folder door/Locked -race keys -slaying set_individual_value -value 100 -weight 100 -name_pl strange keys -client_type 810 -end -Object odoor_2_fant_blue-green -name door -face odoor_2_fant_blue-green.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object odoor_2_fant_blue-yellow -name door -face odoor_2_fant_blue-yellow.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object odoor_2_fant_brown -name door -face odoor_2_fant_brown.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object odoor_2_fant_red-white -name door -face odoor_2_fant_red-white.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object odoor_2_fant_red-yellow -name door -face odoor_2_fant_red-yellow.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_1 -name door -face odoor_1.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2 -name door -face odoor_2.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_look_1 -name door -face wooddoor_1.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -hp 400 -exp 1 -ac 10 +Object high_boots_b_d +name jack boots +name_pl jack boots +client_type 291 +face high_boots_b.111 +title of death +value 30000 +weight 13000 +ac 1 +nrof 1 +Cha 1 +resist_death 25 +resist_physical 25 +type 99 material 2 -no_pick 1 -alive 1 -level 1 -pass_thru 1 +materialname black steel +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object door_look_2 -name door -face wooddoor_2.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -hp 400 -exp 1 -ac 10 -material 2 -no_pick 1 -alive 1 -level 1 -pass_thru 1 +Object high_boots_w +name jack boots +name_pl jack boots +client_type 291 +face high_boots_w.111 +value 2000 +weight 6500 +ac 1 +nrof 1 +Cha 1 +resist_blind 1 +resist_physical 4 +type 99 +material 8 +materialname white leather +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object key -face key1.111 -type 24 -editor_folder door/door -race keys +Object high_boots_w_l +name jack boots +name_pl jack boots +client_type 291 +face high_boots_w.111 +title of light +value 40000 +weight 13000 +ac 1 nrof 1 +Cha 1 +resist_blind 25 +resist_physical 25 +type 99 material 2 -value 10 -weight 10 -name_pl keys -client_type 801 +materialname white steel +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object town_1 -name village -face jcity_0.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -Object town_2 -name small town -face jcity_2.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_2.2 -name small town -face jcity_8.111 -type 66 -no_pick 1 -x 1 -end -Object town_3 -name small town -face jcity_4.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_3.2 -name small town -face jcity_1.111 -type 66 -no_pick 1 -y 1 -end -Object town_4 -name medium town -face jcity_6.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_4.2 -name medium town -face jcity_C.111 -type 66 -no_pick 1 -x 1 -end -More -Object town_4.3 -name medium town -face jcity_3.111 -type 66 -no_pick 1 -y 1 -end -More -Object town_4.4 -name medium town -face jcity_9.111 -type 66 -no_pick 1 -x 1 -y 1 -end -Object town_5 -name city -face jcity_6.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_5.2 -name city -face jcity_E.111 -type 66 -no_pick 1 -x 1 -end -More -Object town_5.3 -name city -face jcity_C.111 -type 66 -no_pick 1 -x 2 -end -More -Object town_5.4 -name city -face jcity_3.111 -type 66 -no_pick 1 -y 1 -end -More -Object town_5.5 -name city -face jcity_B.111 -type 66 -no_pick 1 -x 1 -y 1 -end -More -Object town_5.6 -name city -face jcity_9.111 -type 66 -no_pick 1 -x 2 -y 1 -end -Object town_6 -name city -face jcity_6.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_6.2 -name city -face jcity_C.111 -type 66 -no_pick 1 -x 1 -end -More -Object town_6.3 -name city -face jcity_7.111 -type 66 -no_pick 1 -y 1 -end -More -Object town_6.4 -name city -face jcity_D.111 -type 66 -no_pick 1 -x 1 -y 1 -end -More -Object town_6.5 -name city -face jcity_3.111 -type 66 -no_pick 1 -y 2 -end -More -Object town_6.6 -name city -face jcity_9.111 -type 66 -no_pick 1 -x 1 -y 2 -end -Object town_7 -name large city -face jcity_6.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_7.2 -name large city -face jcity_E.111 -type 66 -no_pick 1 -x 1 -end -More -Object town_7.3 -name large city -face jcity_C.111 -type 66 -no_pick 1 -x 2 -end -More -Object town_7.4 -name large city -face jcity_7.111 -type 66 -no_pick 1 -y 1 -end -More -Object town_7.5 -name large city -face jcity_F.111 -type 66 -no_pick 1 -x 1 -y 1 -end -More -Object town_7.6 -name large city -face jcity_D.111 -type 66 -no_pick 1 -x 2 -y 1 -end -More -Object town_7.7 -name large city -face jcity_3.111 -type 66 -no_pick 1 -y 2 -end -More -Object town_7.8 -name large city -face jcity_B.111 -type 66 -no_pick 1 -x 1 -y 2 -end -More -Object town_7.9 -name large city -face jcity_9.111 -type 66 -no_pick 1 -x 2 -y 2 -end -Object well -face well.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object dforest_exit -face darkforest.111 -type 66 -editor_folder exit/exit -no_pick 1 -is_floor 1 -walk_on 1 -smoothface darkforest.111 darkforest_S.111 -smoothlevel 136 -client_type 25012 -end -Object invis_exit -face exit.113 -type 66 -editor_folder exit/exit -invisible 1 -no_pick 1 -walk_on 1 -fly_on 1 -client_type 25012 -end -Object oakdoor -face oakdoor.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object volcano_high -name high volcano -face volcano_hi.111 -type 66 -editor_folder exit/exit -no_pick 1 -slow_move 20 -blocksview 1 -client_type 25012 -end -More -Object volcano_high_2 -name high volcano -face volcano_hi.211 -type 66 -no_pick 1 -slow_move 20 -blocksview 1 -x 1 -end -More -Object volcano_high_3 -name high volcano -face volcano_hi.311 -type 66 -no_pick 1 -slow_move 20 -blocksview 1 -y 1 -end -More -Object volcano_high_4 -name high volcano -face volcano_hi.411 -type 66 -no_pick 1 -slow_move 20 -blocksview 1 -x 1 -y 1 -end -Object ladder_down -name ladder going down -face ladder_down.111 -type 66 -editor_folder exit/Ladder -no_pick 1 -client_type 25012 -end -Object ladder_bi_up -name ladder going up -face ladder2_up.111 -type 66 -editor_folder exit/Ladder -no_pick 1 -client_type 25012 -end -Object ladder_up -name ladder going up -face ladder_up.111 -type 66 -editor_folder exit/Ladder -no_pick 1 -client_type 25012 -end -Object ladder_bi_down -name ladder going down -face ladder2_do.111 -type 66 -editor_folder exit/Ladder -no_pick 1 -client_type 25012 -end -Object volcano_low -name volcano -face volcano_lo.111 -type 66 -editor_folder exit/exit -no_pick 1 -slow_move 15 -blocksview 1 -client_type 25012 -end -More -Object volcano_low_2 -name volcano -face volcano_lo.211 -type 66 -no_pick 1 -slow_move 15 -blocksview 1 -x 1 -end -Object perm_magic_portal -name magic portal -face magic_portal.111 -type 66 -editor_folder exit/magic_portal -slaying /city/city -hp 15 -sp 19 +Object idaten +name Idaten boots +name_pl Idaten boots +client_type 290 +nrof 1 +exp 5 +face idaten.111 +animation idaten speed 0.3 -no_pick 1 -animation perm_magic_portal -client_type 25011 +exp 20 +value 50000 +weight 5000 +type 99 +material 8 +resist_physical 3 +editable 5120 +body_foot -2 +item_power 25 +editor_folder armour/boots end -Object magic_portal -face magic_portal.11L -type 66 -editor_folder exit/magic_portal -slaying /city/city -hp 15 -sp 19 -speed 0.3 -no_pick 1 -animation magic_portal -is_used_up 1 -food 59 -changing 1 -client_type 25011 +Object levitationboots +name levitation boots +name_pl levitation boots +client_type 290 +nrof 1 +face lev_boots.111 +value 35000 +weight 2500 +type 99 +material 8 +resist_physical 3 +flying 1 +editable 5120 +body_foot -2 +item_power 1 +map_layer item +editor_folder armour/boots end -Object chole_1 -name hole in the ground -face chole_1.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 +Object low_boots +name shoes +name_pl shoes +client_type 291 +face low_boots.111 +value 25 +weight 2000 +nrof 1 +ac 1 +resist_physical 1 +type 99 +material 8 +editable 1024 +body_foot -2 +gen_sp_armour 1 +editor_folder armour/boots end -Object chole_2 -name hole in the ground -face chole_2.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 +Object sandals +name sandals +name_pl sandals +client_type 291 +face sandals.111 +value 5 +weight 500 +resist_physical 1 +nrof 1 +type 99 +material 8 +editable 1024 +body_foot -2 +gen_sp_armour 1 +editor_folder armour/boots end -Object whirlwind_exit -name whirl wind -face stalkergen.111 -type 66 -editor_folder exit/exit +Object speedboots +name speed boots +name_pl speed boots +client_type 290 +nrof 1 +exp 6 +face speedboots.111 +animation speedboots speed 0.2 -no_pick 1 -animation whirlwind_exit -walk_on 1 -fly_on 1 -client_type 25012 +value 50000 +weight 5000 +type 99 +material 8 +resist_physical 3 +editable 5120 +body_foot -2 +item_power 6 +editor_folder armour/boots end -Object fogexit -name mysterous fog -face fog.111 -type 66 -editor_folder exit/exit -speed 0.2 -no_pick 1 -animation fogexit -walk_on 1 -fly_on 1 -client_type 25012 +Object bracers_ac +nrof 1 +name bracers +name_pl bracers +client_type 311 +type 104 +face bracers_ac.111 +ac 1 +value 1000 +material 2 +weight 3000 +editable 1024 +body_wrist -2 +editor_folder armour/bracers end -Object pentagram_111 -name pentagram -face pentagram.111 -type 41 -editor_folder exit/Pentagram -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 +Object bracers_dex +nrof 1 +name bracers +name_pl bracers +client_type 311 +title of dexterity +face bracersdex.111 +type 104 +Dex 2 +value 65000 +weight 3000 +editable 5120 +body_wrist -2 +item_power 2 +editor_folder armour/bracers end -More -Object pentagram_112 -name pentagram -face pentagram.112 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 1 +Object cloak +name cloak +name_pl cloaks +client_type 281 +type 87 +face cloak.111 +ac 0 +weight 5000 +value 40 +material 136 +editable 1024 +nrof 1 +body_shoulder -1 +editor_folder armour/cloak end -More -Object pentagram_113 -name pentagram -face pentagram.113 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 2 +Object magic_resist +name Cloak of Magic Resistance +name_pl Cloaks of Magic Resistance +client_type 280 +nrof 1 +type 87 +face magic_resist.111 +ac 0 +weight 5000 +value 220000 +startequip 1 +no_steal 1 +material 128 +materialname astolare +resist_magic 95 +editable 5120 +body_shoulder -1 +item_power 4 +editor_folder armour/cloak end -More -Object pentagram_121 -name pentagram -face pentagram.121 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -y 1 -end -More -Object pentagram_122 -name pentagram -face pentagram.122 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 1 -y 1 -end -More -Object pentagram_123 -name pentagram -face pentagram.123 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 2 -y 1 -end -More -Object pentagram_131 -name pentagram -face pentagram.131 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -y 2 -end -More -Object pentagram_132 -name pentagram -face pentagram.132 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 1 -y 2 -end -More -Object pentagram_133 -name pentagram -face pentagram.133 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 2 -y 2 -end -Object hole -face hole1.111 -type 66 -editor_folder exit/exit -no_pick 1 -is_floor 1 -smoothlevel 10 -smoothface hole1.111 grass_S.111 -client_type 25012 -end -Object sewer_access -name sewer -face sewer_access.111 -type 66 -editor_folder exit/exit -msg -You open the sewer access -grid and jump down. -My god, you are stinking! -endmsg -no_pick 1 -client_type 25012 -end -Object sewer_access2 -name sewer -face sewer_access.112 -type 66 -editor_folder exit/exit -msg -You open the sewer access -grid and jump down. -My god, you are stinking! -endmsg -no_pick 1 -client_type 25012 -end -Object ruins -face ruins.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object archway -face archwood.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object archway_green -face archgreen.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object archway_gold -face archgold.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object archway_tree -face archtree.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object exit -face exit.111 -type 66 -editor_folder exit/exit -speed 0.5 -no_pick 1 -animation exit -walk_on 1 -fly_on 1 -client_type 25012 -end -Object teleporter -face teleporter.111 -type 41 -editor_folder exit/exit -speed 0.1 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -animation teleporter -end -Object stair3_ystone_up -name stairs going up -face stair3_ystone_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_3_up -name stairs going up -face stair3_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair2_down -name stairs going down -face stair2_do.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair3_gstone_do -name stairs going down -face stair3_gstone_do.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair2_up -name stairs going up -face stair2_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair3_gstone_up -name stairs going up -face stair3_gstone_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down -name stairs going down -face stair_down.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up -name stairs going up -face stair_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up_1 -name stairs going up -face stair_up_1.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up_2 -name stairs going up -face stair_up_2.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up_3 -name stairs going up -face stair_up_3.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up_4 -name stairs going up -face stair_up_4.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair3_ystone_do -name stairs going down -face stair3_ystone_do.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_3_down -name stairs going down -face stair3_do.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down_1 -name stairs going down -face stair_down_1.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down_2 -name stairs going down -face stair_down_2.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down_3 -name stairs going down -face stair_down_3.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down_4 -name stairs going down -face stair_down_4.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object booze -face booze.111 -type 54 -editor_folder food/food -on_use_yield boozebottle_empty -food 100 +Object oilskin +name oilskin cloak +name_pl oilskin cloaks +client_type 280 +type 87 +face oilskin.111 +Dex -1 +ac 1 +resist_physical 3 +weight 1000 +value 120000 +material 8 +editable 5120 nrof 1 -material 32 -value 5 -weight 6500 -identified 1 -name_pl boozes -client_type 611 -slaying vial_poison:poison +resist_acid 70 +magic -4 +damned 1 +body_shoulder -1 +editor_folder armour/cloak end -Object apple_half -name apple halve -face apple_half.111 -type 6 -editor_folder food/food -name_pl apple halves -food 12 +Object serp_cloak +name serpent cloak +name_pl serpent cloaks +client_type 280 +type 87 +face serp_cloak.111 +ac 1 +weight 700 +resist_poison 30 +value 900 +material 8 +materialname snakeskin +editable 5120 nrof 1 -need_an 1 -material 32 -value 1 -weight 50 -identified 1 -client_type 601 -slaying b_slicingknife:2 apple_fourth +body_shoulder -1 +item_power 2 +editor_folder armour/cloak end -Object apple_fourth -name apple fourth -face apple_fourth.111 -type 6 -editor_folder food/food -name_pl apple fourths -food 6 +Object b_gauntlets nrof 1 -need_an 1 -material 32 -value 1 -weight 25 -identified 1 -client_type 601 -slaying b_slicingknife:2 apple_eighth +name gauntlets +client_type 305 +face b_gauntlet_s.111 +type 100 +resist_physical 2 +value 6 +nrof 1 +material 2 +materialname bronze +weight 1800 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object apple_eighth -name apple eighth -face apple_eighth.111 -type 6 -editor_folder food/food -name_pl apple eighths -food 3 +Object gauntlets nrof 1 -need_an 1 -material 32 -value 1 -weight 12 -identified 1 -client_type 601 +name gauntlets +client_type 305 +face gauntlet_s.111 +type 100 +resist_physical 3 +value 25 +nrof 1 +material 2 +weight 1800 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object cheeseburger -face ch_burger.111 -type 6 -editor_folder food/food -food 350 +Object gauntlets_dex nrof 1 -material 32 -value 10 -weight 6500 -identified 1 -client_type 601 +name gauntlets +client_type 305 +title of dexterity +face gauntlet_s.111 +type 100 +Dex 2 +resist_physical 3 +value 65000 +material 2 +weight 1800 +editable 5120 +body_hand -2 +item_power 1 +editor_folder armour/gauntlets end -Object waybread -face waybread.111 -type 6 -editor_folder food/food -food 500 +Object gauntlets_str nrof 1 -material 32 -value 30 -weight 1000 -identified 1 -name_pl waybreads -client_type 601 +name gauntlets +name_pl gauntlets +client_type 305 +title of strength +face gauntlet_s.111 +type 100 +Str 1 +resist_physical 3 +value 65000 +material 2 +weight 2000 +editable 5120 +body_hand -2 +item_power 0 +editor_folder armour/gauntlets end -Object apple -face apple.111 -type 6 -editor_folder food/food -food 25 +Object gloves nrof 1 -need_an 1 -material 32 -value 2 +name gloves +client_type 301 +face gloves.111 +type 100 +resist_physical 1 +nrof 1 +value 4 +material 8 weight 100 -identified 1 -name_pl apples -client_type 601 -slaying b_slicingknife:2 apple_half +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object chocolate -face chocolate.111 -type 6 -editor_folder food/food -food 50 +Object gloves_b nrof 1 -material 32 -value 10 +name gloves +client_type 301 +face gloves_b.111 +type 100 +resist_physical 1 +nrof 1 +value 64 +material 8 +materialname black leather weight 100 -identified 1 -name_pl chocolates -client_type 601 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object water -face water.111 -type 54 -editor_folder food/food -on_use_yield wbottle_empty -food 5 +Object gloves_w nrof 1 -material 32 -value 5 -weight 1500 -name_pl waters -client_type 611 -slaying vial_poison:water_poison +name gloves +client_type 301 +face gloves_w.111 +type 100 +resist_physical 1 +Cha 1 +resist_blind 2 +nrof 1 +value 6000 +material 8 +materialname white leather +weight 100 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object orcchop -name orc chop -face orcchop.111 -type 6 -editor_folder food/food -need_an 1 -food 10 +Object gloves_w_l nrof 1 -material 32 -value 1 -weight 650 -identified 1 -name_pl orc chops -client_type 624 +name gloves +client_type 301 +face gloves_w.111 +type 100 +resist_physical 20 +Cha 1 +resist_blind 20 +title of light +nrof 1 +value 42000 +material 2 +materialname white steel +weight 200 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object food -face food.111 -type 6 -editor_folder food/food -food 200 +Object god_finger nrof 1 -material 32 -value 10 -weight 6500 -identified 1 -name_pl foods -client_type 601 +name God Finger +name_pl God Fingers +client_type 300 +type 100 +face god_finger.111 +animation god_finger +speed .1 +Str 2 +Dex -1 +resist_physical 3 +dam +3 +make_invisible 1 +value 120000 +material 2 +weight 1800 +editable 5120 +body_hand -2 +item_power 2 +editor_folder armour/gauntlets end -Object leg_mutton -face food.111 -type 6 -editor_folder food/food -food 150 +Object shining_finger nrof 1 -material 32 -value 50 -weight 1500 -identified 1 -name_pl legs of mutton -name_pl leg of mutton -client_type 601 +name Shining Finger +name_pl Shining Fingers +client_type 300 +type 100 +face shining_finger.111 +animation shining_finger +speed .1 +Str 2 +resist_physical 3 +dam +3 +value 120000 +material 2 +weight 1800 +editable 5120 +body_hand -2 +item_power 1 +editor_folder armour/gauntlets end -Object cake -face cake.111 -type 6 -editor_folder food/food -food 125 +Object girdle_strcon nrof 1 -material 32 -value 8 -weight 3000 -identified 1 -name_pl cakes -client_type 601 +type 113 +name girdle +name_pl girdles +client_type 321 +title of fighting +face gir_strcon.111 +animation girdle_strcon +speed 0.1 +Str 1 +Con 1 +weight 2500 +value 75000 +material 8 +editable 5120 +body_waist -1 +item_power 1 +editor_folder armour/girdle end -Object s_weasel -name sizzling weasel on a stick -face s_weasel.111 -type 6 -editor_folder food/food -food 30 +Object girdle_con nrof 1 -material 32 -value 5 -weight 10 -identified 1 -name_pl sizzling weasels on a stick -client_type 601 +type 113 +name girdle +name_pl girdles +client_type 321 +title of constitution +face girdle_con.111 +animation girdle_con +speed 0.1 +Con 2 +weight 2500 +value 85000 +material 8 +editable 5120 +body_waist -1 +item_power 1 +editor_folder armour/girdle end -Object blackroot -name blackroot -face blackroot.111 -type 6 -editor_folder food/food -food 15 +Object girdle_dam nrof 1 -material 32 -value 300 -weight 300 -identified 1 -name_pl blackroot -client_type 601 +type 113 +name girdle +name_pl girdles +client_type 321 +title of damage +face girdle_dam.111 +animation girdle_dam +speed 0.1 +dam 10 +weight 2500 +value 70000 +material 8 +editable 5120 +body_waist -1 +item_power 1 +editor_folder armour/girdle end -Object uf6 -name uranium hexafluoride gas -face uf6.111 -type 54 -editor_folder food/food -on_use_yield wbottle_empty -food 1 +Object girdle_str nrof 1 -material 32 -value 155 -weight 11500 -name_pl uranium hexafluoride gas -client_type 611 +type 113 +name girdle +name_pl girdles +client_type 321 +title of strength +face girdle_str.111 +animation girdle_str +speed 0.1 +Str 2 +weight 2500 +value 80000 +material 8 +editable 5120 +body_waist -1 +item_power 1 +editor_folder armour/girdle end -Object bag_popcorn -name bag of popcorn -face bag_popcorn.111 -type 6 -editor_folder food/food -food 50 +Object a_helmet +name helmet +name_pl helmets +client_type 271 nrof 1 -material 32 -value 6 -weight 250 -identified 1 -name_pl bags of popcorn -client_type 601 +type 34 +face a_helmet.111 +weight 5000 +ac 1 +resist_physical 5 +value 14 +material 2 +editable 1024 +body_head -1 +gen_sp_armour 5 +editor_folder armour/helmet end -Object poison -name booze -face booze.111 -type 7 -editor_folder food/food -on_use_yield boozebottle_empty +Object b_full_helmet nrof 1 -material 32 -weight 6500 -identified 0 -name_pl boozes -client_type 611 -cursed 1 -known_cursed 0 -title of poison +name full helmet +name_pl full helmets +client_type 271 +type 34 +face b_fullhelmet.111 +ac 1 +resist_physical 5 +weight 12000 +value 4 +material 2 +materialname bronze +editable 1024 +body_head -1 +gen_sp_armour 10 +editor_folder armour/helmet end -Object wine_poison -name bottle of wine -face wine.111 -type 7 -editor_folder food/food -on_use_yield winebottle_empty -food 75 +Object b_helmet +name helmet +name_pl helmets +client_type 271 nrof 1 -material 36 -value 10 -weight 1000 -identified 0 -name_pl bottles of wine -client_type 611 -cursed 1 -known_cursed 0 -title of poison +type 34 +face b_helmet.111 +weight 5000 +ac 1 +resist_physical 3 +value 4 +material 2 +materialname bronze +editable 1024 +body_head -1 +gen_sp_armour 5 +editor_folder armour/helmet end -Object w_glass_poison -name glass of wine -face w_glass.111 -type 7 -editor_folder food/food -food 10 +Object b_horned_helmet nrof 1 -material 36 -value 2 -weight 1000 -identified 0 -name_pl glasses of wine -client_type 611 -cursed 1 -known_cursed 0 -title of poison +name horned helmet +name_pl horned helmets +client_type 271 +type 34 +face b_hornhelmet.111 +ac 1 +resist_physical 1 +weight 6000 +value 3 +material 18 +materialname bronze +editable 1024 +body_head -1 +gen_sp_armour 2 +editor_folder armour/helmet end -Object water_poison -face water.111 -type 7 -editor_folder food/food -on_use_yield wbottle_empty -food 5 +Object bighorned_helmet nrof 1 -material 32 -value 5 -weight 1500 -name_pl waters -client_type 611 -identified 0 -cursed 1 -known_cursed 0 -title of poison +name horned helmet +name_pl horned helmets +client_type 271 +type 34 +face bighorn_he.111 +ac 1 +resist_physical 5 +weight 10000 +value 22 +material 18 +editable 1024 +body_head -1 +gen_sp_armour 3 +editor_folder armour/helmet end -Object tomato -name tomato -face tomato.111 -type 6 -editor_folder food/food -food 50 +Object crown +name crown nrof 1 -material 32 -value 7 -weight 1000 -identified 1 -name_pl tomatoes -client_type 601 +face crown.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object tomato_big -name very large tomato -face tomato_big.111 -type 6 -editor_folder food/food -food 200 + +Object crown_r +name crown nrof 1 -material 32 -value 14 -weight 1000 -identified 1 -name_pl very large tomatoes -client_type 601 +face crown_r.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object dragon_steak -name steak -face drag_steak.111 -type 72 -editor_folder food/food -food 400 + +Object crown_gray +name crown nrof 1 -material 32 -value 10 -weight 5 -identified 1 -name_pl steaks -client_type 624 +face crown_gray.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object orange -name orange -face orange.111 -type 6 -editor_folder food/food -food 25 + +Object crown_white +name crown nrof 1 -need_an 1 -material 32 -value 2 -weight 100 -identified 1 -name_pl oranges -client_type 601 +face crown_white.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object coffee -name cup of coffee -face coffee.111 -type 6 -editor_folder food/food -on_use_yield coffee_empty -food 10 + +Object crown_dark +name crown nrof 1 -material 32 -value 1 -weight 100 -identified 1 -name_pl cups of coffee -client_type 601 +face crown_dark.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object mint -name mint sprig -face mint.111 -type 6 -editor_folder food/food -food 5 +Object eyeglasses nrof 1 -material 32 -value 5 -weight 100 -name_pl mint sprigs -client_type 601 +name eye glasses +client_type 275 +type 34 +face eyeglasses.111 +weight 120 +value 1000 +Dex 2 +Cha -2 +material 4 +materialname glass +editable 1024 +body_head -1 +editor_folder armour/helmet end -Object roast_bird -name roast bird -face roast_bird.111 -type 6 -editor_folder food/food -food 450 +Object full_helmet nrof 1 -material 32 -value 40 -weight 7500 -identified 1 -name_pl roast birds -client_type 601 +name full helmet +name_pl full helmets +client_type 271 +type 34 +face fullhelmet.111 +ac 1 +resist_physical 10 +weight 12000 +value 16 +material 2 +editable 1024 +body_head -1 +gen_sp_armour 10 +editor_folder armour/helmet end -Object rose_pink -name pink rose -face rose_pink.111 -type 6 -editor_folder food/food -food 5 +Object helmet +name helmet +name_pl helmets +client_type 271 nrof 1 -material 32 -value 60 -weight 2 -name_pl pink roses -client_type 601 +type 34 +face helmet.111 +weight 5000 +ac 1 +resist_physical 5 +value 14 +material 2 +editable 1024 +body_head -1 +gen_sp_armour 5 +editor_folder armour/helmet end -Object rose_red -name red rose -face rose_red.111 -type 6 -editor_folder food/food -food 5 +Object helmet_of_brilliance +name helmet +name_pl helmets +client_type 270 nrof 1 -material 32 -value 80 -weight 2 -name_pl red roses -client_type 601 +title of brilliance +face helmet_bri.111 +type 34 +weight 7000 +ac 2 +resist_physical 5 +value 95000 +Int 2 +Pow 2 +sp 1 +editable 5120 +body_head -1 +item_power 5 +editor_folder armour/helmet end -Object rose_white -name white rose -face rose_wh.111 -type 6 -editor_folder food/food -food 5 +Object helmet_of_xrays +name helmet +name_pl helmets +client_type 270 nrof 1 -material 32 -value 45 -weight 2 -name_pl white roses -client_type 601 +title of xray vision +face helmetxray.111 +animation helmet_of_xrays +speed 0.05 +type 34 +weight 6000 +ac 2 +resist_physical 5 +value 70000 +material 2 +xrays 1 +editable 5120 +body_head -1 +item_power 3 +editor_folder armour/helmet end -Object rose_yellow -name yellow rose -face rose_yel.111 -type 6 -editor_folder food/food -food 5 +Object horned_helmet nrof 1 -material 32 -value 45 -weight 2 -name_pl yellow roses -client_type 601 +name horned helmet +name_pl horned helmets +client_type 271 +type 34 +face hornhelmet.111 +ac 1 +resist_physical 2 +weight 6000 +value 12 +material 18 +editable 1024 +body_head -1 +gen_sp_armour 2 +editor_folder armour/helmet end -Object rose_black -name black rose -face rose_black.111 -type 6 -editor_folder food/food -food 5 +Object kog +name Kabuto of Geisya +name_pl Kabutos of Geisya +client_type 270 nrof 1 -material 32 -value 160 -weight 2 -name_pl black roses -client_type 601 +type 34 +face kog.111 +Wis 1 +Cha 2 +Int 1 +weight 2000 +ac 3 +resist_physical 10 +value 100000 +material 2 +editable 1024 +body_head -1 +gen_sp_armour 5 +item_power 4 +editor_folder armour/helmet end -Object mandrake_root -name mandrake root -face root.111 -type 6 -editor_folder food/food -food 15 +Object turban +name turban +name_pl turbans +client_type 272 nrof 1 -material 32 -value 300 -weight 300 -identified 1 -name_pl mandrake roots -client_type 601 +type 34 +face turban.111 +weight 500 +resist_physical 1 +value 8 +material 128 +editable 1024 +body_head -1 +gen_sp_armour 1 +editor_folder armour/helmet end -Object clover -face clover.111 -type 6 -editor_folder food/food -food 5 +Object wig +name wig +name_pl wigs +client_type 273 nrof 1 +type 34 +face wig.111 +weight 500 +Cha 1 +value 140 material 32 -value 5 -weight 100 -name_pl clovers -client_type 601 +editable 1024 +body_head -1 +editor_folder armour/helmet end -Object wine -name bottle of wine -face wine.111 -type 54 -editor_folder food/food -on_use_yield winebottle_empty -food 75 +Object wiz_hat +name Wizard Hat +name_pl Wizard Hats +client_type 270 nrof 1 -material 36 -value 10 +type 34 +face wiz_hat.111 +animation wiz_hat +speed 0.1 +last_sp 12 +ac 1 +Int 2 +sp 4 +resist_fire 15 +resist_cold 15 +resist_drain 30 +resist_slow 30 +resist_paralyze 30 weight 1000 -identified 1 -name_pl bottles of wine -client_type 611 -slaying vial_poison:wine_poison +value 50000 +material 128 +editable 5120 +body_head -1 +item_power 10 +editor_folder armour/helmet end -Object loaf -name bread -face loaf.111 -type 6 -editor_folder food/food -food 100 +Object Pdragon_mail +name Power Dragon Mail +name_pl Power Dragon Mails +client_type 251 nrof 1 -material 32 -value 5 -weight 3000 +type 16 +face Pdragonmail.111 +animation Pdragon_mail +speed 0.2 +last_sp 13 +ac 8 +material 256 +resist_physical 60 +weight 40000 +value 990000 +exp 1 +resist_fire 50 +resist_electricity 30 +magic 4 +editable 5120 identified 1 -name_pl breads -client_type 601 +body_torso -1 +gen_sp_armour 9 +item_power 12 +editor_folder armour/mail end -Object haggis -name haggis -face haggis.111 -type 6 -editor_folder food/food -food 500 +Object b_plate_mail nrof 1 -material 32 -value 80 -weight 8000 -identified 1 -name_pl haggises -client_type 601 +name plate mail +name_pl plate mails +client_type 252 +type 16 +face b_plate_mail.111 +last_sp 7 +material 2 +materialname bronze +ac 5 +resist_physical 20 +weight 100000 +value 25 +editable 1024 +body_torso -1 +gen_sp_armour 30 +editor_folder armour/mail end -Object mushroom_1 -name mushroom -face mushroom_1.111 -type 6 -editor_folder food/food -food 50 +Object b_scale_mail nrof 1 -material 32 -value 5 -weight 100 -name_pl mushrooms -client_type 601 +name scale mail +name_pl scale mails +client_type 253 +type 16 +face b_scale_mail.111 +last_sp 9 +material 8 +materialname bronze +ac 3 +resist_physical 10 +weight 20000 +value 8 +editable 1024 +body_torso -1 +gen_sp_armour 10 +editor_folder armour/mail end -Object mushroom_2 -name mushroom -face mushroom_2.111 -type 6 -editor_folder food/food +Object chain_mail nrof 1 -material 32 -value 6 -food 55 -weight 100 -name_pl mushrooms -client_type 601 +name chain mail +name_pl chain mails +client_type 253 +type 16 +face chainmail.111 +last_sp 10 +material 2 +ac 4 +resist_physical 30 +weight 60000 +value 75 +editable 1024 +body_torso -1 +gen_sp_armour 15 +editor_folder armour/mail end -Object mushroom_3 -name mushroom -face mushroom_3.111 -type 6 -editor_folder food/food -food 60 +Object dragon_mail +name dragon mail +name_pl dragon mails +client_type 251 nrof 1 -material 32 -value 7 -weight 50 -name_pl mushrooms -client_type 601 +type 16 +face dragonmail.111 +last_sp 13 +ac 6 +resist_physical 50 +material 2048 +materialname dragonscale +weight 60000 +value 50000 +resist_fire 40 +magic 3 +editable 5120 +identified 1 +body_torso -1 +gen_sp_armour 9 +item_power 5 +editor_folder armour/mail end -Object pear -face pear.111 -type 6 -editor_folder food/food -food 25 +Object dress1 +name dress +name_pl dresses +client_type 255 nrof 1 -material 32 -value 2 -weight 100 -identified 1 -name_pl pears -client_type 601 +type 16 +face dress1.111 +resist_physical 1 +last_sp 5 +Cha 2 +ac 1 +weight 10000 +value 10000 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object pipeweed -name pipeweed -face pipeweed.111 -type 6 -editor_folder food/food -food 5 +Object dress2 +name dress +name_pl dresses +client_type 255 nrof 1 -material 32 -value 300 -weight 32 -name_pl pipeweed -client_type 601 +type 16 +face dress2.111 +last_sp 8 +ac 1 +Cha 1 +weight 5000 +value 3000 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object cabbage -face cabbage.111 -type 6 -editor_folder food/food -food 80 +Object dress3 +name dress +name_pl dresses +client_type 255 nrof 1 -material 32 -value 4 -weight 1500 -identified 1 -name_pl cabbages -client_type 601 +type 16 +face dress3.111 +last_sp 8 +Cha 1 +weight 4500 +value 1000 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object carrot -name carrots -face carrot.111 -type 6 -editor_folder food/food -food 20 +Object elven_robe +name Elven Robe +name_pl Elven Robes +client_type 256 nrof 1 -material 32 -value 1 -weight 100 -identified 1 -name_pl carrots -client_type 601 +type 16 +face elven_robe.111 +last_sp 12 +ac 3 +stealth 1 +resist_confusion 60 +Dex 4 +magic 1 +food 4 +weight 5000 +value 3000 +material 128 +editable 5120 +body_torso -1 +item_power 13 +editor_folder armour/mail end -Object w_glass -name glass of wine -face w_glass.111 -type 54 -editor_folder food/food -on_use_yield w_glass_empty -food 10 +Object gale +name Gale Armour +name_pl Gale Armours +client_type 250 nrof 1 -material 36 -value 2 -weight 1000 -identified 1 -name_pl glasses of wine -client_type 611 -slaying vial_poison:w_glass_poison +face gale.111 +Dex 2 +ac 4 +resist_physical 40 +speed 2.000000 +type 16 +resist_electricity 30 +material 8 +value 220000 +weight 10000 +last_sp 50 +editable 5120 +body_torso -1 +item_power 4 +editor_folder armour/mail end -Object onion -name onion -face onion.111 -type 6 -editor_folder food/food -food 50 +Object lapron +name apron +name_pl aprons +client_type 257 nrof 1 -need_an 1 -material 32 -value 2 -weight 100 -identified 1 -name_pl onions -client_type 601 +type 16 +face lapron.111 +last_sp 11 +ac 1 +resist_physical 5 +weight 20000 +nrof 1 +value 10 +material 8 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object potato -name potatoes -face potato.111 -type 6 -editor_folder food/food -food 200 +Object leather_armour nrof 1 -material 32 -value 7 -weight 4000 -identified 1 -name_pl potatoes -client_type 601 +name armour +name_pl armours +client_type 254 +type 16 +face leather_ar.111 +last_sp 13 +ac 2 +resist_physical 10 +weight 20000 +value 40 +material 8 +editable 1024 +body_torso -1 +gen_sp_armour 8 +editor_folder armour/mail end -Object gen_mushroom -name mouldy patch -face gen_mushroom.111 -editor_folder food/food -randomitems random_mushroom -no_pick 1 -alive 1 -exp 1 -level 1 -ac 25 -hp 1 -maxhp 1 -speed -1.0 -invisible 1 -is_used_up 1 -end -Object fishfood -name fish -face fishfood.111 -type 6 -editor_folder food/food -food 100 +Object mithril_chainmail nrof 1 -material 32 -value 4 -weight 3500 -identified 1 -name_pl fishes -client_type 601 +name mithril chainmail +name_pl mithril chainmails +client_type 250 +type 16 +material 2 +materialname mithril +face mithril_ar.111 +animation mithril_chainmail +speed 0.1 +ac 6 +resist_physical 35 +last_sp 18 +weight 15000 +value 8000 +editable 5120 +body_torso -1 +gen_sp_armour 5 +item_power 1 +editor_folder armour/mail end -Object devourers_avatar_info -name avatar -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch devourers_avatar -end -Object Valriel -face archangel.115 -type 50 -editor_folder gods/supernatural -msg -Lord of Angels, Duke of the Heavens, Healer and Protector -endmsg -title Gorokh -slaying demon -race angel -animation archangle -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -is_animated 1 -monster 1 -alive 1 -attacktype 4194304 -path_attuned 1025 -path_denied 393216 -resist_confusion 20 -resist_blind 100 -resist_fear 100 -ac -7 -wc -1 -hp 350 -maxhp 350 -dam 50 -level 15 -speed 0.25 -can_cast_spell 1 -can_use_armour 1 -can_use_weapon 1 -can_use_shield 1 -exp 1 -weight 100000 -randomitems Valriel -end -Object gorokh_general_info -name message -type 8 -editor_folder gods/supernatural -msg -You are filled with a desire to slay all -angels. -endmsg -invisible 1 -end -Object Gorokh -face devil.111 -type 50 -editor_folder gods/supernatural -msg -Demon King, Duke of Hell, Temptor and Tormentor -endmsg -title Valriel -slaying angel -race demon -animation devil -is_animated 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -monster 1 -alive 1 -attacktype 16384 -path_attuned 131072 -path_repelled 257 -resist_magic 30 -resist_cold -5 -resist_fear 100 -ac -5 -wc -3 -dam 50 -hp 350 -maxhp 350 -level 15 -speed 0.25 -luck -1 -last_heal -2 -last_sp -1 -can_cast_spell 1 -can_use_armour 1 -can_use_weapon 1 -can_use_shield 1 -exp 1 -weight 400000 -randomitems Gorokh -end -Object valriel_avatar_info -name avatar -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch valriel_avatar -end -Object valriel_avatar -face archangel.115 -editor_folder gods/supernatural -slaying demon -race angel -animation archangle -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -is_animated 1 -monster 1 -alive 1 -attacktype 4194305 -path_attuned 1025 -path_denied 393216 -resist_confusion 20 -resist_blind 100 -resist_fear 100 -resist_physical 50 -ac -7 -wc -1 -hp 350 -maxhp 350 -dam 40 -level 15 -speed 0.25 -can_cast_spell 1 -can_use_armour 1 -can_use_weapon 1 -can_use_shield 1 -exp 1 -weight 100000 -end -Object devourers_holy_servant_info -name holy servant -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch wight -end -Object gorokh_avatar -face devil.111 -editor_folder gods/supernatural -slaying angel -race demon -animation devil -is_animated 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -monster 1 -alive 1 -attacktype 16385 -path_attuned 393216 -path_denied 1025 -resist_physical 50 -resist_fear 100 -resist_magic 20 -ac -5 -wc -3 -dam 40 -hp 350 -maxhp 350 -level 15 -speed 0.25 -can_cast_spell 1 -can_use_armour 1 -can_use_weapon 1 -can_use_shield 1 -exp 1 -weight 400000 -end -Object gorokh_avatar_info -name avatar -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch gorokh_avatar -end -Object valriel_player_glow -name valriel's light -face archangel.115 -type 98 -editor_folder gods/supernatural -glow_radius 9 -startequip 1 -invisible 1 -end -Object devourers_general_info -name message -type 8 -editor_folder gods/supernatural -msg -You feel a bond with all things which are -undead. -endmsg -invisible 1 -end -Object Devourers -face grimreaper.112 -type 50 -editor_folder gods/supernatural -msg -Soul Eaters, Harbingers of Death, Nameless -Lords of the Tomb -endmsg -title Gaea -race undead -animation grimreaper -is_animated 1 -monster 1 -alive 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -attacktype 16973824 -path_attuned 393216 -path_denied 65536 -path_repelled 524547 -resist_drain 100 -resist_fear 100 -resist_deplete 100 -resist_death 100 -resist_ghosthit 50 -resist_poison 100 -resist_cold 15 -resist_fire -5 -ac -12 -wc -1 -hp 350 -maxhp 350 -dam 50 -last_eat 60 -last_heal -1 -level 15 -speed 0.35 -can_cast_spell 1 -can_use_weapon 1 -can_use_armour 1 -can_use_shield 1 -undead 1 -can_see_in_dark 1 -exp 1 -weight 1 -randomitems Devourers -end -Object valriel_general_info -name message -type 8 -editor_folder gods/supernatural -msg -You are filled with a desire to slay all -demons. -endmsg -invisible 1 -end -Object valriel_holy_servant_info -name holy servant -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch angel -end -Object gorokh_holy_servant_info -name holy servant -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch devil -end -Object devourers_avatar -face grimreaper.112 -editor_folder gods/supernatural -race undead -animation grimreaper -is_animated 1 -monster 1 -alive 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -attacktype 196752 -path_attuned 262144 -path_denied 590082 -path_repelled 129 -resist_death 100 -resist_deplete 100 -resist_fear 100 -resist_drain 100 -resist_fire -50 -resist_cold 50 -resist_physical 20 -ac -12 -wc -1 -hp 350 -maxhp 350 -dam 50 -last_eat -3 -last_heal -1 -level 15 -speed 0.35 -can_cast_spell 1 -can_use_weapon 1 -can_use_armour 1 -can_use_shield 1 -undead 1 -can_see_in_dark 1 -exp 1 -weight 1 -end -Object tear_gaea -name Gaea's tear -face tear.111 -type 5 -editor_folder gods/items -animation tear_gaea +Object mithril_ar_ele nrof 1 -level 10 -speed 0.25 -sp 35 -weight 10 -name_pl Gaea's tears -client_type 650 -end -Object mithril_ar_ele_sorig -name mithril chainmail of lightning of Sorig +name mithril chainmail of lightning +name_pl mithril chainmails of lightning +client_type 250 +type 16 +material 2 +materialname mithril face mithril_ar_ele.111 -type 16 -editor_folder gods/items -msg -Sorig has granted you this fine mail. It - grants great protection from electricity - and physical attacks without reducing your - mobility. Be warned that what Sorig gives, - Sorig can take away. -endmsg -nrof 1 animation mithril_ar_ele speed 0.3 ac 4 resist_physical 40 -resist_electricity 40 -startequip 1 -Dex 1 +resist_electricity 30 +Cha 1 Str 1 exp 1 -magic 5 -gen_sp_armour 2 +magic 3 last_sp 27 weight 15000 value 4000 -name_pl mithril chainmails of lightning of Sorig -client_type 250 +editable 5120 body_torso -1 -item_power 10 +gen_sp_armour 2 +item_power 9 +editor_folder armour/mail end -Object mail_mostrai -name Thorin's Plate Mail +Object plate_mail +nrof 1 +name plate mail +name_pl plate mails +client_type 252 +type 16 face plate_mail.111 +last_sp 7 +material 2 +ac 5 +resist_physical 40 +weight 100000 +value 100 +editable 1024 +body_torso -1 +gen_sp_armour 30 +editor_folder armour/mail +end +Object ring_mail +nrof 1 +name hauberk +name_pl hauberks +client_type 253 type 16 -editor_folder gods/items -msg -This shining plate mail is Mostrai's - gift to the bravest of his warriors. - It is highly enchanted, increasing the - strength of the wearer and protecting - against fire. -endmsg -name_pl Thorin's Plate Mails -client_type 250 -ac 3 -Str 1 -nrof 1 -startequip 1 -resist_physical 50 -resist_fire 30 +face ring_mail.111 +last_sp 10 +material 2 +ac 4 +resist_physical 25 weight 50000 -magic 2 -gen_sp_armour 9 -last_sp 13 +value 60 +editable 1024 body_torso -1 -item_power 4 +gen_sp_armour 15 +editor_folder armour/mail end -Object spear_ixalovh -name Ixalovh's spear -face spear_ixalovh.111 -type 15 -editor_folder gods/items +Object ring_mail2 nrof 1 -last_sp 9 -weapontype 5 -animation spear_ixalovh -speed -0.02 -Pow 1 -sp 1 -material 256 -dam 35 -weight 26500 -value 75000 -magic 12 -resist_magic 10 -resist_fire 15 -attacktype 17 -startequip 1 -name_pl Ixalovh's spears -client_type 136 -can_impale 1 -glow_radius 2 -body_arm -2 -item_power 20 -skill two handed weapons +name ring mail +name_pl ring mails +client_type 253 +type 16 +face ring_mail2.111 +last_sp 11 +material 2 +ac 4 +resist_physical 20 +weight 40000 +value 85 +editable 1024 +body_torso -1 +gen_sp_armour 15 +editor_folder armour/mail end -Object shield_gaea -name Gaea's Shield of Earth -face earth_shield.111 -type 33 -editor_folder gods/items -msg -This shield is highly enchanted by the forces - of life and nature. It is a personal gift from - Gaea, to protect her beloved children. -endmsg -animation shield_gaea -is_animated 1 -ac 4 -speed 0.2 +Object robe +name robe +name_pl robes +client_type 256 nrof 1 -startequip 1 -resist_physical 15 -resist_fire 30 -resist_cold 30 -resist_electricity 30 -resist_ghosthit -20 -weight 20000 -name_pl Gaea's Shields of Earth -client_type 260 -body_arm -1 +type 16 +face robe.111 +last_sp 12 +ac 1 +weight 10000 +value 30 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object bracers_gnarg -name bracers -face bracersdex.111 -type 104 -editor_folder gods/items -msg -An exceptional pair of bracers. Not only do - they provide the wearer with protection - from cold, they also increase the wearer's - damage and strength, and help heal the body - from damage. A mighty gift from Gnarg sent - to aid you in annihilating His enemies. -endmsg +Object robe2 +name robe +name_pl robes +client_type 256 nrof 1 -title of strength of Wargs -Str 2 -resist_physical 30 +type 16 +face robe2.111 +last_sp 12 +ac 1 +nrof 1 +weight 10000 +value 9 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail +end +Object robe_midnight +name Midnight Robe +name_pl Midnight Robes +client_type 250 +nrof 1 +type 16 +face robe_midnight.111 +animation robe_midnight +speed 0.1 +ac 5 +Dex 1 +Int 2 +Pow 2 +resist_magic 30 +resist_fire 20 resist_cold 20 -Dam 15 -hp 1 -value 65000 -weight 9000 -startequip 1 -name_pl bracers -client_type 310 -body_wrist -2 +resist_drain 20 +resist_slow 20 +resist_paralyze 20 +resist_acid 75 +resist_ghosthit -100 +reflect_spell 1 +magic 5 +weight 5000 +value 100000 +material 128 +editable 5120 +body_torso -1 +item_power 25 +editor_folder armour/mail end -Object glovesofsun -name Gloves of the Sun -face glovesofsun.111 -type 100 -editor_folder gods/items -msg -This pair of gloves will aid any of Gaea's - most faithful in seeing her will protected. -endmsg -name_pl Gloves of the Sun -client_type 300 +Object scale_mail nrof 1 -animation glovesofsun -speed 0.25 +name scale mail +name_pl scale mails +client_type 253 +type 16 +face scale_mail.111 +last_sp 9 material 8 -weight 900 -value 20000 -attacktype 5 -ac 1 -dam 2 -Dex 2 -wc 2 -magic 1 -startequip 1 -body_hand -2 -end -Object helmet_gnarg -name Gnarg's Orc Helmet -face bighorn_he.111 -type 34 -editor_folder gods/items -msg -This helmet good protection. From mighty - Gnarg it is. -endmsg -name_pl Gnarg's Orc Helmets -client_type 270 -Dex 1 ac 3 -nrof 1 -startequip 1 resist_physical 20 -resist_poison 30 -weight 7000 -gen_sp_armour 1 -body_head -1 +weight 20000 +value 30 +editable 1024 +body_torso -1 +gen_sp_armour 10 +editor_folder armour/mail end -Object horn_siren -name horn -face shellhorn1.111 -type 35 -editor_folder gods/items -msg -Putting this shell to your ear, you hear a - strange and haunting melody. -endmsg -title of the Sirens -randomitems horn_siren -level 40 -value 590 -weight 1500 -material 2 -hp 20 -maxhp 20 -speed 0.2 -name_pl horns -startequip 1 -client_type 721 -body_range -1 -end -Object pipe_lythander -name Lythander's pipe -face claypipe.111 -type 35 -editor_folder gods/items -msg -This pipe is the finest you have ever - seen. Imagine the smoke rings you - could blow with it... -endmsg -name_pl Lythander's pipes -randomitems pipe_lythander -luck 1 -material 256 -hp 60 -level 35 -maxhp 60 -speed 0.1 -value 58 -weight 40 -name_pl horns -client_type 721 -body_range -1 -startequip 1 -end -Object horn_waves -name horn -face shellhorn2.111 -type 35 -editor_folder gods/items -msg -Putting this shell to your ear, you hear - the crashing sound of ocean waves. -endmsg -title of Ocean Waves -randomitems horn_waves -level 30 -value 590 +Object tunic +name shirt +name_pl shirts +client_type 256 +nrof 1 +type 16 +face tunic.111 +last_sp 20 weight 1000 -material 2 -hp 24 -maxhp 24 -speed 0.1 -name_pl horns -client_type 721 -startequip 1 -body_range -1 +nrof 1 +value 3 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object burningtail -name Burning Tail of many lashings of Ruggilli -face burningtail.111 -type 15 -editor_folder gods/items +Object wdsm +name White Dragon Scale Mail +name_pl White Dragon Scale Mails +client_type 251 nrof 1 -last_sp 8 -weapontype 6 -animation burningtail +type 16 +face wdsm.111 +animation wdsm speed 0.1 -material 256 -dam 40 -weight 10000 -value 75000 -magic 15 -resist_cold 25 -resist_fire 15 -attacktype 4101 +last_sp 13 +cursed 1 startequip 1 -name_pl Burning Tails of many lashings of Ruggilli -client_type 100 -body_arm -1 -item_power 25 -glow_radius 3 -skill one handed weapons +no_steal 1 +ac 5 +resist_physical 45 +weight 5000 +value 220000 +resist_cold 30 +resist_fire 95 +magic -3 +editable 5120 +body_torso -1 +gen_sp_armour 9 +item_power 5 +editor_folder armour/mail end -Object bow_lythander -name Lythander's Elven Bow -face elven_bow.111 -type 14 -editor_folder gods/items -msg -You look at this wonderful bow with - pride. It is only granted to the best - of Lythander's disciples. -endmsg -name_pl Lythander's Elven Bows -client_type 150 -race arrows -luck 1 -sp 70 -dam 30 -wc 3 +Object DShield +name Demonspawn Shield +name_pl Demonspawn Shields +client_type 260 nrof 1 -startequip 1 -attacktype 1 -weight 8000 -magic 5 -body_arm -2 -skill missile weapons -end -Object gaea_general_info -name message -type 8 -editor_folder gods/elemental +type 33 +material 256 +materialname abyssium +face DShield.111 +animation DShield +speed 0.2 msg -You are filled with a desire to slay all -undead and unnatural creatures. + There is a evil spirit in the shield. endmsg -invisible 1 +Cha -3 +resist_fire 30 +resist_drain 100 +resist_ghosthit 70 +ac 3 +resist_physical 10 +weight 25000 +value 50000 +editable 5120 +body_arm -1 +item_power 5 +editor_folder armour/shield end -Object Sorig -face para_light.111 -type 50 -editor_folder gods/elemental +Object DShieldm +name Demonspawn Shield +name_pl Demonspawn Shields +client_type 260 +nrof 1 +type 33 +material 256 +materialname abyssium +face DShield.111 +animation DShieldm +speed 0.2 msg -Lord of Storms, King of Thunder and Lightning, Sky Lord + There is a strong evil spirit in the shield + trying to dominate you. endmsg -race air_elemental -animation para_lightning -is_animated 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -monster 1 -alive 1 -attacktype 8 -resist_electricity 100 -path_attuned 131096 -path_repelled 256 -path_denied 65537 -ac -5 -wc -1 -dam 40 -hp 300 -maxhp 300 -level 15 -speed 0.40 -can_cast_spell 1 -can_use_weapon 1 -can_use_armour 1 -can_use_shield 1 -exp 1 -weight 1 -randomitems Sorig -end -Object sorig_avatar_info -name avatar -type 8 -editor_folder gods/elemental -invisible 1 -other_arch sorig_avatar -end -Object sorig_holy_servant_info -name holy servant -type 8 -editor_folder gods/elemental -invisible 1 -other_arch para_lightning -end -Object ruggilli_avatar -face elem_fire.111 -editor_folder gods/elemental -race consuming_fire_creatures -animation fire_elemental -is_animated 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -monster 1 -alive 1 -attacktype 5 -path_attuned 131074 -path_repelled 10500 -path_denied 82945 -resist_fire 100 -resist_cold -100 -resist_magic 30 -resist_physical 40 -ac -5 -wc -3 -dam 60 -hp 400 -maxhp 400 -level 15 -speed 0.50 -can_use_weapon 1 -can_cast_spell 1 +Cha -3 +resist_fire 30 +resist_drain 100 +resist_ghosthit 75 reflect_missile 1 -last_heal 1 -last_eat 1 -exp 1 -weight 500000 +ac 4 +resist_physical 10 +weight 25000 +value 100000 +editable 5120 +body_arm -1 +item_power 7 +editor_folder armour/shield end -Object ruggilli_holy_servant_info -name holy servant -type 8 -editor_folder gods/elemental -invisible 1 -other_arch dragon -end -Object ruggilli_avatar_info -name avatar -type 8 -editor_folder gods/elemental -invisible 1 -other_arch ruggilli_avatar -end -Object ixalovh_avatar_info -name avatar -type 8 -editor_folder gods/elemental -invisible 1 -other_arch ixalovh_avatar -end -Object Ruggilli -face elem_fire.111 -type 50 -editor_folder gods/elemental +Object DShieldms +name Demonspawn Shield +name_pl Demonspawn Shields +client_type 260 +nrof 1 +type 33 +material 256 +materialname abyssium +face DShield.111 +animation DShieldms +speed 0.25 +Cha -5 msg -Chaos God of slaughter and terror, Consuming worm, Greedy gut + There is a powerful evil... [truncated message content] |
From: <aki...@us...> - 2006-11-30 20:02:12
|
Revision: 758 http://svn.sourceforge.net/gridarta/?rev=758&view=rev Author: akirschbaum Date: 2006-11-30 12:02:11 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Remove 'default size' checkbox from new pickmap dialog. Modified Paths: -------------- trunk/daimonin/src/daieditor/CNewMapDialog.java Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-30 19:51:40 UTC (rev 757) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-30 20:02:11 UTC (rev 758) @@ -159,7 +159,9 @@ newLevelFromScratchPanel.add(mapNamePanel); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - newLevelFromScratchPanel.add(mapSizeDefaultCheckbox); + if (mapType != MapType.PICKMAP) { + newLevelFromScratchPanel.add(mapSizeDefaultCheckbox); + } newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); final JPanel mapSizePanel = new JPanel(new GridBagLayout()); @@ -225,7 +227,7 @@ // Get and validate the width final int width; final int height; - if (!mapSizeDefault) { + if (mapType == MapType.PICKMAP || !mapSizeDefault) { try { width = (Integer) mapWidthField.getValue(); } catch (final IllegalArgumentException e) { @@ -317,7 +319,9 @@ dialog.getRootPane().setDefaultButton(pane.okButton); dialog.setModal(false); - pane.setMapSizeDefault(true); + if (mapType != MapType.PICKMAP) { + pane.setMapSizeDefault(true); + } dialog.setVisible(true); pane.mapNameField.selectAll(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-30 19:51:47
|
Revision: 757 http://svn.sourceforge.net/gridarta/?rev=757&view=rev Author: akirschbaum Date: 2006-11-30 11:51:40 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Improve new map dialog: remove file name field which was never shown; correctly set name and file name for pickmaps; start with empty map name to force the user to enter a name. Modified Paths: -------------- trunk/crossfire/resource/pickmaps/NPC trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/messages_de.properties trunk/daimonin/src/daieditor/CNewMapDialog.java trunk/daimonin/src/daieditor/messages_de.properties trunk/src/app/net/sf/gridarta/messages.properties Modified: trunk/crossfire/resource/pickmaps/NPC =================================================================== --- trunk/crossfire/resource/pickmaps/NPC 2006-11-29 21:04:12 UTC (rev 756) +++ trunk/crossfire/resource/pickmaps/NPC 2006-11-30 19:51:40 UTC (rev 757) @@ -1,51 +1,51 @@ arch map name pickmap +width 7 +height 15 msg Creator: CF Java Map Editor Date: 8/29/2002 endmsg -width 7 -height 15 end arch guildmaster name cleric face cleric.151 hp 100 maxhp 100 +randomitems throw_stnd pick_up 0 -randomitems throw_stnd end arch guildmaster name mage face mage.151 hp 100 maxhp 100 +y 1 +randomitems standard pick_up 0 -randomitems standard -y 1 end arch guildmaster name sorcerer face sorcerer.151 hp 100 maxhp 100 +y 2 +randomitems standard pick_up 0 -randomitems standard -y 2 end arch fireborn +Con 10 +Cha 10 +hp 100 +maxhp 100 +exp 100 +dam 3 +y 3 +level 10 type 0 -level 10 -exp 100 randomitems standard -dam 3 -hp 100 -maxhp 100 -Con 10 +monster 1 unaggressive 1 -monster 1 -Cha 10 -y 3 end arch a_townsman y 5 @@ -76,40 +76,40 @@ face monk.151 hp 100 maxhp 100 +x 1 +randomitems throw_stnd pick_up 0 -randomitems throw_stnd -x 1 end arch guildmaster name swashbuckler face swashbuckl.171 hp 100 maxhp 100 -pick_up 0 -randomitems pirate x 1 y 1 +randomitems pirate +pick_up 0 end arch guildmaster name summoner face wizard_yellow.151 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 1 y 2 +randomitems standard +pick_up 0 end arch guildmaster name quetzalcoatl +race reptile face quetzalcoatl.131 hp 100 maxhp 100 -pick_up 0 -randomitems standard -race reptile x 1 y 3 +randomitems standard +pick_up 0 end arch a_townsman2 x 1 @@ -148,40 +148,40 @@ face paladin.151 hp 100 maxhp 100 +x 2 +randomitems throw_stnd pick_up 0 -randomitems throw_stnd -x 2 end arch guildmaster name warlock face mage.151 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 2 y 1 +randomitems standard +pick_up 0 end arch guildmaster name wizard face wizard.151 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 2 y 2 +randomitems standard +pick_up 0 end arch guildmaster name dragon hatchling +race dragon face pl_dragon.171 hp 100 maxhp 100 -pick_up 0 -randomitems standard -race dragon x 2 y 3 +randomitems standard +pick_up 0 end arch a_townsman3 x 2 @@ -196,9 +196,9 @@ y 7 end arch sailor -random_movement 0 x 2 y 8 +random_movement 0 end arch dwarf_wiz x 2 @@ -221,39 +221,39 @@ face priestnew.151 hp 100 maxhp 100 +x 3 +randomitems standard pick_up 0 -randomitems standard -x 3 end arch guildmaster name warrior face warrior.151 hp 100 maxhp 100 -pick_up 0 -randomitems throw_stnd x 3 y 1 +randomitems throw_stnd +pick_up 0 end arch guildmaster name human face human.151 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 3 y 2 +randomitems standard +pick_up 0 end arch guildmaster name viking face viking.151 hp 100 maxhp 100 -pick_up 0 -randomitems viking x 3 y 3 +randomitems viking +pick_up 0 end arch beggar x 3 @@ -292,56 +292,56 @@ face ninja.151 hp 100 maxhp 100 +x 4 +randomitems npc_ninja pick_up 0 -randomitems npc_ninja -x 4 end arch guildmaster name alchemist face alchemist.151 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 4 y 1 +randomitems standard +pick_up 0 end arch guildmaster name dwarf face dwarf_p.111 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 4 y 2 +randomitems standard +pick_up 0 end arch guildmaster name wraith +race undead face wraithp.151 -race undead -randomitems standard -undead 1 hp 100 maxhp 100 -pick_up 0 x 4 y 3 +randomitems standard +undead 1 +pick_up 0 end arch conjurer x 4 y 5 end arch gnome +x 4 +y 6 type 0 unaggressive 1 -x 4 -y 6 end arch fatman -random_movement 0 x 4 y 7 +random_movement 0 end arch greater_dwarven_guard x 4 @@ -360,44 +360,44 @@ face thief.151 hp 100 maxhp 100 +x 5 +randomitems thief_1 pick_up 0 -randomitems thief_1 -x 5 end arch guildmaster name devotee face wizard_white.151 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 5 y 1 +randomitems standard +pick_up 0 end arch guildmaster name elf face elf.151 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 5 y 2 +randomitems standard +pick_up 0 end arch guildmaster name half orc face pl_half_orc.111 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 5 y 3 +randomitems standard +pick_up 0 end arch pirate -unaggressive 1 x 5 y 5 +unaggressive 1 end arch charwoman x 5 @@ -420,34 +420,34 @@ face barbarian.151 hp 100 maxhp 100 +x 6 +randomitems viking pick_up 0 -randomitems viking -x 6 end arch guildmaster name evoker face evoker.151 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 6 y 1 +randomitems standard +pick_up 0 end arch guildmaster name halfling face halfling.111 hp 100 maxhp 100 -pick_up 0 -randomitems standard x 6 y 2 +randomitems standard +pick_up 0 end arch small_troll -unaggressive 1 x 6 y 3 +unaggressive 1 end arch dancing_girl x 6 Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-29 21:04:12 UTC (rev 756) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-30 19:51:40 UTC (rev 757) @@ -75,6 +75,9 @@ /** type of map to create: pickmap or normal map? */ private final MapType mapType; + /** Desired filename for new map, null if not specified. */ + private final String filename; + /** * Textfield for the name of the map. * This is only used for {@link MapType#GAMEMAP} to determine the title of the new map. @@ -83,13 +86,6 @@ private final JTextField mapNameField = new JTextField(16); /** - * Textfield for the filename of the map. - * This is only used for {@link MapType#PICKMAP} to determine the filename of the new pickmap. - * The title of the pickmap will be set to "pickmap" always. - */ - private final JTextField fileNameField = new JTextField(16); - - /** * Textfield for the width of the new map. */ private final JFormattedTextField mapWidthField = new JFormattedTextField(); @@ -117,38 +113,22 @@ this.mainControl = mainControl; this.mapType = mapType; - setMessage(createPanel(filename)); + this.filename = filename; + setMessage(createPanel()); } - private JPanel createPanel(final String filename) { + private JPanel createPanel() { final JPanel newLevelFromScratchPanel = new JPanel(); newLevelFromScratchPanel.setLayout(new BoxLayout(newLevelFromScratchPanel, BoxLayout.Y_AXIS)); newLevelFromScratchPanel.setBorder(IGUIConstants.DIALOG_BORDER); - // file name panel - final JPanel fileNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - if (mapType == MapType.PICKMAP) { - fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapPickmapName"))); - } else { - fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapFileName"))); - } - if (filename != null && filename.length() > 0) { - fileNameField.setText(filename); - } - fileNamePanel.add(fileNameField); - if (mapType == MapType.PICKMAP) { - newLevelFromScratchPanel.add(fileNamePanel); - newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - } - if (mapType == MapType.GAMEMAP) { - // map name panel - final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - mapNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapMapName"))); - mapNamePanel.add(mapNameField); - newLevelFromScratchPanel.add(mapNamePanel); - newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - } + // map name panel + final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + mapNamePanel.add(new JLabel(ACTION_FACTORY.getString(mapType == MapType.PICKMAP ? "newMapPickmapName" : "newMapMapName"))); + mapNamePanel.add(mapNameField); + newLevelFromScratchPanel.add(mapNamePanel); + newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); final CSettings settings = CSettings.getInstance(IGUIConstants.APP_NAME); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); @@ -241,10 +221,10 @@ maparch.setMapSize(new Size2D(width, height)); - // the mapmaker must enter a mapname to create a new map + // the mapmaker must enter a name -- both for maps and pickmaps final String mapName = mapNameField.getText(); - if (mapType == MapType.GAMEMAP && (mapName == null || mapName.length() <= 0)) { - ACTION_FACTORY.showMessageDialog(this, "newMapNoName"); + if (mapName == null || mapName.length() <= 0) { + ACTION_FACTORY.showMessageDialog(this, mapType == MapType.PICKMAP ? "newPickmapNoName" : "newMapNoName"); mapNameField.requestFocus(); return false; } @@ -261,18 +241,13 @@ settings.setProperty(DEFAULT_LEVEL_HEIGHT_KEY, String.valueOf(height)); } - // set file name - String strfileName = fileNameField.getText(); - if (strfileName.length() < 1) { - strfileName = IGUIConstants.DEF_MAPFNAME; - } - maparch.setFileName(strfileName); - - // set map name + // set map name and file name if (mapType == MapType.GAMEMAP) { maparch.setMapName(mapName); + maparch.setFileName(filename != null ? filename : IGUIConstants.DEF_MAPFNAME); } else if (mapType == MapType.PICKMAP) { maparch.setMapName("pickmap"); + maparch.setFileName(mapName); } // default map text: @@ -303,12 +278,8 @@ dialog.getRootPane().setDefaultButton(pane.okButton); dialog.setModal(false); - // TODO: localize - pane.mapNameField.setText("Unnamed Map"); - dialog.setVisible(true); pane.mapNameField.selectAll(); - pane.fileNameField.selectAll(); pane.mapWidthField.selectAll(); pane.mapHeightField.selectAll(); } Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2006-11-29 21:04:12 UTC (rev 756) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-11-30 19:51:40 UTC (rev 757) @@ -4,7 +4,6 @@ # New Map newMap.title=Neue Karte erstellen newPickmap.title=Neue Pickmap erstellen -newMapFileName=Dateiname: newMapMapName=Name: newMapParameter=Parameter newMapPickmapName=Name: @@ -14,6 +13,8 @@ newMapDimensionNotANumber.message=Die Kartengr\xF6\xDFe muss ganzzahlig sein. newMapNoName.title=Kartenname fehlt newMapNoName.message=Der Kartenname fehlt. Jede Karte muss einen Namen besitzen.\nEr wird in-game verwendet und sollte die Karte beschreiben.\nKartennamen m\xFCssen nicht eindeutig sein. +newPickmapNoName.title=Pickmap fehlt +newPickmapNoName.message=Der Pickmapname fehlt. Es ist ein eindeutiger Name erforderlich. mapWidth=Breite mapHeight=H\xF6he Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-29 21:04:12 UTC (rev 756) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-30 19:51:40 UTC (rev 757) @@ -94,6 +94,9 @@ /** type of map to create: pickmap or normal map? */ private final MapType mapType; + /** Desired filename for new map, null if not specified. */ + private final String filename; + /** * Textfield for the name of the map. * This is only used for {@link MapType#GAMEMAP} to determine the title of the new map. @@ -102,13 +105,6 @@ private final JTextField mapNameField = new JTextField(16); /** - * Textfield for the filename of the map. - * This is only used for {@link MapType#PICKMAP} to determine the filename of the new pickmap. - * The title of the pickmap will be set to "pickmap" always. - */ - private final JTextField fileNameField = new JTextField(16); - - /** * Checkbox to set whether the default width / height should be overridden. */ private final JCheckBox mapSizeDefaultCheckbox = new JCheckBox(ACTION_FACTORY.createToggle(false, "mapSizeDefault", this)); @@ -146,38 +142,22 @@ this.mainControl = mainControl; this.mapType = mapType; - setMessage(createPanel(filename)); + this.filename = filename; + setMessage(createPanel()); } - private JPanel createPanel(final String filename) { + private JPanel createPanel() { final JPanel newLevelFromScratchPanel = new JPanel(); newLevelFromScratchPanel.setLayout(new BoxLayout(newLevelFromScratchPanel, BoxLayout.Y_AXIS)); newLevelFromScratchPanel.setBorder(IGUIConstants.DIALOG_BORDER); - // file name panel - final JPanel fileNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - if (mapType == MapType.PICKMAP) { - fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapPickmapName"))); - } else { - fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapFileName"))); - } - if (filename != null && filename.length() > 0) { - fileNameField.setText(filename); - } - fileNamePanel.add(fileNameField); - if (mapType == MapType.PICKMAP) { - newLevelFromScratchPanel.add(fileNamePanel); - newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - } - if (mapType == MapType.GAMEMAP) { - // map name panel - final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - mapNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapMapName"))); - mapNamePanel.add(mapNameField); - newLevelFromScratchPanel.add(mapNamePanel); - newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - } + // map name panel + final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + mapNamePanel.add(new JLabel(ACTION_FACTORY.getString(mapType == MapType.PICKMAP ? "newMapPickmapName" : "newMapMapName"))); + mapNamePanel.add(mapNameField); + newLevelFromScratchPanel.add(mapNamePanel); + newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); newLevelFromScratchPanel.add(mapSizeDefaultCheckbox); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); @@ -281,10 +261,10 @@ maparch.setMapSize(new Size2D(width, height)); - // the mapmaker must enter a mapname to create a new map + // the mapmaker must enter a name -- both for maps and pickmaps final String mapName = mapNameField.getText(); - if (mapType == MapType.GAMEMAP && (mapName == null || mapName.length() <= 0)) { - ACTION_FACTORY.showMessageDialog(this, "newMapNoName"); + if (mapName == null || mapName.length() <= 0) { + ACTION_FACTORY.showMessageDialog(this, mapType == MapType.PICKMAP ? "newPickmapNoName" : "newMapNoName"); mapNameField.requestFocus(); return false; } @@ -294,16 +274,10 @@ prefs.putInt(DEFAULT_LEVEL_HEIGHT_KEY, height); } - // set file name - String strfileName = fileNameField.getText(); - if (strfileName.length() < 1) { - strfileName = IGUIConstants.DEF_MAPFNAME; - } - maparch.setFileName(strfileName); - - // set map name + // set map name, file name and difficulty if (mapType == MapType.GAMEMAP) { maparch.setMapName(mapName); + maparch.setFileName(filename != null ? filename : IGUIConstants.DEF_MAPFNAME); try { maparch.setDifficulty((Integer) mapDifficultyField.getValue()); } catch (final IllegalArgumentException e) { @@ -314,6 +288,7 @@ } } else if (mapType == MapType.PICKMAP) { maparch.setMapName("pickmap"); + maparch.setFileName(mapName); } // default map text: @@ -342,13 +317,10 @@ dialog.getRootPane().setDefaultButton(pane.okButton); dialog.setModal(false); - // TODO: localize - pane.mapNameField.setText("Unnamed Map"); pane.setMapSizeDefault(true); dialog.setVisible(true); pane.mapNameField.selectAll(); - pane.fileNameField.selectAll(); pane.mapWidthField.selectAll(); pane.mapHeightField.selectAll(); } Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-11-29 21:04:12 UTC (rev 756) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-11-30 19:51:40 UTC (rev 757) @@ -36,7 +36,6 @@ # New Map newMap.title=Neue Karte erstellen newPickmap.title=Neue Pickmap erstellen -newMapFileName=Dateiname: newMapMapName=Name: newMapParameter=Parameter newMapPickmapName=Name: @@ -46,6 +45,8 @@ newMapDimensionNotANumber.message=Die Kartengr\xF6\xDFe muss ganzzahlig sein. newMapNoName.title=Kartenname fehlt newMapNoName.message=Der Kartenname fehlt. Jede Karte muss einen Namen besitzen.\nEr wird in-game verwendet und sollte die Karte beschreiben.\nKartennamen m\xFCssen nicht eindeutig sein. +newPickmapNoName.title=Pickmap fehlt +newPickmapNoName.message=Der Pickmapname fehlt. Es ist ein eindeutiger Name erforderlich. mapTitle={0} ({1}) - Karteneigenschaften mapMap=Karte Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-11-29 21:04:12 UTC (rev 756) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-11-30 19:51:40 UTC (rev 757) @@ -19,7 +19,6 @@ # New Map newMap.title=Create New Map newPickmap.title=Create New Pickmap -newMapFileName=File name: newMapMapName=Map name: newMapParameter=Parameters newMapPickmapName=Pickmap name: @@ -29,6 +28,8 @@ newMapDimensionNotANumber.message=Map dimensions must be numerical integer values! newMapNoName.title=Map Name is missing newMapNoName.message=You must enter a map name! This name will appear\nin the game, so it should be a descriptive name.\nMap names do not need to be unique. +newPickmapNoName.title=Pickmap name is missing +newPickmapNoName.message=You must enter a pickmap name! # Other Strings mapWidth=Width This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-11-29 21:04:19
|
Revision: 756 http://svn.sourceforge.net/gridarta/?rev=756&view=rev Author: christianhujer Date: 2006-11-29 13:04:12 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Added unified message properties for default Locale. ActionFactories are set with parent factory for that. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFJavaEditor.java trunk/crossfire/src/cfeditor/messages.properties trunk/daimonin/src/daieditor/CFJavaEditor.java trunk/daimonin/src/daieditor/messages.properties trunk/src/app/net/sf/gridarta/action.properties Added Paths: ----------- trunk/src/app/net/sf/gridarta/messages.properties Modified: trunk/crossfire/src/cfeditor/CFJavaEditor.java =================================================================== --- trunk/crossfire/src/cfeditor/CFJavaEditor.java 2006-11-29 19:40:40 UTC (rev 755) +++ trunk/crossfire/src/cfeditor/CFJavaEditor.java 2006-11-29 21:04:12 UTC (rev 756) @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; +import net.sf.japi.swing.ActionFactory; /** * Main class, launches the level editor application. @@ -51,6 +52,8 @@ * @param args The command line parameters given to the level editor. */ public static void main(final String[] args) { + final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); + actionFactory.addParent(ActionFactory.getFactory("net.sf.gridarta")); final List<String> infiles = new ArrayList<String>(); // map file names to open initially String outfile = null; // if specified in the parameters, create image of map and exit String inlist = null; Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-11-29 19:40:40 UTC (rev 755) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-11-29 21:04:12 UTC (rev 756) @@ -2,59 +2,5 @@ # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding # Dialogs -pickmapExists.title=Cannot Create Pickmap -pickmapExists.message=A pickmap named {0} already exists.\nEither remove the existing one or choose a different name. -# New Map -newMap.title=Create New Map -newPickmap.title=Create New Pickmap -newMapFileName=File name: -newMapMapName=Map name: -newMapParameter=Parameters -newMapPickmapName=Pickmap name: -newMapDimensionOutOfRange.title=Illegal Value -newMapDimensionOutOfRange.message=Map dimensions must be greater or equal 1 and less or equal 2147483647 -newMapDimensionNotANumber.title=Illegal Value -newMapDimensionNotANumber.message=Map dimensions must be numerical integer values! -newMapNoName.title=Map Name is missing -newMapNoName.message=You must enter a map name! This name will appear\nin the game, so it should be a descriptive name.\nMap names do not need to be unique. -mapWidth=Width -mapHeight=Height -mapOkay.text=Ok -mapCancel.text=Cancel - -#replace -replaceTitle=Replace -replaceOn=On -replaceOnMap=entire map -replaceOnSelection=selected squares of -replaceDelete=delete objects with -replaceBy=and replace by -replaceByObject=object -replaceByNothing=nothing - -replaceMapGone.title=Error with Replace -replaceMapGone.message=Map {0} is no longer available.\n -replaceMapNoSelection.title=No selection -replaceMapNoSelection.message=You chose to replace on selected squares of\nmap "{0}", but there is no selected area. -replacedZero.title=Replace failed -replacedZero.message=No matching object found. -replacedOne.title=Replace successful -replacedOne.message=1 Object has been replaced. -replacedMany.title=Replace successful -replacedMany.message={0} Objects have been replaced. - -replaceOk.text=OK -replaceCancel.text=Cancel - -#attribute dialog -attribTitle=Object Attributes -attribHelp.text=Help -attribSummary.text=Summary -attribEdit.text=Edit -attribOk.text=Ok -attribApply.text=Apply -attribCancel.text=Cancel - -fileDialog.filter.python=Python Scripts Modified: trunk/daimonin/src/daieditor/CFJavaEditor.java =================================================================== --- trunk/daimonin/src/daieditor/CFJavaEditor.java 2006-11-29 19:40:40 UTC (rev 755) +++ trunk/daimonin/src/daieditor/CFJavaEditor.java 2006-11-29 21:04:12 UTC (rev 756) @@ -67,7 +67,9 @@ Locale.setDefault(new Locale(locName)); } // Now add prefs to the ActionFactory. - ActionFactory.getFactory("daieditor").addPref(CMainControl.class); + final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); + actionFactory.addPref(CMainControl.class); + actionFactory.addParent(ActionFactory.getFactory("net.sf.gridarta")); final SplashScreen splashScreen = new SplashScreen(); splashScreen.show(); final List<String> infiles = new ArrayList<String>(); // map file names to open initially Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-11-29 19:40:40 UTC (rev 755) +++ trunk/daimonin/src/daieditor/messages.properties 2006-11-29 21:04:12 UTC (rev 756) @@ -1,4 +1,4 @@ -#mapDifficultyField.getValue()); Warning: This file MUST be ISO-8859-1 +# Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding mainWindow.title=Gridarta for Daimonin {0} @@ -51,8 +51,6 @@ overwriteOtherFile.title=Overwrite file? overwriteOtherFile.message=A file named "{0}" already exists.\n\nReally overwrite it? -pickmapExists.title=Cannot Create Pickmap -pickmapExists.message=A pickmap named {0} already exists.\nEither remove the existing one or choose a different name. mapOutOfMemory.title=Out Of Memory mapOutOfMemory.message=<html>Not enough memory available to open this map!<br>You can increase the memory limit by using the <code>-Xmx</code> runtime flag.<br>For example: <code>java -Xmx128m -jar DaimoninEditor.jar</code></html> @@ -135,19 +133,6 @@ createNewEventException.message=Can''t create script path from map. Perhaps you should save your map first. openScriptNotFound.title=Script file not found openScriptNotFound.message=The file ''{0}'' does not exist.\nPlease correct the path. -# New Map -newMap.title=Create New Map -newPickmap.title=Create New Pickmap -newMapFileName=File name: -newMapMapName=Map name: -newMapParameter=Parameters -newMapPickmapName=Pickmap name: -newMapDimensionOutOfRange.title=Illegal Value -newMapDimensionOutOfRange.message=Map dimensions must be greater or equal 1 and less or equal 2147483647 -newMapDimensionNotANumber.title=Illegal Value -newMapDimensionNotANumber.message=Map dimensions must be numerical integer values! -newMapNoName.title=Map Name is missing -newMapNoName.message=You must enter a map name! This name will appear\nin the game, so it should be a descriptive name.\nMap names do not need to be unique. newMapDifficultyNotANumber.title=Illegal Value newMapDifficultyNotANumber.message=Map difficulty must be a numerical integer value. newMapDifficultyOutOfRange.title=Illegal Value @@ -183,8 +168,6 @@ mapMap=Map mapName=Name mapSound=Background sound -mapWidth=Width -mapHeight=Height mapOutdoor=Outdoor mapFixedReset=Fixed Reset mapOptions=Options @@ -222,9 +205,7 @@ mapShrink.title=Confirm shrinking map mapShrink.message=You selected a new map size of {0,number,integer} \xD7 {1,number,integer}. If the map was\nresized in this way, some objects would get cut off and deleted.\nAre you really sure you want this? mapHelp.text=Help -mapOkay.text=Ok mapRestore.text=Restore -mapCancel.text=Cancel mapSizeDefault.text=default map size (24 \xD7 24) mapErrorUnsaved.title=Missing File Path mapErrorUnsaved.message=Can''t attach unsaved map.\nMap must be saved to the map folder first! @@ -259,33 +240,10 @@ mapTileChoose.shortdescription=Choose path to tile map mapTilePathMode.shortdescription=Switch between relative and absolute path -#replace -replaceTitle=Replace -replaceOn=On -replaceOnMap=entire map -replaceOnSelection=selected squares of -replaceDelete=delete objects with -replaceBy=and replace by -replaceByObject=object replaceByCopyBuffer=clipboard replaceByPickmap=pickmap -replaceByNothing=nothing -replaceMapGone.title=Error with Replace -replaceMapGone.message=Map {0} is no longer available.\n -replaceMapNoSelection.title=No selection -replaceMapNoSelection.message=You chose to replace on selected squares of\nmap "{0}", but there is no selected area. -replacedZero.title=Replace failed -replacedZero.message=No matching object found. -replacedOne.title=Replace successful -replacedOne.message=1 Object has been replaced. -replacedMany.title=Replace successful -replacedMany.message={0} Objects have been replaced. -replaceOk.text=OK -replaceCancel.text=Cancel - - arcDoc.htmlText=<html><head><meta name="CFJavaEditor" content="tmp"><title>{0}</title></head><body><h1 style="text-align:center;colour:navy;">Type: {0}</h1><h3 style="colour:navy;">Functionality of {0}</h3><p>{1}</p><h3 style="colour:navy;">Notes on Usage:</h3><p>{2}</p></body></html> # Options @@ -324,15 +282,6 @@ oldLibsFound.message=Old libraries found.\nLocation: {0}\nThey aren''t used anymore.\nDelete them? oldLibsFound.title=Delete old libraries? -#attribute dialog -attribTitle=Object Attributes -attribHelp.text=Help -attribSummary.text=Summary -attribEdit.text=Edit -attribOk.text=Ok -attribApply.text=Apply -attribCancel.text=Cancel - archCollectArches=Collecting Arches... archCollectAnimations=Collecting Animations... archCollectAnimationTree=Collecting Animation Tree... @@ -368,7 +317,6 @@ file.mnemonic=F fileDialog.title=Open Map Or Script Files fileDialog.filter.maps=Map Files -fileDialog.filter.python=Python Scripts fileDialog.filter.lua=Lua Scripts fileDialog.filter.png=PNG Images fileDialog.filter.arc=Archetype definitions Modified: trunk/src/app/net/sf/gridarta/action.properties =================================================================== --- trunk/src/app/net/sf/gridarta/action.properties 2006-11-29 19:40:40 UTC (rev 755) +++ trunk/src/app/net/sf/gridarta/action.properties 2006-11-29 21:04:12 UTC (rev 756) @@ -1,9 +1,4 @@ -namedTreeNodeWithoutPath=No path! Object Path: {0} Object Name: {1} Object Type: {2} -chooseNamedObject.title=Choose a {0} -archCollectArches=Collecting Arches... -archCollectAnimations=Collecting Animations... -archCollectAnimationTree=Collecting Animation Tree... -archCollectImages=Collecting Images... -archCollectDone=Collect Arches: done -nameOfAnimationObject=Animation -nameOfFaceObject=Face +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +ActionFactory.additionalBundles=net.sf.gridarta.messages Added: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties (rev 0) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-11-29 21:04:12 UTC (rev 756) @@ -0,0 +1,72 @@ +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +namedTreeNodeWithoutPath=No path! Object Path: {0} Object Name: {1} Object Type: {2} +chooseNamedObject.title=Choose a {0} +archCollectArches=Collecting Arches... +archCollectAnimations=Collecting Animations... +archCollectAnimationTree=Collecting Animation Tree... +archCollectImages=Collecting Images... +archCollectDone=Collect Arches: done +nameOfAnimationObject=Animation +nameOfFaceObject=Face + + +# Dialogs +pickmapExists.title=Cannot Create Pickmap +pickmapExists.message=A pickmap named {0} already exists.\nEither remove the existing one or choose a different name. + +# New Map +newMap.title=Create New Map +newPickmap.title=Create New Pickmap +newMapFileName=File name: +newMapMapName=Map name: +newMapParameter=Parameters +newMapPickmapName=Pickmap name: +newMapDimensionOutOfRange.title=Illegal Value +newMapDimensionOutOfRange.message=Map dimensions must be greater or equal 1 and less or equal 2147483647 +newMapDimensionNotANumber.title=Illegal Value +newMapDimensionNotANumber.message=Map dimensions must be numerical integer values! +newMapNoName.title=Map Name is missing +newMapNoName.message=You must enter a map name! This name will appear\nin the game, so it should be a descriptive name.\nMap names do not need to be unique. + +# Other Strings +mapWidth=Width +mapHeight=Height +mapOkay.text=Ok +mapCancel.text=Cancel + +#replace +replaceTitle=Replace +replaceOn=On +replaceOnMap=entire map +replaceOnSelection=selected squares of +replaceDelete=delete objects with +replaceBy=and replace by +replaceByObject=object +replaceByNothing=nothing + +replaceMapGone.title=Error with Replace +replaceMapGone.message=Map {0} is no longer available.\n +replaceMapNoSelection.title=No selection +replaceMapNoSelection.message=You chose to replace on selected squares of\nmap "{0}", but there is no selected area. +replacedZero.title=Replace failed +replacedZero.message=No matching object found. +replacedOne.title=Replace successful +replacedOne.message=1 Object has been replaced. +replacedMany.title=Replace successful +replacedMany.message={0} Objects have been replaced. + +replaceOk.text=OK +replaceCancel.text=Cancel + +#attribute dialog +attribTitle=Object Attributes +attribHelp.text=Help +attribSummary.text=Summary +attribEdit.text=Edit +attribOk.text=Ok +attribApply.text=Apply +attribCancel.text=Cancel + +fileDialog.filter.python=Python Scripts Property changes on: trunk/src/app/net/sf/gridarta/messages.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:40:41
|
Revision: 755 http://svn.sourceforge.net/gridarta/?rev=755&view=rev Author: akirschbaum Date: 2006-11-29 11:40:40 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Unify comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CNewMapDialog.java Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-29 19:33:08 UTC (rev 754) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-29 19:40:40 UTC (rev 755) @@ -241,6 +241,7 @@ maparch.setMapSize(new Size2D(width, height)); + // the mapmaker must enter a mapname to create a new map final String mapName = mapNameField.getText(); if (mapType == MapType.GAMEMAP && (mapName == null || mapName.length() <= 0)) { ACTION_FACTORY.showMessageDialog(this, "newMapNoName"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:33:09
|
Revision: 754 http://svn.sourceforge.net/gridarta/?rev=754&view=rev Author: akirschbaum Date: 2006-11-29 11:33:08 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Remove debugging comments. Modified Paths: -------------- trunk/daimonin/src/daieditor/CNewMapDialog.java Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-29 19:30:50 UTC (rev 753) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-29 19:33:08 UTC (rev 754) @@ -146,7 +146,6 @@ this.mainControl = mainControl; this.mapType = mapType; - //getContentPane().setLayout(new BorderLayout()); setMessage(createPanel(filename)); } @@ -242,8 +241,6 @@ // Create a new level from scratch final MapArchObject maparch = new MapArchObject(); - //maparch.setWidth(IGUIConstants.DEF_MAPSIZE); - //maparch.setHeight(IGUIConstants.DEF_MAPSIZE); // Get and validate the width final int width; @@ -370,7 +367,6 @@ */ public void setMapSizeDefault(final boolean mapSizeDefault) { mapSizeDefaultCheckbox.setSelected(mapSizeDefault); - //System.err.println(mapSizeDefaultCheckbox.isSelected() + " " + mapSizeDefault); this.mapSizeDefault = mapSizeDefault; mapWidthField.setEnabled(!mapSizeDefault); mapHeightField.setEnabled(!mapSizeDefault); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:30:51
|
Revision: 753 http://svn.sourceforge.net/gridarta/?rev=753&view=rev Author: akirschbaum Date: 2006-11-29 11:30:50 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Unify assert statement. Modified Paths: -------------- trunk/daimonin/src/daieditor/CNewMapDialog.java Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-29 19:28:19 UTC (rev 752) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-29 19:30:50 UTC (rev 753) @@ -204,6 +204,7 @@ if (mapType == MapType.PICKMAP) { mapHeightField.setValue(IGUIConstants.DEF_PICKMAP_HEIGHT); } else { + assert mapType == MapType.GAMEMAP; mapHeightField.setValue(prefs.getInt(DEFAULT_LEVEL_HEIGHT_KEY, IGUIConstants.DEF_MAPSIZE)); } mapHeightField.setColumns(3); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:28:19
|
Revision: 752 http://svn.sourceforge.net/gridarta/?rev=752&view=rev Author: akirschbaum Date: 2006-11-29 11:28:19 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Use MapType class for map types. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CNewMapDialog.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-11-29 19:17:52 UTC (rev 751) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-11-29 19:28:19 UTC (rev 752) @@ -58,6 +58,7 @@ import net.sf.gridarta.gameobject.Collectable; import net.sf.gridarta.gameobject.Collector; import net.sf.gridarta.gui.HideFileFilterProxy; +import net.sf.gridarta.map.MapType; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; import net.sf.japi.swing.ActionFactory; import net.sf.japi.util.filter.file.EndingFileFilter; @@ -622,14 +623,14 @@ */ public void newLevelWanted(final String filename) { CMainStatusbar.getInstance().setText(" Creating new map..."); - CNewMapDialog.showNewMapDialog(this, mainView, filename, CNewMapDialog.TYPE_CFMAP); + CNewMapDialog.showNewMapDialog(this, mainView, filename, MapType.GAMEMAP); CMainStatusbar.getInstance().setText(""); } /** Invoked when user wants to open a new pickmap */ public void newPickmapWanted() { CMainStatusbar.getInstance().setText(" Creating new pickmap..."); - CNewMapDialog.showNewMapDialog(this, mainView, null, CNewMapDialog.TYPE_PICKMAP); + CNewMapDialog.showNewMapDialog(this, mainView, null, MapType.PICKMAP); CMainStatusbar.getInstance().setText(""); } Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-29 19:17:52 UTC (rev 751) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-29 19:28:19 UTC (rev 752) @@ -45,6 +45,7 @@ import javax.swing.border.EtchedBorder; import javax.swing.border.TitledBorder; import net.sf.gridarta.Size2D; +import net.sf.gridarta.map.MapType; import net.sf.japi.swing.ActionFactory; /** @@ -62,12 +63,6 @@ /** Action Factory. */ private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); - /** Map types. */ - public static final int TYPE_CFMAP = 0; - - /** Map types. */ - public static final int TYPE_PICKMAP = 1; - /** The key value used to store the last used level width to INI file. */ private static final String DEFAULT_LEVEL_WIDTH_KEY = "NewLevelDialog.mapWidth"; @@ -78,7 +73,7 @@ private final CMainControl mainControl; /** type of map to create: pickmap or normal map? */ - private final int mapType; + private final MapType mapType; /** * Textfield for the name of the map. @@ -116,7 +111,7 @@ * @param filename desired filename for new map, null if not specified * @param mapType type of map to create */ - private CNewMapDialog(final CMainControl mainControl, final String filename, final int mapType) { + private CNewMapDialog(final CMainControl mainControl, final String filename, final MapType mapType) { okButton.setDefaultCapable(true); setOptions(new Object[]{okButton, cancelButton}); @@ -132,7 +127,7 @@ newLevelFromScratchPanel.setBorder(IGUIConstants.DIALOG_BORDER); // file name panel final JPanel fileNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - if (mapType == TYPE_PICKMAP) { + if (mapType == MapType.PICKMAP) { fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapPickmapName"))); } else { fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapFileName"))); @@ -141,12 +136,12 @@ fileNameField.setText(filename); } fileNamePanel.add(fileNameField); - if (mapType == TYPE_PICKMAP) { + if (mapType == MapType.PICKMAP) { newLevelFromScratchPanel.add(fileNamePanel); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); } - if (mapType == TYPE_CFMAP) { + if (mapType == MapType.GAMEMAP) { // map name panel final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); mapNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapMapName"))); @@ -167,19 +162,19 @@ gbcField.gridwidth = GridBagConstraints.REMAINDER; mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), ACTION_FACTORY.getString("newMapParameters")), IGUIConstants.DIALOG_BORDER)); mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapWidth")), gbcLabel); - if (mapType == TYPE_PICKMAP) { + if (mapType == MapType.PICKMAP) { mapWidthField.setValue(IGUIConstants.DEF_PICKMAP_WIDTH); } else { - assert mapType == TYPE_CFMAP; + assert mapType == MapType.GAMEMAP; mapWidthField.setValue(Integer.valueOf(settings.getProperty(DEFAULT_LEVEL_WIDTH_KEY, String.valueOf(IGUIConstants.DEF_MAPSIZE)))); } mapWidthField.setColumns(3); mapSizePanel.add(mapWidthField, gbcField); mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapHeight")), gbcLabel); - if (mapType == TYPE_PICKMAP) { + if (mapType == MapType.PICKMAP) { mapHeightField.setValue(IGUIConstants.DEF_PICKMAP_HEIGHT); } else { - assert mapType == TYPE_CFMAP; + assert mapType == MapType.GAMEMAP; mapHeightField.setValue(Integer.valueOf(settings.getProperty(DEFAULT_LEVEL_HEIGHT_KEY, String.valueOf(IGUIConstants.DEF_MAPSIZE)))); } mapHeightField.setColumns(3); @@ -247,7 +242,7 @@ maparch.setMapSize(new Size2D(width, height)); final String mapName = mapNameField.getText(); - if (mapType == TYPE_CFMAP && (mapName == null || mapName.length() <= 0)) { + if (mapType == MapType.GAMEMAP && (mapName == null || mapName.length() <= 0)) { ACTION_FACTORY.showMessageDialog(this, "newMapNoName"); mapNameField.requestFocus(); return false; @@ -259,7 +254,7 @@ return false; } - if (mapType == TYPE_CFMAP) { + if (mapType == MapType.GAMEMAP) { final CSettings settings = CSettings.getInstance(IGUIConstants.APP_NAME); settings.setProperty(DEFAULT_LEVEL_WIDTH_KEY, String.valueOf(width)); settings.setProperty(DEFAULT_LEVEL_HEIGHT_KEY, String.valueOf(height)); @@ -273,9 +268,9 @@ maparch.setFileName(strfileName); // set map name - if (mapType == TYPE_CFMAP) { + if (mapType == MapType.GAMEMAP) { maparch.setMapName(mapName); - } else if (mapType == TYPE_PICKMAP) { + } else if (mapType == MapType.PICKMAP) { maparch.setMapName("pickmap"); } @@ -285,9 +280,9 @@ maparch.addText("Date: " + (today.get(Calendar.MONTH) + 1) + "/" + today.get(Calendar.DAY_OF_MONTH) + "/" + today.get(Calendar.YEAR)); - if (mapType == TYPE_CFMAP) { + if (mapType == MapType.GAMEMAP) { mainControl.newLevel(null, maparch, null); - } else if (mapType == TYPE_PICKMAP) { + } else if (mapType == MapType.PICKMAP) { return CPickmapPanel.getInstance().addNewPickmap(parent, maparch); } @@ -301,9 +296,9 @@ * @param filename desired filename for new map, null if not specified * @param mapType type of map to create */ - public static void showNewMapDialog(final CMainControl mainControl, final Component parentComponent, final String filename, final int mapType) { + public static void showNewMapDialog(final CMainControl mainControl, final Component parentComponent, final String filename, final MapType mapType) { final CNewMapDialog pane = new CNewMapDialog(mainControl, filename, mapType); - final JDialog dialog = pane.createDialog(parentComponent, ACTION_FACTORY.getString(mapType == TYPE_PICKMAP ? "newPickmap.title" : "newMap.title")); + final JDialog dialog = pane.createDialog(parentComponent, ACTION_FACTORY.getString(mapType == MapType.PICKMAP ? "newPickmap.title" : "newMap.title")); dialog.getRootPane().setDefaultButton(pane.okButton); dialog.setModal(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:17:51
|
Revision: 751 http://svn.sourceforge.net/gridarta/?rev=751&view=rev Author: akirschbaum Date: 2006-11-29 11:17:52 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Remove incorrect annotation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:14:44 UTC (rev 750) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:17:52 UTC (rev 751) @@ -42,7 +42,6 @@ import javax.swing.event.ChangeListener; import net.sf.japi.swing.ActionFactory; import org.apache.log4j.Logger; -import org.jetbrains.annotations.Nullable; /** * The <code>CPickmapPanel</code> manages the pickmap panel @@ -214,7 +213,7 @@ * @param maparch the maparch of the pickmap * @return basic mapview */ - @Nullable private CMapViewBasic newPickmap(final List<GameObject> objects, final MapArchObject maparch, final File mapFile) { + private CMapViewBasic newPickmap(final List<GameObject> objects, final MapArchObject maparch, final File mapFile) { final MapControl mapControl = new MapControl(mainControl, objects, maparch, true, null); mapControl.getMapViewFrame().setAutoscrolls(true); mapControl.setMapFile(mapFile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:14:44
|
Revision: 750 http://svn.sourceforge.net/gridarta/?rev=750&view=rev Author: akirschbaum Date: 2006-11-29 11:14:44 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Whitespace changes. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:13:44 UTC (rev 749) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:14:44 UTC (rev 750) @@ -328,8 +328,7 @@ } public void stateChanged(final ChangeEvent e) { - if (activePickmap == null || activePickmap.length() <= 0 || - !tabpane.getTitleAt(tabpane.getSelectedIndex()).equals(activePickmap)) { + if (activePickmap == null || activePickmap.length() <= 0 || !tabpane.getTitleAt(tabpane.getSelectedIndex()).equals(activePickmap)) { // new pickmap is active updateActivePickmap(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:13:43
|
Revision: 749 http://svn.sourceforge.net/gridarta/?rev=749&view=rev Author: akirschbaum Date: 2006-11-29 11:13:44 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Add final modifier. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:11:35 UTC (rev 748) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:13:44 UTC (rev 749) @@ -318,7 +318,7 @@ // ------------------------ nested and inner classes ------------------------ /** listener class to keep track of the currently active pickmap */ - public final class PickmapSelectionListener implements ChangeListener { + private final class PickmapSelectionListener implements ChangeListener { private final String activePickmap; // file-name of active pickmap @@ -343,7 +343,7 @@ * This listener gets to know which of them is active and * keeps the main view informed whenever the state changes. */ - public static final class ArchNPickChangeListener implements ChangeListener { + private static final class ArchNPickChangeListener implements ChangeListener { private final CMainView mainView; // main view This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:11:35
|
Revision: 748 http://svn.sourceforge.net/gridarta/?rev=748&view=rev Author: akirschbaum Date: 2006-11-29 11:11:35 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Rename variable names. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/daimonin/src/daieditor/CPickmapPanel.java Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:05:26 UTC (rev 747) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:11:35 UTC (rev 748) @@ -215,17 +215,17 @@ * @return basic mapview */ @Nullable private CMapViewBasic newPickmap(final List<GameObject> objects, final MapArchObject maparch, final File mapFile) { - final MapControl map = new MapControl(mainControl, objects, maparch, true, null); - map.getMapViewFrame().setAutoscrolls(true); - map.setMapFile(mapFile); + final MapControl mapControl = new MapControl(mainControl, objects, maparch, true, null); + mapControl.getMapViewFrame().setAutoscrolls(true); + mapControl.setMapFile(mapFile); // add pickmap to hashtable - pickmaps.put(mapFile.getName(), map); + pickmaps.put(mapFile.getName(), mapControl); - currentPickMap = map; - map.getMapModel().resetLevelChangedFlag(); + currentPickMap = mapControl; + mapControl.getMapModel().resetLevelChangedFlag(); - return map.getMapViewFrame().getBasicView(); + return mapControl.getMapViewFrame().getBasicView(); } /** Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-29 19:05:26 UTC (rev 747) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-29 19:11:35 UTC (rev 748) @@ -207,30 +207,30 @@ * @return basic mapview */ private CMapViewBasic newPickmap(final List<GameObject> objects, final MapArchObject maparch, final File mapFile, final int index) { - final MapControl map = new MapControl(mainControl, objects, maparch, true, true); - map.getMapViewFrame().setAutoscrolls(true); - map.setMapFile(mapFile); + final MapControl mapControl = new MapControl(mainControl, objects, maparch, true, true); + mapControl.getMapViewFrame().setAutoscrolls(true); + mapControl.setMapFile(mapFile); // add pickmap to vector if (index < 0 || index >= pickmaps.size()) { - pickmaps.add(map); + pickmaps.add(mapControl); } else { - pickmaps.add(index, map); + pickmaps.add(index, mapControl); } - currentPickMap = map; - return map.getMapViewFrame().getBasicView(); + currentPickMap = mapControl; + return mapControl.getMapViewFrame().getBasicView(); } /** * Close a pickmap: Remove it from the panel and the data vector. - * @param map MapControl of the pickmap to remove + * @param mapControl MapControl of the pickmap to remove * @return true when closing successful */ - public boolean closePickmap(final MapControl map) { + public boolean closePickmap(final MapControl mapControl) { boolean mapClosed = false; for (int i = 0; !mapClosed && i < pickmaps.size(); i++) { final MapControl tmpMap = pickmaps.get(i); - if (tmpMap == map) { + if (tmpMap == mapControl) { pickmaps.remove(i); tabpane.remove(i); mapClosed = true; @@ -246,12 +246,12 @@ /** * Get tab index of a pickmap in the JTabbedPane. - * @param map control + * @param mapControl control * @return tab index of pickmap, or -1 if it doesn't exist */ - public int getPickmapTabIndex(final MapControl map) { + public int getPickmapTabIndex(final MapControl mapControl) { for (int i = 0; i < pickmaps.size(); i++) { - if (pickmaps.get(i) == map) { + if (pickmaps.get(i) == mapControl) { return i; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:05:28
|
Revision: 747 http://svn.sourceforge.net/gridarta/?rev=747&view=rev Author: akirschbaum Date: 2006-11-29 11:05:26 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Whitespace changes. Modified Paths: -------------- trunk/daimonin/src/daieditor/CPickmapPanel.java Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-29 19:02:36 UTC (rev 746) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-29 19:05:26 UTC (rev 747) @@ -219,7 +219,6 @@ } currentPickMap = map; return map.getMapViewFrame().getBasicView(); - } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 19:02:42
|
Revision: 746 http://svn.sourceforge.net/gridarta/?rev=746&view=rev Author: akirschbaum Date: 2006-11-29 11:02:36 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Properly center error message in create new pickmap dialog. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/daimonin/src/daieditor/CNewMapDialog.java trunk/daimonin/src/daieditor/CPickmapPanel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-11-29 18:55:53 UTC (rev 745) +++ trunk/crossfire/ChangeLog 2006-11-29 19:02:36 UTC (rev 746) @@ -1,3 +1,7 @@ +2006-11-29 Andreas Kirschbaum + + * Properly center error message in create new pickmap dialog. + 2006-11-24 Andreas Kirschbaum * Do not crash in cut or delete when the region contains Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-29 18:55:53 UTC (rev 745) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-29 19:02:36 UTC (rev 746) @@ -192,7 +192,7 @@ /** Action method for okay. */ public void mapOkay() { - if (createNewLevel()) { + if (createNewLevel(this)) { setValue(okButton); } } @@ -204,9 +204,10 @@ /** * Checks the given values and creates a new level. + * @param parent the parent component to be used for error messages * @return True if the level was created, false if the parameters were wrong. */ - private boolean createNewLevel() { + private boolean createNewLevel(final Component parent) { // Create a new level from scratch final MapArchObject maparch = new MapArchObject(); @@ -287,7 +288,7 @@ if (mapType == TYPE_CFMAP) { mainControl.newLevel(null, maparch, null); } else if (mapType == TYPE_PICKMAP) { - return CPickmapPanel.getInstance().addNewPickmap(maparch); + return CPickmapPanel.getInstance().addNewPickmap(parent, maparch); } return true; Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 18:55:53 UTC (rev 745) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 19:02:36 UTC (rev 746) @@ -28,6 +28,7 @@ import cfeditor.io.CMapReader; import cfeditor.map.MapArchObject; import cfeditor.map.MapControl; +import java.awt.Component; import java.io.File; import java.io.IOException; import java.util.Arrays; @@ -176,15 +177,16 @@ /** * Create a new pickmap and display it. + * @param parent the parent component to be used for error messages * @param maparch MapArchObject containing map name and -size * @return <code>true</code> if the pickmap was added, <code>false</code> * if an error has occurred */ - public boolean addNewPickmap(final MapArchObject maparch) { + public boolean addNewPickmap(final Component parent, final MapArchObject maparch) { final File mapFile = new File(IGUIConstants.PICKMAP_DIR, maparch.getFileName()); if (mapFile.exists()) { - ACTION_FACTORY.showMessageDialog(tabpane, "pickmapExists", mapFile); + ACTION_FACTORY.showMessageDialog(parent, "pickmapExists", mapFile); return false; } if (!mapFile.getParentFile().exists()) { Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-29 18:55:53 UTC (rev 745) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-29 19:02:36 UTC (rev 746) @@ -222,7 +222,7 @@ /** Action method for okay. */ public void mapOkay() { - if (createNewLevel()) { + if (createNewLevel(this)) { setValue(okButton); } } @@ -234,9 +234,10 @@ /** * Checks the given values and creates a new level. + * @param parent the parent component to be used for error messages * @return True if the level was created, false if the parameters were wrong. */ - private boolean createNewLevel() { + private boolean createNewLevel(final Component parent) { // Create a new level from scratch final MapArchObject maparch = new MapArchObject(); @@ -324,7 +325,7 @@ if (mapType == MapType.GAMEMAP) { mainControl.newLevel(null, maparch, true); } else if (mapType == MapType.PICKMAP) { - return CPickmapPanel.getInstance().addNewPickmap(maparch); + return CPickmapPanel.getInstance().addNewPickmap(parent, maparch); } return true; Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-29 18:55:53 UTC (rev 745) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-29 19:02:36 UTC (rev 746) @@ -28,6 +28,7 @@ import daieditor.io.CMapReader; import daieditor.map.MapArchObject; import daieditor.map.MapControl; +import java.awt.Component; import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -171,15 +172,16 @@ /** * Create a new pickmap and display it. + * @param parent the parent component to be used for error messages * @param maparch MapArchObject containing map name and -size * @return <code>true</code> if the pickmap was added, <code>false</code> * if an error has occurred */ - public boolean addNewPickmap(final MapArchObject maparch) { + public boolean addNewPickmap(final Component parent, final MapArchObject maparch) { final File mapFile = new File(new File(CMainControl.getInstance().getArchDefaultFolder(), IGUIConstants.PICKMAP_DIR), maparch.getFileName()); if (mapFile.exists()) { - ACTION_FACTORY.showMessageDialog(tabpane, "pickmapExists", mapFile); + ACTION_FACTORY.showMessageDialog(parent, "pickmapExists", mapFile); return false; } if (!mapFile.getParentFile().exists()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 18:55:53
|
Revision: 745 http://svn.sourceforge.net/gridarta/?rev=745&view=rev Author: akirschbaum Date: 2006-11-29 10:55:53 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Add javadoc comment. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/daimonin/src/daieditor/CPickmapPanel.java Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 18:52:27 UTC (rev 744) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 18:55:53 UTC (rev 745) @@ -177,6 +177,8 @@ /** * Create a new pickmap and display it. * @param maparch MapArchObject containing map name and -size + * @return <code>true</code> if the pickmap was added, <code>false</code> + * if an error has occurred */ public boolean addNewPickmap(final MapArchObject maparch) { Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-29 18:52:27 UTC (rev 744) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-11-29 18:55:53 UTC (rev 745) @@ -172,6 +172,8 @@ /** * Create a new pickmap and display it. * @param maparch MapArchObject containing map name and -size + * @return <code>true</code> if the pickmap was added, <code>false</code> + * if an error has occurred */ public boolean addNewPickmap(final MapArchObject maparch) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 18:52:27
|
Revision: 744 http://svn.sourceforge.net/gridarta/?rev=744&view=rev Author: akirschbaum Date: 2006-11-29 10:52:27 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Use ActionFactory to create GUI elements in CPickmapPanel. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_sv.properties Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 18:08:15 UTC (rev 743) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 18:52:27 UTC (rev 744) @@ -39,6 +39,7 @@ import javax.swing.JTabbedPane; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import net.sf.japi.swing.ActionFactory; import org.apache.log4j.Logger; import org.jetbrains.annotations.Nullable; @@ -51,6 +52,9 @@ private static final Logger log = Logger.getLogger(CPickmapPanel.class); + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); + /** static instance of this class */ private static CPickmapPanel instance; @@ -178,8 +182,7 @@ final File mapFile = new File(IGUIConstants.PICKMAP_DIR, maparch.getFileName()); if (mapFile.exists()) { - mainControl.showMessage("Cannot Create Pickmap", "A pickmap named '" + mapFile + "' already exists.\n" + - "Either remove the existing one or choose a different name.", JOptionPane.ERROR_MESSAGE); + ACTION_FACTORY.showMessageDialog(tabpane, "pickmapExists", mapFile); return false; } if (!mapFile.getParentFile().exists()) { Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-11-29 18:08:15 UTC (rev 743) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-11-29 18:52:27 UTC (rev 744) @@ -1,6 +1,10 @@ # Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding +# Dialogs +pickmapExists.title=Cannot Create Pickmap +pickmapExists.message=A pickmap named {0} already exists.\nEither remove the existing one or choose a different name. + # New Map newMap.title=Create New Map newPickmap.title=Create New Pickmap Modified: trunk/crossfire/src/cfeditor/messages_sv.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_sv.properties 2006-11-29 18:08:15 UTC (rev 743) +++ trunk/crossfire/src/cfeditor/messages_sv.properties 2006-11-29 18:52:27 UTC (rev 744) @@ -1,6 +1,10 @@ # Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding +# Dialogs +pickmapExists.title=Kan inte skapa plockkarta +pickmapExists.message=En plockkarta med namnet {0} finns redan.\nTa antingen bort den tidigare plockkartan eller v\xE4lj ett annat namn. + # New Map newMap.title=Skapa ny karta newPickmap.title=Skapa ny plockkarta This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-29 18:08:19
|
Revision: 743 http://svn.sourceforge.net/gridarta/?rev=743&view=rev Author: akirschbaum Date: 2006-11-29 10:08:15 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Remove file name building by string concatenation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-28 21:47:01 UTC (rev 742) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-29 18:08:15 UTC (rev 743) @@ -176,7 +176,7 @@ */ public boolean addNewPickmap(final MapArchObject maparch) { - final File mapFile = new File(IGUIConstants.PICKMAP_DIR + File.separator + maparch.getFileName()); + final File mapFile = new File(IGUIConstants.PICKMAP_DIR, maparch.getFileName()); if (mapFile.exists()) { mainControl.showMessage("Cannot Create Pickmap", "A pickmap named '" + mapFile + "' already exists.\n" + "Either remove the existing one or choose a different name.", JOptionPane.ERROR_MESSAGE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-28 21:47:05
|
Revision: 742 http://svn.sourceforge.net/gridarta/?rev=742&view=rev Author: akirschbaum Date: 2006-11-28 13:47:01 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Fix incorrect error message for out of memory condition. Modified Paths: -------------- trunk/daimonin/src/daieditor/messages.properties trunk/daimonin/src/daieditor/messages_de.properties trunk/daimonin/src/daieditor/messages_sv.properties Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-11-28 21:40:27 UTC (rev 741) +++ trunk/daimonin/src/daieditor/messages.properties 2006-11-28 21:47:01 UTC (rev 742) @@ -25,12 +25,12 @@ zoomClose.mnemonic=C zoomClose.accel=ctrl pressed W zoomOutOfMem.title=Out of Memory -zoomOutOfMem.message=Not enough memory to generate zoom level.\nTry restarting with -Xmx128 or -Xmx256. +zoomOutOfMem.message=Not enough memory to generate zoom level.\nTry restarting with -Xmx128m or -Xmx256m. zoomSaveException.title=Save zoom zoomSaveException.message=Error while saving zoom. zoomSaveOutOfMem.title=Out of Memory -zoomSaveOutOfMem.message=Not enough memory to save preview, sorry.\nTry restarting with -Xmx128 or -Xmx256. +zoomSaveOutOfMem.message=Not enough memory to save preview, sorry.\nTry restarting with -Xmx128m or -Xmx256m. zoomAlg.text=Zoom Algorithm zoomAlg.mnemonic=A Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-11-28 21:40:27 UTC (rev 741) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-11-28 21:47:01 UTC (rev 742) @@ -23,9 +23,9 @@ zoomClose.mnemonic=C zoomClose.accel=ctrl pressed W -zoomOutOfMem=Nicht genug Speicher f\xFCr Vergr\xF6\xDFerungsstufe.\nVersuche, den Editor mit -Xmx126 oder -Xmx256 zu starten. +zoomOutOfMem=Nicht genug Speicher f\xFCr Vergr\xF6\xDFerungsstufe.\nVersuche, den Editor mit -Xmx128m oder -Xmx256m zu starten. zoomOutOfMem.title=Out of Memory -zoomSaveOutOfMem=Not enough memory to save preview, sorry.\nTry restarting with -Xmx128 or -Xmx256. +zoomSaveOutOfMem=Not enough memory to save preview, sorry.\nTry restarting with -Xmx128m or -Xmx256m. zoomSaveOutOfMem.title=Out of Memory ########## # Dialogs Modified: trunk/daimonin/src/daieditor/messages_sv.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_sv.properties 2006-11-28 21:40:27 UTC (rev 741) +++ trunk/daimonin/src/daieditor/messages_sv.properties 2006-11-28 21:47:01 UTC (rev 742) @@ -23,11 +23,11 @@ zoomClose.mnemonic=C zoomClose.accel=ctrl pressed W zoomOutOfMem.title=Slut p\xE5 minne -zoomOutOfMem.message=Otillr\xE4ckligt minne f\xF6r zoomniv\xE5.\n F\xF6rs\xF6k att starta om med -Xmx128 eller -Xmx256. +zoomOutOfMem.message=Otillr\xE4ckligt minne f\xF6r zoomniv\xE5.\n F\xF6rs\xF6k att starta om med -Xmx128m eller -Xmx256m. zoomSaveException.title=Spara zoom zoomSaveException.message=Kunde inte spara zoom. zoomSaveOutOfMem.title=Slut p\xE5 minne -zoomSaveOutOfMem.message=Otillr\xE4ckligt minne f\xF6r att spara f\xF6rhandsvisning.\nF\xF6rs\xF6k att starta om med -Xmx128 eller -Xmx256. +zoomSaveOutOfMem.message=Otillr\xE4ckligt minne f\xF6r att spara f\xF6rhandsvisning.\nF\xF6rs\xF6k att starta om med -Xmx128m eller -Xmx256m. zoomAlg.text=Zoomalgoritm zoomAlg.mnemonic=A This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-28 21:40:29
|
Revision: 741 http://svn.sourceforge.net/gridarta/?rev=741&view=rev Author: akirschbaum Date: 2006-11-28 13:40:27 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Add German translation for new map dialog. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/daimonin/src/daieditor/CNewMapDialog.java trunk/daimonin/src/daieditor/messages.properties trunk/daimonin/src/daieditor/messages_de.properties Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-28 21:35:33 UTC (rev 740) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-28 21:40:27 UTC (rev 741) @@ -133,9 +133,9 @@ // file name panel final JPanel fileNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); if (mapType == TYPE_PICKMAP) { - fileNamePanel.add(new JLabel("Pickmap Name:")); // TODO cher: i18n/l10n + fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapPickmapName"))); } else { - fileNamePanel.add(new JLabel("File Name:")); // TODO cher: i18n/l10n + fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapFileName"))); } if (filename != null && filename.length() > 0) { fileNameField.setText(filename); @@ -149,7 +149,7 @@ if (mapType == TYPE_CFMAP) { // map name panel final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - mapNamePanel.add(new JLabel("Map Name:")); // TODO cher: i18n/l10n + mapNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapMapName"))); mapNamePanel.add(mapNameField); newLevelFromScratchPanel.add(mapNamePanel); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); @@ -165,7 +165,7 @@ gbcField.insets = new Insets(2, 2, 2, 2); gbcLabel.anchor = GridBagConstraints.EAST; gbcField.gridwidth = GridBagConstraints.REMAINDER; - mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == TYPE_PICKMAP ? "Pickmap Size" : "Map Size"), IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n + mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), ACTION_FACTORY.getString("newMapParameters")), IGUIConstants.DIALOG_BORDER)); mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapWidth")), gbcLabel); if (mapType == TYPE_PICKMAP) { mapWidthField.setValue(IGUIConstants.DEF_PICKMAP_WIDTH); Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-11-28 21:35:33 UTC (rev 740) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-11-28 21:40:27 UTC (rev 741) @@ -4,6 +4,10 @@ # New Map newMap.title=Create New Map newPickmap.title=Create New Pickmap +newMapFileName=File name: +newMapMapName=Map name: +newMapParameter=Parameters +newMapPickmapName=Pickmap name: newMapDimensionOutOfRange.title=Illegal Value newMapDimensionOutOfRange.message=Map dimensions must be greater or equal 1 and less or equal 2147483647 newMapDimensionNotANumber.title=Illegal Value Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2006-11-28 21:35:33 UTC (rev 740) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-11-28 21:40:27 UTC (rev 741) @@ -1,6 +1,20 @@ # Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding +# New Map +newMap.title=Neue Karte erstellen +newPickmap.title=Neue Pickmap erstellen +newMapFileName=Dateiname: +newMapMapName=Name: +newMapParameter=Parameter +newMapPickmapName=Name: +newMapDimensionOutOfRange.title=Ung\xFCltiger Wert +newMapDimensionOutOfRange.message=Die Kartengr\xF6\xDFe muss positiv sein +newMapDimensionNotANumber.title=Ung\xFCltiger Wert +newMapDimensionNotANumber.message=Die Kartengr\xF6\xDFe muss ganzzahlig sein. +newMapNoName.title=Kartenname fehlt +newMapNoName.message=Der Kartenname fehlt. Jede Karte muss einen Namen besitzen.\nEr wird in-game verwendet und sollte die Karte beschreiben.\nKartennamen m\xFCssen nicht eindeutig sein. + mapWidth=Breite mapHeight=H\xF6he mapOkay.text=Ok Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-28 21:35:33 UTC (rev 740) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-28 21:40:27 UTC (rev 741) @@ -158,9 +158,9 @@ // file name panel final JPanel fileNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); if (mapType == MapType.PICKMAP) { - fileNamePanel.add(new JLabel("Pickmap Name:")); // TODO cher: i18n/l10n + fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapPickmapName"))); } else { - fileNamePanel.add(new JLabel("File Name:")); // TODO cher: i18n/l10n + fileNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapFileName"))); } if (filename != null && filename.length() > 0) { fileNameField.setText(filename); @@ -174,7 +174,7 @@ if (mapType == MapType.GAMEMAP) { // map name panel final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - mapNamePanel.add(new JLabel("Map Name:")); // TODO cher: i18n/l10n + mapNamePanel.add(new JLabel(ACTION_FACTORY.getString("newMapMapName"))); mapNamePanel.add(mapNameField); newLevelFromScratchPanel.add(mapNamePanel); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); @@ -190,7 +190,7 @@ gbcField.insets = new Insets(2, 2, 2, 2); gbcLabel.anchor = GridBagConstraints.EAST; gbcField.gridwidth = GridBagConstraints.REMAINDER; - mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == MapType.PICKMAP ? "Pickmap Size" : "Map Size"), IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n + mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), ACTION_FACTORY.getString("newMapParameters")), IGUIConstants.DIALOG_BORDER)); mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapWidth")), gbcLabel); if (mapType == MapType.PICKMAP) { mapWidthField.setValue(IGUIConstants.DEF_PICKMAP_WIDTH); Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-11-28 21:35:33 UTC (rev 740) +++ trunk/daimonin/src/daieditor/messages.properties 2006-11-28 21:40:27 UTC (rev 741) @@ -138,6 +138,10 @@ # New Map newMap.title=Create New Map newPickmap.title=Create New Pickmap +newMapFileName=File name: +newMapMapName=Map name: +newMapParameter=Parameters +newMapPickmapName=Pickmap name: newMapDimensionOutOfRange.title=Illegal Value newMapDimensionOutOfRange.message=Map dimensions must be greater or equal 1 and less or equal 2147483647 newMapDimensionNotANumber.title=Illegal Value Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-11-28 21:35:33 UTC (rev 740) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-11-28 21:40:27 UTC (rev 741) @@ -33,6 +33,20 @@ overwriteOtherFile.title=Datei \xFCberschreiben? overwriteOtherFile=Eine Datei mit Namen "{0}" existiert bereits.\n\nWirklich \xFCberschreiben? +# New Map +newMap.title=Neue Karte erstellen +newPickmap.title=Neue Pickmap erstellen +newMapFileName=Dateiname: +newMapMapName=Name: +newMapParameter=Parameter +newMapPickmapName=Name: +newMapDimensionOutOfRange.title=Ung\xFCltiger Wert +newMapDimensionOutOfRange.message=Die Kartengr\xF6\xDFe muss positiv sein +newMapDimensionNotANumber.title=Ung\xFCltiger Wert +newMapDimensionNotANumber.message=Die Kartengr\xF6\xDFe muss ganzzahlig sein. +newMapNoName.title=Kartenname fehlt +newMapNoName.message=Der Kartenname fehlt. Jede Karte muss einen Namen besitzen.\nEr wird in-game verwendet und sollte die Karte beschreiben.\nKartennamen m\xFCssen nicht eindeutig sein. + mapTitle={0} ({1}) - Karteneigenschaften mapMap=Karte mapName=Name This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-28 21:35:35
|
Revision: 740 http://svn.sourceforge.net/gridarta/?rev=740&view=rev Author: akirschbaum Date: 2006-11-28 13:35:33 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Whitespace changes. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/daimonin/src/daieditor/CNewMapDialog.java Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-28 20:41:37 UTC (rev 739) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-28 21:35:33 UTC (rev 740) @@ -165,8 +165,7 @@ gbcField.insets = new Insets(2, 2, 2, 2); gbcLabel.anchor = GridBagConstraints.EAST; gbcField.gridwidth = GridBagConstraints.REMAINDER; - mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == TYPE_PICKMAP ? "Pickmap Size" : "Map Size"), - IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n + mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == TYPE_PICKMAP ? "Pickmap Size" : "Map Size"), IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapWidth")), gbcLabel); if (mapType == TYPE_PICKMAP) { mapWidthField.setValue(IGUIConstants.DEF_PICKMAP_WIDTH); @@ -215,34 +214,34 @@ // Get and validate the width final int width; final int height; - try { - width = (Integer) mapWidthField.getValue(); - } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); - mapWidthField.requestFocus(); - return false; - } - if (width < 1) { - ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); - mapWidthField.requestFocus(); - return false; - } + try { + width = (Integer) mapWidthField.getValue(); + } catch (final IllegalArgumentException e) { + final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; + ACTION_FACTORY.showMessageDialog(this, key); + mapWidthField.requestFocus(); + return false; + } + if (width < 1) { + ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); + mapWidthField.requestFocus(); + return false; + } - // Get and validate the height - try { - height = (Integer) mapHeightField.getValue(); - } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); - mapHeightField.requestFocus(); - return false; - } - if (height < 1) { - ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); - mapHeightField.requestFocus(); - return false; - } + // Get and validate the height + try { + height = (Integer) mapHeightField.getValue(); + } catch (final IllegalArgumentException e) { + final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; + ACTION_FACTORY.showMessageDialog(this, key); + mapHeightField.requestFocus(); + return false; + } + if (height < 1) { + ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); + mapHeightField.requestFocus(); + return false; + } maparch.setMapSize(new Size2D(width, height)); @@ -255,9 +254,7 @@ // arches must be loaded to create a new map if (mainControl.getArchetypeSet().getLoadStatus() != ArchetypeSet.LoadStatus.COMPLETE) { - mainControl.showMessage("Cannot Create Map", - "All arches have to be loaded before you can open a map.\n" + - "Just be patient and wait a few seconds..."); + mainControl.showMessage("Cannot Create Map", "All arches have to be loaded before you can open a map.\nJust be patient and wait a few seconds..."); return false; } Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-28 20:41:37 UTC (rev 739) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-11-28 21:35:33 UTC (rev 740) @@ -190,8 +190,7 @@ gbcField.insets = new Insets(2, 2, 2, 2); gbcLabel.anchor = GridBagConstraints.EAST; gbcField.gridwidth = GridBagConstraints.REMAINDER; - mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == MapType.PICKMAP ? "Pickmap Size" : "Map Size"), - IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n + mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == MapType.PICKMAP ? "Pickmap Size" : "Map Size"), IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapWidth")), gbcLabel); if (mapType == MapType.PICKMAP) { mapWidthField.setValue(IGUIConstants.DEF_PICKMAP_WIDTH); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-28 20:41:38
|
Revision: 739 http://svn.sourceforge.net/gridarta/?rev=739&view=rev Author: akirschbaum Date: 2006-11-28 12:41:37 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Unify line ordering. Modified Paths: -------------- trunk/crossfire/src/cfeditor/messages.properties Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-11-28 20:30:09 UTC (rev 738) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-11-28 20:41:37 UTC (rev 739) @@ -1,8 +1,6 @@ # Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding -fileDialog.filter.python=Python Scripts - # New Map newMap.title=Create New Map newPickmap.title=Create New Pickmap @@ -50,3 +48,5 @@ attribOk.text=Ok attribApply.text=Apply attribCancel.text=Cancel + +fileDialog.filter.python=Python Scripts This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-28 20:30:11
|
Revision: 738 http://svn.sourceforge.net/gridarta/?rev=738&view=rev Author: akirschbaum Date: 2006-11-28 12:30:09 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Unify GUI related code in CNewMapDialog. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/IGUIConstants.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/crossfire/src/cfeditor/messages_sv.properties Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-11-27 22:33:43 UTC (rev 737) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-11-28 20:30:09 UTC (rev 738) @@ -622,14 +622,14 @@ */ public void newLevelWanted(final String filename) { CMainStatusbar.getInstance().setText(" Creating new map..."); - new CNewMapDialog(this, mainView, filename, CNewMapDialog.TYPE_CFMAP); + CNewMapDialog.showNewMapDialog(this, mainView, filename, CNewMapDialog.TYPE_CFMAP); CMainStatusbar.getInstance().setText(""); } /** Invoked when user wants to open a new pickmap */ public void newPickmapWanted() { CMainStatusbar.getInstance().setText(" Creating new pickmap..."); - new CNewMapDialog(this, mainView, null, CNewMapDialog.TYPE_PICKMAP); + CNewMapDialog.showNewMapDialog(this, mainView, null, CNewMapDialog.TYPE_PICKMAP); CMainStatusbar.getInstance().setText(""); } Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-27 22:33:43 UTC (rev 737) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-11-28 20:30:09 UTC (rev 738) @@ -26,25 +26,26 @@ import cfeditor.gameobject.ArchetypeSet; import cfeditor.map.MapArchObject; -import java.awt.BorderLayout; -import java.awt.Dimension; +import java.awt.Component; import java.awt.FlowLayout; -import java.awt.Frame; -import java.awt.GridLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.util.Calendar; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JFormattedTextField; import javax.swing.JLabel; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; import javax.swing.border.EtchedBorder; import javax.swing.border.TitledBorder; import net.sf.gridarta.Size2D; +import net.sf.japi.swing.ActionFactory; /** * Dialog used to ask the user the properties for the new level. Contains a @@ -53,11 +54,14 @@ * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ -public final class CNewMapDialog extends CDialogBase { +public final class CNewMapDialog extends JOptionPane { /** Serial Version UID. */ private static final long serialVersionUID = 1L; + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); + /** Map types. */ public static final int TYPE_CFMAP = 0; @@ -76,128 +80,127 @@ /** type of map to create: pickmap or normal map? */ private final int mapType; - // Dialog UI Components - private final JTextField mapNameField; + /** + * Textfield for the name of the map. + * This is only used for {@link MapType#GAMEMAP} to determine the title of the new map. + * The filename of the new map is unset and will be specified when the user saves the map for the first time. + */ + private final JTextField mapNameField = new JTextField(16); - private final JTextField fileNameField; + /** + * Textfield for the filename of the map. + * This is only used for {@link MapType#PICKMAP} to determine the filename of the new pickmap. + * The title of the pickmap will be set to "pickmap" always. + */ + private final JTextField fileNameField = new JTextField(16); - private final JTextField mapWidthField; + /** + * Textfield for the width of the new map. + */ + private final JFormattedTextField mapWidthField = new JFormattedTextField(); - private final JTextField mapHeightField; + /** + * Textfield for the height of the new map. + */ + private final JFormattedTextField mapHeightField = new JFormattedTextField(); + /** JButton for ok. */ + private final JButton okButton = new JButton(ACTION_FACTORY.createAction(false, "mapOkay", this)); + + /** JButton for cancel. */ + private final JButton cancelButton = new JButton(ACTION_FACTORY.createAction(false, "mapCancel", this)); + /** * Constructs a new level dialog. Builds the dialog UI. * @param mainControl the controller of this dialog. - * @param parentFrame the parent frame of this dialog. * @param filename desired filename for new map, null if not specified + * @param mapType type of map to create */ - CNewMapDialog(final CMainControl mainControl, final Frame parentFrame, final String filename, final int mapType) { - super(parentFrame, mapType == TYPE_PICKMAP ? "Create New Pickap" : "Create New Map"); + private CNewMapDialog(final CMainControl mainControl, final String filename, final int mapType) { + okButton.setDefaultCapable(true); + setOptions(new Object[]{okButton, cancelButton}); this.mainControl = mainControl; this.mapType = mapType; - getContentPane().setLayout(new BorderLayout()); + setMessage(createPanel(filename)); + } + private JPanel createPanel(final String filename) { final JPanel newLevelFromScratchPanel = new JPanel(); newLevelFromScratchPanel.setLayout(new BoxLayout(newLevelFromScratchPanel, BoxLayout.Y_AXIS)); - newLevelFromScratchPanel.setBorder(new EmptyBorder( - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS)); + newLevelFromScratchPanel.setBorder(IGUIConstants.DIALOG_BORDER); // file name panel final JPanel fileNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); if (mapType == TYPE_PICKMAP) { - fileNamePanel.add(new JLabel("Pickmap Name:")); + fileNamePanel.add(new JLabel("Pickmap Name:")); // TODO cher: i18n/l10n } else { - fileNamePanel.add(new JLabel("File Name:")); + fileNamePanel.add(new JLabel("File Name:")); // TODO cher: i18n/l10n } if (filename != null && filename.length() > 0) { - fileNameField = new JTextField(filename, 16); - } else { - fileNameField = new JTextField(16); + fileNameField.setText(filename); } fileNamePanel.add(fileNameField); - newLevelFromScratchPanel.add(fileNamePanel); - newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); + if (mapType == TYPE_PICKMAP) { + newLevelFromScratchPanel.add(fileNamePanel); + newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); + } if (mapType == TYPE_CFMAP) { // map name panel final JPanel mapNamePanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - mapNamePanel.add(new JLabel("Map Name:")); - mapNameField = new JTextField(16); + mapNamePanel.add(new JLabel("Map Name:")); // TODO cher: i18n/l10n mapNamePanel.add(mapNameField); newLevelFromScratchPanel.add(mapNamePanel); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - } else { - mapNameField = null; } final CSettings settings = CSettings.getInstance(IGUIConstants.APP_NAME); + newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - final JPanel mapSizePanel = new JPanel(new GridLayout(2, 2)); + final JPanel mapSizePanel = new JPanel(new GridBagLayout()); + final GridBagConstraints gbcLabel = new GridBagConstraints(); + final GridBagConstraints gbcField = new GridBagConstraints(); + gbcLabel.insets = new Insets(2, 2, 2, 2); + gbcField.insets = new Insets(2, 2, 2, 2); + gbcLabel.anchor = GridBagConstraints.EAST; + gbcField.gridwidth = GridBagConstraints.REMAINDER; mapSizePanel.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(), mapType == TYPE_PICKMAP ? "Pickmap Size" : "Map Size"), - new EmptyBorder( - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS))); - mapSizePanel.add(new JLabel("Width:")); - mapWidthField = new JTextField(3); + IGUIConstants.DIALOG_BORDER)); // TODO cher: i18n/l10n + mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapWidth")), gbcLabel); if (mapType == TYPE_PICKMAP) { - mapWidthField.setText(String.valueOf(IGUIConstants.DEF_PICKMAP_WIDTH)); + mapWidthField.setValue(IGUIConstants.DEF_PICKMAP_WIDTH); } else { - mapWidthField.setText(settings.getProperty(DEFAULT_LEVEL_WIDTH_KEY, "" + IGUIConstants.DEF_MAPSIZE)); + assert mapType == TYPE_CFMAP; + mapWidthField.setValue(Integer.valueOf(settings.getProperty(DEFAULT_LEVEL_WIDTH_KEY, String.valueOf(IGUIConstants.DEF_MAPSIZE)))); } - mapSizePanel.add(mapWidthField); - mapSizePanel.add(new JLabel("Height:")); - mapHeightField = new JTextField(3); + mapWidthField.setColumns(3); + mapSizePanel.add(mapWidthField, gbcField); + mapSizePanel.add(new JLabel(ACTION_FACTORY.getString("mapHeight")), gbcLabel); if (mapType == TYPE_PICKMAP) { - mapHeightField.setText(String.valueOf(IGUIConstants.DEF_PICKMAP_HEIGHT)); + mapHeightField.setValue(IGUIConstants.DEF_PICKMAP_HEIGHT); } else { - mapHeightField.setText(settings.getProperty(DEFAULT_LEVEL_HEIGHT_KEY, "" + IGUIConstants.DEF_MAPSIZE)); + assert mapType == TYPE_CFMAP; + mapHeightField.setValue(Integer.valueOf(settings.getProperty(DEFAULT_LEVEL_HEIGHT_KEY, String.valueOf(IGUIConstants.DEF_MAPSIZE)))); } - mapSizePanel.add(mapHeightField); + mapHeightField.setColumns(3); + mapSizePanel.add(mapHeightField, gbcField); newLevelFromScratchPanel.add(mapSizePanel); newLevelFromScratchPanel.add(Box.createVerticalStrut(5)); - getContentPane().add(newLevelFromScratchPanel, BorderLayout.CENTER); + return newLevelFromScratchPanel; + } - final JPanel buttonPanel = new JPanel(); - buttonPanel.setBorder(new EmptyBorder(IGUIConstants.SPACE_BETWEEN_BUTTON_AREA_AND_MAIN_DIALOG, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS)); - buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); - buttonPanel.add(Box.createGlue()); + /** Action method for okay. */ + public void mapOkay() { + if (createNewLevel()) { + setValue(okButton); + } + } - final JButton okButton = new JButton("OK"); - okButton.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (createNewLevel()) { - dispose(); - } - } - }); - buttonPanel.add(okButton); - - buttonPanel.add(Box.createRigidArea(new Dimension(IGUIConstants.SPACE_BETWEEN_BUTTONS, 1))); - - final JButton cancelButton = new JButton("Cancel"); - cancelButton.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - dispose(); - } - }); - buttonPanel.add(cancelButton); - - getContentPane().add(buttonPanel, BorderLayout.SOUTH); - - pack(); - setVisible(true); + /** Action method for cancel. */ + public void mapCancel() { + setValue(cancelButton); } /** @@ -206,34 +209,47 @@ */ private boolean createNewLevel() { - // Create a new level from scratch + // Create a new level from scratch final MapArchObject maparch = new MapArchObject(); - // Get and validate the level size - final int width, height; - try { - // get size - width = Integer.parseInt(mapWidthField.getText()); - height = Integer.parseInt(mapHeightField.getText()); - } catch (final NumberFormatException illegalNumbers) { - mainControl.showMessage( - "Illegal Value", - "Map dimensions must be numerical integer values!"); - return false; - } - if (width < 1 || height < 1) { - mainControl.showMessage("Illegal Value", "Map dimensions must be in range [1, " + Integer.MAX_VALUE + "]."); - return false; - } + // Get and validate the width + final int width; + final int height; + try { + width = (Integer) mapWidthField.getValue(); + } catch (final IllegalArgumentException e) { + final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; + ACTION_FACTORY.showMessageDialog(this, key); + mapWidthField.requestFocus(); + return false; + } + if (width < 1) { + ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); + mapWidthField.requestFocus(); + return false; + } + // Get and validate the height + try { + height = (Integer) mapHeightField.getValue(); + } catch (final IllegalArgumentException e) { + final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; + ACTION_FACTORY.showMessageDialog(this, key); + mapHeightField.requestFocus(); + return false; + } + if (height < 1) { + ACTION_FACTORY.showMessageDialog(this, "newMapDimensionOutOfRange"); + mapHeightField.requestFocus(); + return false; + } + maparch.setMapSize(new Size2D(width, height)); - // the mapmaker must enter a mapname to create a new map - if (mapType == TYPE_CFMAP && (mapNameField.getText() == null || mapNameField.getText().length() <= 0)) { - mainControl.showMessage("Map Name is Missing", - "You must enter a map name! This name will appear\n" + - "in the game, so it should be a descriptive name.\n" + - "Map names don't need to be unique."); + final String mapName = mapNameField.getText(); + if (mapType == TYPE_CFMAP && (mapName == null || mapName.length() <= 0)) { + ACTION_FACTORY.showMessageDialog(this, "newMapNoName"); + mapNameField.requestFocus(); return false; } @@ -260,7 +276,7 @@ // set map name if (mapType == TYPE_CFMAP) { - maparch.setMapName(mapNameField.getText()); + maparch.setMapName(mapName); } else if (mapType == TYPE_PICKMAP) { maparch.setMapName("pickmap"); } @@ -280,4 +296,27 @@ return true; } + /** + * Show a dialog for creating a new map. + * @param mainControl the controller of this dialog. + * @param parentComponent the parent component of this dialog + * @param filename desired filename for new map, null if not specified + * @param mapType type of map to create + */ + public static void showNewMapDialog(final CMainControl mainControl, final Component parentComponent, final String filename, final int mapType) { + final CNewMapDialog pane = new CNewMapDialog(mainControl, filename, mapType); + final JDialog dialog = pane.createDialog(parentComponent, ACTION_FACTORY.getString(mapType == TYPE_PICKMAP ? "newPickmap.title" : "newMap.title")); + dialog.getRootPane().setDefaultButton(pane.okButton); + dialog.setModal(false); + + // TODO: localize + pane.mapNameField.setText("Unnamed Map"); + + dialog.setVisible(true); + pane.mapNameField.selectAll(); + pane.fileNameField.selectAll(); + pane.mapWidthField.selectAll(); + pane.mapHeightField.selectAll(); + } + } // class CNewMapDialog Modified: trunk/crossfire/src/cfeditor/IGUIConstants.java =================================================================== --- trunk/crossfire/src/cfeditor/IGUIConstants.java 2006-11-27 22:33:43 UTC (rev 737) +++ trunk/crossfire/src/cfeditor/IGUIConstants.java 2006-11-28 20:30:09 UTC (rev 738) @@ -25,7 +25,10 @@ package cfeditor; import java.awt.Color; +import java.awt.Insets; import java.io.File; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; /** * Defines common UI constants used in different dialogs and all used icon @@ -104,6 +107,9 @@ */ int DOUBLECLICK_MS = 300; + /** The Border object to be used when creating dialogs. */ + Border DIALOG_BORDER = new EmptyBorder(new Insets(4, 4, 4, 4)); + /** Default file name for new maps. */ String DEF_MAPFNAME = "<new map>"; Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-11-27 22:33:43 UTC (rev 737) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-11-28 20:30:09 UTC (rev 738) @@ -3,6 +3,21 @@ fileDialog.filter.python=Python Scripts +# New Map +newMap.title=Create New Map +newPickmap.title=Create New Pickmap +newMapDimensionOutOfRange.title=Illegal Value +newMapDimensionOutOfRange.message=Map dimensions must be greater or equal 1 and less or equal 2147483647 +newMapDimensionNotANumber.title=Illegal Value +newMapDimensionNotANumber.message=Map dimensions must be numerical integer values! +newMapNoName.title=Map Name is missing +newMapNoName.message=You must enter a map name! This name will appear\nin the game, so it should be a descriptive name.\nMap names do not need to be unique. + +mapWidth=Width +mapHeight=Height +mapOkay.text=Ok +mapCancel.text=Cancel + #replace replaceTitle=Replace replaceOn=On Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2006-11-27 22:33:43 UTC (rev 737) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-11-28 20:30:09 UTC (rev 738) @@ -1,6 +1,11 @@ # Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding +mapWidth=Breite +mapHeight=H\xF6he +mapOkay.text=Ok +mapCancel.text=Abbrechen + #replace replaceTitle=Ersetze replaceOn=In Modified: trunk/crossfire/src/cfeditor/messages_sv.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_sv.properties 2006-11-27 22:33:43 UTC (rev 737) +++ trunk/crossfire/src/cfeditor/messages_sv.properties 2006-11-28 20:30:09 UTC (rev 738) @@ -1,6 +1,21 @@ # Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding +# New Map +newMap.title=Skapa ny karta +newPickmap.title=Skapa ny plockkarta +newMapDimensionOutOfRange.title=Ogiltigt v\xE4rde +newMapDimensionOutOfRange.message=Kartans dimensioner m\xE5ste st\xF6rre eller lika med 1 och mindre eller lika med 2147483647 +newMapDimensionNotANumber.title=Ogiltigt v\xE4rde +newMapDimensionNotANumber.message=Kartans dimensioner m\xE5ste vara heltalsv\xE4rden. +newMapNoName.title=Kartnamn saknas +newMapNoName.message=Du m\xE5ste ange ett kartnamn! Namnet syns i spelet,\n s\xE5 det b\xF6r vara ett beskrivande namn.\nNamn p\xE5 kartor beh\xF6ver inte vara unika. + +mapWidth=Bredd +mapHeight=H\xF6jd +mapOkay.text=Ok +mapCancel.text=Avbryt + #replace replaceTitle=Ers\xE4tt replaceOn=P\xE5 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-27 22:33:46
|
Revision: 737 http://svn.sourceforge.net/gridarta/?rev=737&view=rev Author: akirschbaum Date: 2006-11-27 14:33:43 -0800 (Mon, 27 Nov 2006) Log Message: ----------- Unify GUI related code in CAttribDialog. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribBitmask.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/crossfire/src/cfeditor/messages_sv.properties Modified: trunk/crossfire/src/cfeditor/CAttribBitmask.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribBitmask.java 2006-11-27 22:26:52 UTC (rev 736) +++ trunk/crossfire/src/cfeditor/CAttribBitmask.java 2006-11-27 22:33:43 UTC (rev 737) @@ -24,24 +24,20 @@ package cfeditor; -import java.awt.Color; -import java.awt.FlowLayout; +import java.awt.Component; import java.awt.GridLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.util.List; -import javax.swing.BorderFactory; -import javax.swing.BoxLayout; -import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JDialog; +import static javax.swing.JOptionPane.OK_CANCEL_OPTION; +import static javax.swing.JOptionPane.OK_OPTION; +import static javax.swing.JOptionPane.PLAIN_MESSAGE; +import static javax.swing.JOptionPane.showConfirmDialog; import javax.swing.JPanel; -import javax.swing.JTextArea; -import javax.swing.WindowConstants; import org.apache.log4j.Logger; import org.jdom.Attribute; import org.jdom.DataConversionException; import org.jdom.Element; +import org.jetbrains.annotations.Nullable; /** * This class manages bitmask values which appear in Crossfire arch attributes. @@ -55,7 +51,7 @@ /** * Maximum number of characters in a line before linebreak (see {@link - * #getText(int, JTextArea)}). + * #getText(int)}). */ private static final int MAX_CHARS_PER_LINE = 35; // 50 @@ -165,15 +161,11 @@ } /** - * Display the appropriate text for a given bitmask value. - * The text is put into a non-editable textarea. + * Generate the text to be displayed for a given bitmask value. * @param value bitmask value - * @param textf if non-null, this textarea is used for drawing, - * if null, a new textarea is created and returned - * @return <code>JTextArea</code> with all entries belonging to the bitmask - * and proper dimensions + * @return <code>String</code> with all entries belonging to the bitmask */ - public JTextArea getText(final int value, JTextArea textf) { + public String getText(final int value) { String text = " "; // text string to return int rows = 1; // rows of textarea int columns = 1; // columns of textarea (actually not needed) @@ -213,138 +205,34 @@ } } - // create JTextArea (setting columns results in textarea being too wide) - if (textf == null) { - textf = new JTextArea(text + " ", rows, 18); - - // set colors, border and stuff - textf.setForeground(Color.black); - textf.setBackground(CMainControl.getInstance().getMainView().getBackground()); - textf.setEditable(false); - textf.setBorder(BorderFactory.createLineBorder(Color.gray)); - } else { - // textarea already exists, so change it - textf.setText(text + " "); - textf.setRows(rows); - textf.setColumns(18); - } - - return textf; + return text; } /** * Open a popup frame to select bitmask-entries via chooseboxes. + * @param parentComponent the parent component of this dialog + * @param guiAttr Bitmask attribute to update + * @return Integer with new value or <code>null</code> if the user cancelled the dialog */ - public void popupFrame(final CAttribDialog attrDialog, final CAttribDialog.BitmaskAttrib guiAttr) { + @Nullable public Integer showBitmaskDialog(final Component parentComponent, final CAttribDialog.BitmaskAttrib guiAttr) { final String title = "Choose " + guiAttr.ref.getNameNew().substring(0, 1).toUpperCase() + guiAttr.ref.getNameNew().substring(1); - final JDialog frame = new JDialog(attrDialog, title, true); - frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - - // panels - final JPanel mainPanel = new JPanel(); - mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); - final JPanel gridPanel = new JPanel(new GridLayout(1, 2)); - final JPanel leftList = new JPanel(); // left column of checkboxes - leftList.setLayout(new BoxLayout(leftList, BoxLayout.Y_AXIS)); - final JPanel rightList = new JPanel(); // right column of checkboxes - rightList.setLayout(new BoxLayout(rightList, BoxLayout.Y_AXIS)); - final JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); - - // create checkboxes + final JPanel gridPanel = new JPanel(new GridLayout(0, 2, 3, 3)); final JCheckBox[] checkbox = new JCheckBox[number]; for (int i = 0; i < number; i++) { - checkbox[i] = new JCheckBox(" " + bitName[i + 1]); + checkbox[i] = new JCheckBox(bitName[i + 1]); checkbox[i].setSelected(isActive(i + 1, guiAttr.getValue())); - if (i % 2 == 0) { - leftList.add(checkbox[i]); - } else { - rightList.add(checkbox[i]); - } + gridPanel.add(checkbox[i]); } - gridPanel.add(leftList); - gridPanel.add(rightList); - gridPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - mainPanel.add(gridPanel); - - // buttons - final JButton okButton = new JButton("Ok"); - final JButton cancelButton = new JButton("Cancel"); - buttonPanel.add(okButton); - buttonPanel.add(cancelButton); - mainPanel.add(buttonPanel); - - // attach action listener to the buttons - final PopupFrameAL listener = new PopupFrameAL(frame, guiAttr, this, checkbox, attrDialog); - okButton.addActionListener(listener); - cancelButton.addActionListener(listener); - - // hurl all this litter into the frame, pack and show it - frame.getContentPane().add(mainPanel); - frame.pack(); - frame.setLocationRelativeTo(attrDialog); - frame.setVisible(true); - } - - /** - * Subclass: Action-listener for the buttons in the popup frame - * where changes to the bitmask can be selected. - */ - private class PopupFrameAL implements ActionListener { - - private final CAttribBitmask bitmask; // reference to this CAttribBitmask instance - - private JDialog frame; // reference to the popup dialog frame - - private final CAttribDialog.BitmaskAttrib guiAttr; // gui attribute instance - - private final JCheckBox[] checkbox; // array of checkboxes on the frame - - private final CAttribDialog attrDialog; // instance of attribute dialog (parent frame) - - /** - * Contructor - * @param newFrame thepopup dialog frame - * @param newGuiAttr gui attribute instance - * @param newMask this CAttribBitmask instance - * @param boxarray array of checkboxes in the popup frame - * @param newAttrD attribute dialog frame - */ - private PopupFrameAL(final JDialog newFrame, final CAttribDialog.BitmaskAttrib newGuiAttr, - final CAttribBitmask newMask, final JCheckBox[] boxarray, final CAttribDialog newAttrD) { - frame = newFrame; - guiAttr = newGuiAttr; - bitmask = newMask; - checkbox = boxarray; - attrDialog = newAttrD; - } - - /** - * a button was pressed - * @param event the occured <code>ActionEvent</code> (button pressed) - */ - public void actionPerformed(final ActionEvent event) { - if (event.getSource() instanceof JButton) { - // check if the okay button was pressed - if (((JButton) event.getSource()).getText().equalsIgnoreCase("Ok")) { - // calculate the new bitmask value: - int newValue = 0; - for (int i = 0; i < bitmask.number; i++) { - if (checkbox[i].isSelected()) { - newValue |= (int) (Math.pow(2.0, (double) i)); - } - } - - // update the text component in the CAttribDialog with the new values - bitmask.getText(newValue, guiAttr.text); - attrDialog.update(attrDialog.getGraphics()); - guiAttr.setValue(newValue); + if (showConfirmDialog(parentComponent, gridPanel, title, OK_CANCEL_OPTION, PLAIN_MESSAGE) == OK_OPTION) { + int newValue = 0; + for (int i = 0; i < number; i++) { + if (checkbox[i].isSelected()) { + newValue |= 1 << i; } - - // nuke the dialog frame - frame.dispose(); - frame = null; } + return newValue; } + return null; } } // class CAttribBitmask Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-11-27 22:26:52 UTC (rev 736) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-11-27 22:33:43 UTC (rev 737) @@ -28,20 +28,32 @@ import cfeditor.gameobject.ArchetypeSet; import cfeditor.gameobject.GameObject; import java.awt.BorderLayout; +import java.awt.CardLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.FlowLayout; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; import java.awt.GridLayout; import java.awt.Insets; +import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import java.awt.event.WindowListener; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.Vector; +import javax.swing.AbstractAction; +import javax.swing.Action; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.BoxLayout; @@ -49,7 +61,10 @@ import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JComponent; import javax.swing.JDialog; +import javax.swing.JFormattedTextField; +import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; @@ -61,14 +76,19 @@ import javax.swing.JTextPane; import javax.swing.JViewport; import javax.swing.ScrollPaneConstants; +import javax.swing.SwingConstants; import javax.swing.WindowConstants; import javax.swing.text.BadLocationException; +import javax.swing.text.DefaultFormatterFactory; import javax.swing.text.Document; +import javax.swing.text.JTextComponent; +import javax.swing.text.NumberFormatter; import javax.swing.text.Style; import javax.swing.text.StyleConstants; import javax.swing.text.StyleContext; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.help.Help; +import net.sf.japi.swing.ActionFactory; import org.apache.log4j.Logger; import org.jetbrains.annotations.Nullable; @@ -76,44 +96,25 @@ * CAttribDialog poses the GUI for Crossfire object attributes. * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ -public final class CAttribDialog extends JDialog { +public final class CAttribDialog extends JOptionPane implements FocusListener { private static final Logger log = Logger.getLogger(CAttribDialog.class); /** Serial Version UID. */ private static final long serialVersionUID = 1L; - private static int width = 395; + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); - private static int height = 505; - - private static int buttonBarHeight = 40; - - private static int inventoryWidth = 100; - - private static final int dividerSize = 3; - // store width of input-textfields, then JChooseBoxes are set to this width too - private static int textFieldWidth = 0; + public static final int TEXTFIELD_COLUMNS = 18; // number of columns for textfields - private static final int textFieldColumns = 18; // number of columns for textfields - - // pixel height of all JChooseBoxes - private static int chooseBoxHeight = 25; - - // the center pane of the dialog can either show the attribute - // input-interface or the summary of nonzero attributes - // the 'displaySummary' flag indicates what is shown: true->summary, false->interface - private boolean displaySummary = false; - private final CMainControl mainControl; // reference to the main control private final CFArchTypeList typelist; // reference to the list of CF type-data - private DialogAttrib attrHead; // head of the list of attribute-GUI components + private List<DialogAttrib<?>> dialogAttribs = new ArrayList<DialogAttrib<?>>(); - private DialogAttrib attrTail; // head of the list of attribute-GUI components - private JComboBox typesel; // selection box for type private JTextField nameTF; // textfield for gameObject name @@ -131,62 +132,77 @@ // this differs from the GameObject if the type is undefined private int listNr; // the position of this type in the type list - // buttons: - private JButton helpButton; + /** The CardLayout for toggling between edit and summary. */ + private final CardLayout cardLayout = new CardLayout(); - private JButton summaryButton; + /** The Action for switching to the summary. */ + private Action summaryAction = ACTION_FACTORY.createAction(false, "attribSummary", this); - private JButton okButton; + /** The Action for switching to the edit. */ + private Action editAction = ACTION_FACTORY.createAction(false, "attribEdit", this); + /** The Button for toggling the summary. */ + private JButton summaryEditButton; + private JButton applyButton; /** The Button for cancel. */ private JButton cancelButton; + /** The Button for ok. */ + private JButton okButton; + /** Central tabbed pane (the place where all the attribute tabs are). */ private JTabbedPane tabbedPane; /** Central pane, this is the parent component of above tabbed pane. */ - private final JScrollPane centerPane; + private final JPanel centerPane; /** Text pane where the summary is displayed. */ private final JTextPane summaryTP; + /** The gameObject objects that already are shown, to avoid opening a dialog twice. */ + private static final Map<GameObject, JDialog> dialogs = new HashMap<GameObject, JDialog>(); + /** - * Constructor: Creates the GUI layout and - * draws the dialog window. - * @param atList the list of CF type-data - * @param gameObject the GameObject to be displayed by this dialog - * @param mainControl main control + * Wrapper method for the constructor. + * This method only creates a CAttribDialog if there's no dialog for the same gameObject already. + * @param atList the list of CF type-data + * @param gameObject the GameObject to be displayed by this dialog + * @param mainControl main control */ - CAttribDialog(final CFArchTypeList atList, final GameObject gameObject, final CMainControl mainControl) { - super(mainControl.getMainView(), "CF Attribute Dialog", false); - - // when close-box is selected, execute the 'closeDialog' method and nothing else - setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); - addWindowListener(new WindowAdapter() { - @Override public void windowClosing(final WindowEvent event) { - closeDialog(); + public static void showAttribDialog(final CFArchTypeList atList, final GameObject gameObject, final CMainControl mainControl) { + synchronized (dialogs) { + if (dialogs.containsKey(gameObject)) { + dialogs.get(gameObject).toFront(); + } else { + final CAttribDialog pane = new CAttribDialog(atList, gameObject, mainControl); + final JDialog dialog = pane.createDialog(mainControl.getMainView(), ACTION_FACTORY.getString("attribTitle")); + dialog.getRootPane().setDefaultButton(pane.okButton); + dialog.setResizable(true); + dialog.setModal(false); + dialog.setVisible(true); + dialogs.put(pane.gameObject, dialog); } - }); + } + } - attrHead = null; + /** + * Constructor, creates the GUI layout. + * @param atList the list of CF type-data + * @param gameObject the GameObject to be displayed by this dialog + * @param mainControl main control + */ + private CAttribDialog(final CFArchTypeList atList, final GameObject gameObject, final CMainControl mainControl) { listNr = 0; this.mainControl = mainControl; // reference to the main control typelist = atList; // reference to the typelist - CAttribDialog.setDefaultBounds(); // set width/height etc - // reference to the GameObject this.gameObject = gameObject.getHead(); archetype = this.gameObject.getArchetype(); - /* set frame icon - if (gameObject.getFaceNr() >= 0) { - setIconImage(mainControl.getArchObjectStack().getFace(gameObject.getFaceNr()).getImage()); - } - */ // check if the type of the object is present in the definitions CFArchType tmp = typelist.getHead().getNext(); //typeNr = 0; // for invalid types, we take "type 0" @@ -243,78 +259,54 @@ //type = typelist.getType(typeNr); // first split top-left and -right - final JScrollPane leftPane = buildHeader(); + final JComponent leftPane = buildHeader(); final JScrollPane rightPane = buildInv(); //Create a split pane with the two scroll panes in it. final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPane, rightPane); - splitPane.setOneTouchExpandable(false); - splitPane.setDividerLocation(width - inventoryWidth - 2 * dividerSize); - splitPane.setDividerSize(dividerSize + 1); - //Provide minimum sizes for the two components in the split pane - leftPane.setMinimumSize(new Dimension(width - inventoryWidth - 2 * dividerSize, 120)); - rightPane.setMinimumSize(new Dimension(inventoryWidth, 120)); - // Now split horizontally //JScrollPane centerPane = buildAttr(); - centerPane = buildAttr(); - - //Create a split pane with the two scroll panes in it. - final JSplitPane splitPane2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, splitPane, centerPane); - splitPane2.setOneTouchExpandable(false); - splitPane2.setDividerLocation(126); - splitPane2.setDividerSize(dividerSize); - - // split horizontally again - final JScrollPane paneButtons = buildButtons(); - final JSplitPane splitPane3 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, splitPane2, paneButtons); - splitPane3.setOneTouchExpandable(false); - //splitPane3.setDividerLocation(height-buttonBarHeight-34); - splitPane3.setDividerLocation((int) (this.getHeight() - paneButtons.getMinimumSize().height - dividerSize)); - splitPane3.setDividerSize(dividerSize); - splitPane3.setResizeWeight(1); - - getContentPane().add(splitPane3); - - // initialize the summary TextPane + centerPane = new JPanel(cardLayout); + centerPane.add("edit", buildAttr()); summaryTP = new JTextPane(); - summaryTP.setForeground(Color.black); - summaryTP.setBackground(CMainControl.getInstance().getMainView().getBackground()); summaryTP.setEditable(false); summaryTP.setBorder(BorderFactory.createEmptyBorder(3, 15, 0, 0)); + centerPane.add("summary", new JScrollPane(summaryTP)); + final Dimension size = centerPane.getPreferredSize(); + size.height = 256; + centerPane.setMinimumSize(size); + centerPane.setPreferredSize(size); - this.setResizable(true); - // now draw the whole thing: - setBounds(this.mainControl.getMainView().getX() + (this.mainControl.getMainView().getWidth() - width) / 2, - this.mainControl.getMainView().getY() + (this.mainControl.getMainView().getHeight() - height) / 2 - 20, - width, height); - setVisible(true); + final JPanel contentPanel = new JPanel(new GridBagLayout()); + final GridBagConstraints gbc = new GridBagConstraints(); + gbc.weightx = 1.0; + gbc.fill = GridBagConstraints.BOTH; + gbc.gridwidth = GridBagConstraints.REMAINDER; + gbc.weighty = 0.0; + contentPanel.add(splitPane, gbc); + gbc.weighty = 1.0; + contentPanel.add(centerPane, gbc); + + setOptions(buildOptions()); + + setMessage(contentPanel); } - /** - * This method sets the default bounds for the dialog frame - * in proportion to the size of the currently used font. - * Not the perfect approach, but it's impossible to have swing do it - * right automatically. Having the user define it would be a - * lot more difficult, and probably not very convenient. - */ - public static void setDefaultBounds() { - width = 395; - height = 505 + 30; - buttonBarHeight = 40; - inventoryWidth = 95; - chooseBoxHeight = 23; + /** {@inheritDoc} */ + @Override public void setValue(final Object newValue) { + super.setValue(newValue); + if (newValue != UNINITIALIZED_VALUE) { + dialogs.remove(gameObject).dispose(); + } } /** * Construct the Combo box of the available archetypes. - * @param boxWidth width of the JChooseBox in pixels - * @return a <code>JPanel</code> with the combo box in it + * @return a <code>JComponent</code> with the combo box in it */ - private JPanel buildTypesBox(final int boxWidth) { - final JPanel lineLayout = new JPanel(new FlowLayout(FlowLayout.RIGHT)); // layout for this line - final String []namelist = new String[typelist.getLength()]; // list of typenames + private JComponent buildTypesBox() { + final String[] namelist = new String[typelist.getLength()]; // list of typenames // read all type names CFArchType tmp = typelist.getHead().getNext(); @@ -323,24 +315,18 @@ } // the active type appears selected in the box - final int selection = listNr; + final int selection = listNr; // position of selected type in the list - lineLayout.add(new JLabel("Type: ")); // create label - typesel = new JComboBox(namelist); // set "content" - typesel.setPreferredSize(new Dimension(boxWidth, chooseBoxHeight)); typesel.setSelectedIndex(selection); // set active selection //typesel.setKeySelectionManager(new StringKeyManager(typesel)); - typesel.setBackground(Color.white); // white background typesel.setName("Types"); // the listener: typesel.addItemListener(new TypesBoxAL(this, gameObject)); - - lineLayout.add(typesel); - return lineLayout; + return typesel; } /** @@ -373,12 +359,10 @@ } final JComboBox spellsel = new JComboBox(typelist.getSpellName()); // set "content" - spellsel.setPreferredSize(new Dimension((textFieldWidth == 0 ? 197 : textFieldWidth), chooseBoxHeight)); spellsel.setSelectedIndex(active); // set active selection spellsel.setMaximumRowCount(10); spellsel.setKeySelectionManager(new StringKeyManager(spellsel)); - spellsel.setBackground(Color.white); // white background spellsel.setName(attr.getNameNew()); return spellsel; @@ -409,60 +393,50 @@ } final JComboBox arraysel = new JComboBox(array); // set "content" - arraysel.setPreferredSize(new Dimension(textFieldWidth == 0 ? 197 : textFieldWidth, chooseBoxHeight)); arraysel.setSelectedIndex(active); // set active selection arraysel.setMaximumRowCount(10); arraysel.setKeySelectionManager(new StringKeyManager(arraysel)); - arraysel.setBackground(Color.white); // white background arraysel.setName(attr.getNameNew()); return arraysel; } /** - * Construct the Panel for bitmask values (this is used for ArchAttribType.BITMASK) - * @param attr spell-attribute - * @param guiAttr the gui-instance of the bitmask attribute - * @param bitmask the bitmask data for this attribute - * @param mainPanel the panel to put everything in - */ - private void buildBitmask(final CFArchAttrib attr, final BitmaskAttrib guiAttr, final CAttribBitmask bitmask, final JPanel mainPanel) { - // initialize bitmask value - guiAttr.setValue(gameObject.getAttributeInt(attr.getNameOld())); - guiAttr.bitmask = bitmask; - - // add button - final JButton button = new JButton(attr.getNameNew() + ":"); - button.setAlignmentX(JButton.CENTER_ALIGNMENT); - button.setMargin(new Insets(0, 3, 0, 3)); - button.addActionListener(new MaskChangeAL(guiAttr, this)); - mainPanel.add(button); - - // add the text field - guiAttr.text = bitmask.getText(guiAttr.getValue(), null); - mainPanel.add(guiAttr.text); - } - - /** * Construct the upper left part of the attribute dialog, * containing name, type, archetype name and face. * @return a <code>JScrollPane</code> with the upper left part of the dialog window */ - private JScrollPane buildHeader() { - final JPanel header = new JPanel(new FlowLayout(FlowLayout.RIGHT)); // the final thing, in a panel - - final JPanel layout1 = new JPanel(new BorderLayout()); // face, name & type - + private JComponent buildHeader() { + final JPanel header = new JPanel(new GridBagLayout()); // the final thing, in a panel + final GridBagConstraints gbc = new GridBagConstraints(); + gbc.fill = GridBagConstraints.BOTH; + gbc.insets = new Insets(2, 2, 2, 2); + gbc.gridx = 1; + gbc.gridy = 1; + gbc.weightx = 0.0; + gbc.weighty = 3.0; + gbc.gridheight = 3; imagePanel = new JLabel(mainControl.getArchetypeSet().getFace(gameObject.getFaceNr())); imagePanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); + header.add(imagePanel, gbc); + gbc.gridheight = 1; + gbc.weighty = 1.0; + gbc.fill = GridBagConstraints.HORIZONTAL; - layout1.add(imagePanel, BorderLayout.WEST); + gbc.weightx = 0.0; + gbc.gridx = 2; + gbc.gridy = 1; + header.add(new JLabel("Name: ", SwingConstants.TRAILING), gbc); // create label + gbc.gridy++; + header.add(new JLabel("Type: ", SwingConstants.TRAILING), gbc); + gbc.gridy++; + header.add(new JLabel("Archetype: ", SwingConstants.TRAILING), gbc); // create label - final JPanel layout2 = new JPanel(new GridLayout(2, 1)); - final JPanel layout3 = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - layout3.add(new JLabel("Name: ")); // create label + gbc.gridx = 3; + gbc.gridy = 1; + gbc.weightx = 1.0; if (gameObject.getObjName() != null && gameObject.getObjName().length() > 0) { nameTF = new JTextField(gameObject.getObjName(), 16); } else if (archetype.getObjName() != null && archetype.getObjName().length() > 0) { @@ -471,36 +445,15 @@ nameTF = new JTextField(archetype.getArchetypeName(), 16); } nameTF.setEditable(false); - layout3.add(nameTF); - - layout2.add(layout3); // name field - layout2.add(buildTypesBox(nameTF.getPreferredSize().width)); // build type-selection box - layout2.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 4)); - - //layout1.add(imagePanel, BorderLayout.WEST); - layout1.add(layout2, BorderLayout.EAST); - - header.add(layout1); - - final JPanel layout4 = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - layout4.add(new JLabel("Archetype: ")); // create label + header.add(nameTF, gbc); + gbc.gridy++; + header.add(buildTypesBox(), gbc); // build type-selection box + gbc.gridy++; archetypeTF = new JTextField(archetype.getArchetypeName(), 16); archetypeTF.setEditable(false); - layout4.add(archetypeTF); + header.add(archetypeTF, gbc); - final JPanel layout5 = new JPanel(); - layout5.add(layout4); - header.add(layout5); - header.setPreferredSize(new Dimension(width - inventoryWidth - 2 * dividerSize, 70)); - - // finally put the result into a (non-scrollable) - // scrollpane to get the size right - final JScrollPane scrollPane = new JScrollPane(header); - scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); - - return scrollPane; + return header; } /** @@ -508,7 +461,7 @@ * containing the object's inventory. * @return a <code>JScrollPane</code> with the upper right part of the dialog window */ - private JScrollPane buildInv() { + private static JScrollPane buildInv() { final JPanel inv = new JPanel(); // the final thing, in a panel inv.add(new JLabel("Inventory:")); // create label @@ -528,7 +481,7 @@ * with the central part of the dialog window. * All further calls rebuild the existing tabbedpane and return null. */ - @Nullable private JScrollPane buildAttr() { + @Nullable private JComponent buildAttr() { boolean initialCall = false; if (tabbedPane == null) { @@ -547,18 +500,10 @@ tabbedPane.setSelectedIndex(0); if (initialCall) { - // if this is the first time call: - // create a scrollpane and put the tabbedpane inside - final JScrollPane scrollPane = new JScrollPane(tabbedPane); - scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); - scrollPane.setSize(width, height - 70 - buttonBarHeight); - - return scrollPane; + return tabbedPane; + } else { + return null; } - - return null; } /** @@ -569,9 +514,7 @@ */ @Nullable private Component makeAttribPanel(final int secId) { int number = 0; // number of attributes in this section - boolean isText = false; // true if this section contains a textfield boolean hasBitmask = false; // true if this section contains a bitmask attribute - Component fullPanel = null; // return object: the full attrib. panel // first we check how many attribs this section has for (int i = 0; type.getAttr().length > i; i++) { @@ -591,77 +534,75 @@ } // All attribute-"lines" go into this panel: - // We choose the boxlayout only for tabs with bitmasks, because we - // need it there. For all other cases, the gridlayout is better. - final JPanel panel = new JPanel(); - if (hasBitmask) { - panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); - } else { - panel.setLayout(new GridLayout(number, 1)); - } + final JPanel panel = new JPanel(new GridBagLayout()); + final Insets gbcInsets = new Insets(2, 2, 2, 2); + final GridBagConstraints gbc = new GridBagConstraints(); + gbc.insets = gbcInsets; + final Object helpGbc = gbc.clone(); + gbc.fill = GridBagConstraints.HORIZONTAL; + final Object labelGbc = gbc.clone(); + gbc.weightx = 1.0; + gbc.gridwidth = GridBagConstraints.REMAINDER; + final Object compGbc = gbc.clone(); + gbc.anchor = GridBagConstraints.WEST; + final Object rowGbc = gbc.clone(); + gbc.fill = GridBagConstraints.BOTH; + gbc.weighty = 1.0; + boolean isText = false; + final Object glueGbc = gbc.clone(); + + final CFArchAttrib[] attribs = type.getAttr(); // now add the entrys, line by line - for (int i = 0; type.getAttr().length > i; i++) { - final ArchAttribType dType = type.getAttr()[i].getDataType(); // data type of the attribute - if (type.getAttr()[i].getSecId() == secId && dType != ArchAttribType.FIXED) { - JPanel panel2 = null; // tmp. Panel for the layout + for (int i = 0; attribs.length > i; i++) { + final CFArchAttrib attrib = attribs[i]; + final ArchAttribType dType = attrib.getDataType(); // data type of the attribute + if (attrib.getSecId() == secId && dType != ArchAttribType.FIXED) { + final String nameOld = attrib.getNameOld(); + final JButton helpButton = new JButton("?"); + helpButton.setMargin(new Insets(0, 5, 0, 5)); + panel.add(helpButton, helpGbc); + helpButton.addFocusListener(this); + JComponent cLabel = null; + JComponent cComp = null; + JComponent cRow = null; + JComponent cGlue = null; + // now create the attribute-GUI-instance - final DialogAttrib newAttr; + final DialogAttrib<?> newAttr; switch (dType) { case TEXT: { - // special case: we've got a text section isText = true; // text section (need special embedding without additional scrollbars) - newAttr = new TextAttrib(); - newAttr.ref = type.getAttr()[i]; - final JTextArea input; - - // note that the textarea is initialized with rows/columns: 1, 1 - // this is pretty weird, but seems the only way to achieve desired behaviour - if (type.getAttr()[i].getNameOld().equalsIgnoreCase("msg")) { - if (archetype.getMsgText() != null && archetype.getMsgText().length() > 0 - && (gameObject.getMsgText() == null || gameObject.getMsgText().trim().length() == 0)) { - input = new JTextArea(archetype.getMsgText(), 1, 1); + newAttr = new DialogAttrib<JTextArea>(type.getAttr()[i]); + String text = ""; + if (nameOld.equalsIgnoreCase("msg")) { + if (archetype.getMsgText() != null && archetype.getMsgText().length() > 0 && (gameObject.getMsgText() == null || gameObject.getMsgText().trim().length() == 0)) + { + text = archetype.getMsgText(); } else { - input = new JTextArea(gameObject.getMsgText(), 1, 1); + text = gameObject.getMsgText(); } - } else { - input = new JTextArea(1, 1); } - + final JTextArea input = new JTextArea(text, 10, 20); input.setBorder(BorderFactory.createEmptyBorder(3, 7, 0, 0)); - - newAttr.helpButton = new JButton("?"); - newAttr.helpButton.setMargin(new Insets(0, 3, 0, 3)); - final JScrollPane scrollPane = new JScrollPane(input); scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); - - //Create a split pane with the two scroll panes in it. - final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, scrollPane, newAttr.helpButton); - splitPane.setDividerSize(0); - splitPane.setResizeWeight(1); - splitPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - - ((TextAttrib) newAttr).input = input; - - fullPanel = splitPane; // return the splitpane + scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); + scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); + ((DialogAttrib<JTextArea>) newAttr).input = input; + cGlue = scrollPane; } break; case BOOL: case BOOL_SPEC: { - // create an attribute line for BOOL - panel2 = new JPanel(new BorderLayout()); // need this layout for consistent resize-behaviour - final JPanel panel3 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - newAttr = new BoolAttrib(); + newAttr = new DialogAttrib<JCheckBox>(type.getAttr()[i]); final JCheckBox input; switch (dType) { case BOOL: // normal bool - input = new JCheckBox(" " + type.getAttr()[i].getNameNew(), (gameObject.getAttributeInt(type.getAttr()[i].getNameOld()) == 1)); + input = new JCheckBox(type.getAttr()[i].getNameNew(), (gameObject.getAttributeInt(type.getAttr()[i].getNameOld()) == 1)); break; case BOOL_SPEC: { // parse values for customized bool @@ -669,9 +610,9 @@ if (trueVal.equals("0")) { final String attrString = gameObject.getAttributeString(type.getAttr()[i].getNameOld()); - input = new JCheckBox(" " + type.getAttr()[i].getNameNew(), (attrString.length() == 0 || attrString.equals("0"))); + input = new JCheckBox(type.getAttr()[i].getNameNew(), (attrString.length() == 0 || attrString.equals("0"))); } else { - input = new JCheckBox(" " + type.getAttr()[i].getNameNew(), (gameObject.getAttributeString(type.getAttr()[i].getNameOld()).equals(trueVal))); + input = new JCheckBox(type.getAttr()[i].getNameNew(), (gameObject.getAttributeString(type.getAttr()[i].getNameOld()).equals(trueVal))); } } break; @@ -680,90 +621,54 @@ input = null; break; } - - newAttr.helpButton = new JButton("?"); - newAttr.ref = type.getAttr()[i]; - newAttr.helpButton.setMargin(new Insets(0, 3, 0, 3)); - - panel3.add(Box.createRigidArea(new Dimension(3, 20))); - panel3.add(newAttr.helpButton); - // create the offset from help-button and checkbox: - panel3.add(Box.createHorizontalStrut((int) (width / 3.3))); - panel3.add(input); // add checkbox - panel2.add(panel3, BorderLayout.WEST); - - ((BoolAttrib) newAttr).input = input; + ((DialogAttrib<JCheckBox>) newAttr).input = input; + cRow = input; } break; - case INT: { - // create an attribute line for INT - panel2 = new JPanel(new BorderLayout()); - final JPanel panel3 = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - final JPanel panel4 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - - final JLabel label = new JLabel(type.getAttr()[i].getNameNew() + ": "); - label.setForeground(IGUIConstants.INT_COLOR); - panel3.add(label); // add label - - newAttr = new IntAttrib(); - newAttr.ref = type.getAttr()[i]; - final JTextField input; - - // parse value from gameObject - final int fieldLength = (type.getAttr()[i].getInputLength() == 0 ? textFieldColumns : type.getAttr()[i].getInputLength()); - final int attrval = gameObject.getAttributeInt(type.getAttr()[i].getNameOld()); - if (attrval != 0) { - input = new JTextField(String.valueOf(attrval), fieldLength); - } else { - input = new JTextField("", fieldLength); - } - panel3.add(input); // add textfield - - // store width of textfield - if (textFieldWidth == 0 && type.getAttr()[i].getInputLength() == 0) { - textFieldWidth = input.getPreferredSize().width; - } - - newAttr.helpButton = new JButton("?"); - newAttr.helpButton.setMargin(new Insets(0, 3, 0, 3)); - panel4.add(Box.createRigidArea(new Dimension(3, 20))); - panel4.add(newAttr.helpButton); - - panel3.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); - panel2.add(panel3, BorderLayout.EAST); - panel2.add(panel4, BorderLayout.WEST); - ((IntAttrib) newAttr).input = input; - } - break; - case STRING: + case INT: case FLOAT: { - // create an attribute line for STRING - panel2 = new JPanel(new BorderLayout()); - final JPanel panel3 = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - final JPanel panel4 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - - final JLabel label = new JLabel(type.getAttr()[i].getNameNew() + ": "); - + cLabel = new JLabel(type.getAttr()[i].getNameNew() + ": "); + cLabel.setForeground(dType == ArchAttribType.FLOAT ? IGUIConstants.FLOAT_COLOR : IGUIConstants.INT_COLOR); + newAttr = new DialogAttrib<JFormattedTextField>(type.getAttr()[i]); + final int fieldLength = type.getAttr()[i].getInputLength() == 0 ? TEXTFIELD_COLUMNS : type.getAttr()[i].getInputLength(); + final NumberFormat format; switch (dType) { - case STRING: - newAttr = new StringAttrib(); - label.setForeground(Color.black); + case INT: + format = NumberFormat.getIntegerInstance(); break; case FLOAT: - newAttr = new FloatAttrib(); - label.setForeground(IGUIConstants.FLOAT_COLOR); + format = NumberFormat.getInstance(); + format.setMaximumFractionDigits(10); break; default: assert false; - newAttr = null; + format = null; break; } - - panel3.add(label); // add label - newAttr.ref = type.getAttr()[i]; - final JTextField input; - - // parse String from gameObject + format.setGroupingUsed(false); + final NumberFormatter formatter = new NumberFormatter(format); + final DefaultFormatterFactory factory = new DefaultFormatterFactory(formatter); + // parse value from gameObject + final Number value; + switch (dType) { + case INT: + value = gameObject.getAttributeInt(nameOld, true); + break; + case FLOAT: + value = gameObject.getAttributeDouble(nameOld, true); + break; + default: + value = null; + assert false; + break; + } + final JFormattedTextField input = new JFormattedTextField(factory, value); + input.setColumns(fieldLength); + cComp = input; + ((DialogAttrib<JFormattedTextField>) newAttr).input = input; + } + break; + case STRING: { final String dtxt; if (type.getAttr()[i].getNameOld().equalsIgnoreCase("name")) { if (gameObject.getObjName() != null && gameObject.getObjName().length() > 0) { @@ -782,53 +687,27 @@ } else { dtxt = gameObject.getAttributeString(type.getAttr()[i].getNameOld()); } - - input = new JTextField(dtxt, textFieldColumns); - panel3.add(input); // add textfield - - // store width of textfield - if (textFieldWidth == 0) { - textFieldWidth = input.getPreferredSize().width; - } - - newAttr.helpButton = new JButton("?"); - newAttr.helpButton.setMargin(new Insets(0, 3, 0, 3)); - - panel4.add(Box.createRigidArea(new Dimension(3, 20))); - panel4.add(newAttr.helpButton); - - panel3.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); - panel2.add(panel3, BorderLayout.EAST); - panel2.add(panel4, BorderLayout.WEST); - + final JTextField input = new JTextField(dtxt, TEXTFIELD_COLUMNS); switch (dType) { case STRING: - ((StringAttrib) newAttr).input = input; + cLabel = new JLabel(type.getAttr()[i].getNameNew() + ": "); + newAttr = new DialogAttrib<JTextField>(type.getAttr()[i]); break; - case FLOAT: - ((FloatAttrib) newAttr).input = input; - break; default: assert false; + newAttr = null; break; } + cComp = input; + ((DialogAttrib<JTextField>) newAttr).input = input; } break; case SPELL: case ZSPELL: case LIST: { - // create an attribute line for a combo box entry - panel2 = new JPanel(new BorderLayout()); - final JPanel panel3 = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - final JPanel panel4 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - - final JLabel label = new JLabel(type.getAttr()[i].getNameNew() + ": "); - label.setForeground(IGUIConstants.INT_COLOR); - panel3.add(label); // add label - - newAttr = new ListAttrib(); - newAttr.ref = type.getAttr()[i]; - + cLabel = new JLabel(type.getAttr()[i].getNameNew() + ": "); + cLabel.setForeground(IGUIConstants.INT_COLOR); + newAttr = new DialogAttrib<JComboBox>(type.getAttr()[i]); // create ComboBox with parsed selection final JComboBox input; switch (dType) { @@ -842,97 +721,53 @@ input = buildArrayBox(type.getAttr()[i], (Vector) (typelist.getListTable().get((String) (type.getAttr()[i].getMisc()[0])))); } else { // error: list data is missing or corrupt - panel3.add(new JLabel("Error: Undefined List")); - panel3.add(Box.createHorizontalStrut(50)); - input = null; // XXX: is later added to panel3 + cComp = new JLabel("Error: Undefined List"); + input = null; } break; default: - input = null; // XXX: is later added to panel3 + assert false; + input = null; break; } - - panel3.add(input); // add spellbox - - newAttr.helpButton = new JButton("?"); - newAttr.helpButton.setMargin(new Insets(0, 3, 0, 3)); - panel4.add(Box.createRigidArea(new Dimension(3, 20))); - panel4.add(newAttr.helpButton); - - panel3.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); - panel2.add(panel3, BorderLayout.EAST); - panel2.add(panel4, BorderLayout.WEST); - ((ListAttrib) newAttr).input = input; + if (input != null) { + cComp = input; + } + ((DialogAttrib<JComboBox>) newAttr).input = input; } break; case BITMASK: { - // create an attribute entry for a bitmask - panel2 = new JPanel(new BorderLayout()); - final JPanel panel3 = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - final JPanel panel4 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - - newAttr = new BitmaskAttrib(); - newAttr.ref = type.getAttr()[i]; - - // create bitmask-entry in the gui - //JButton input = null; + newAttr = new BitmaskAttrib(type.getAttr()[i]); if (type.getAttr()[i].getMisc() != null && typelist.getBitmaskTable().containsKey((String) (type.getAttr()[i].getMisc()[0]))) { // fetch the bitmask data, then build the attribute panel final CAttribBitmask bitmask = (CAttribBitmask) (typelist.getBitmaskTable().get((String) (type.getAttr()[i].getMisc()[0]))); - buildBitmask(type.getAttr()[i], (BitmaskAttrib) newAttr, bitmask, panel3); + ((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).bitmask = bitmask; + cLabel = new JButton(new MaskChangeAL(type.getAttr()[i].getNameNew() + ':', (BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr)); + final JTextArea input = new JTextArea(); + input.setBackground(getBackground()); + input.setEditable(false); + input.setBorder(BorderFactory.createLineBorder(Color.gray)); + input.setText(bitmask.getText(((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).getValue())); + cComp = input; + ((DialogAttrib<JTextComponent>) newAttr).input = input; + ((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).setValue(gameObject.getAttributeInt(nameOld, true)); } else { - // error: bitmask data is missing or corrupt - panel3.add(new JLabel("Error: Undefined Bitmask")); - panel3.add(Box.createHorizontalStrut(50)); + cRow = new JLabel("Error: Undefined Bitmask"); } - - newAttr.helpButton = new JButton("?"); - newAttr.helpButton.setMargin(new Insets(0, 3, 0, 3)); - newAttr.helpButton.setAlignmentY(JButton.CENTER_ALIGNMENT); - panel4.add(Box.createRigidArea(new Dimension(3, 20))); - panel4.add(newAttr.helpButton); - - panel3.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); - panel2.add(panel3, BorderLayout.EAST); - panel2.add(panel4, BorderLayout.WEST); - //((BitmaskAttrib)newAttr).input = input; } break; case TREASURE: { - // create an attribute entry for a treasurelist - panel2 = new JPanel(new BorderLayout()); - final JPanel panel3 = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - final JPanel panel4 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - - // button to view treasurelist tree - final JButton viewTTree = new JButton("treasurelist:"); - viewTTree.setMargin(new Insets(0, 3, 0, 3)); - - newAttr = new StringAttrib(); - newAttr.ref = type.getAttr()[i]; - + newAttr = new DialogAttrib<JTextField>(type.getAttr()[i]); // textfield (no direct input, text is set by the treasurelist dialog) String treasureName = gameObject.getAttributeString(type.getAttr()[i].getNameOld()); if (treasureName.trim().length() == 0 || treasureName.trim().equalsIgnoreCase("none")) { treasureName = CFTreasureListTree.NONE_SYM; } - final JTextField input = new JTextField(" " + treasureName, textFieldColumns); + final JTextField input = new JTextField(" " + treasureName, TEXTFIELD_COLUMNS); input.setEditable(false); - viewTTree.addActionListener(new ViewTreasurelistAL((StringAttrib) newAttr, this)); - - panel3.add(viewTTree); // add button - panel3.add(input); // add textfield - newAttr.helpButton = new JButton("?"); - newAttr.helpButton.setMargin(new Insets(0, 3, 0, 3)); - - panel4.add(Box.createRigidArea(new Dimension(3, 20))); - panel4.add(newAttr.helpButton); - - panel3.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); - panel2.add(panel3, BorderLayout.EAST); - panel2.add(panel4, BorderLayout.WEST); - - ((StringAttrib) newAttr).input = input; + cLabel = new JButton(new ViewTreasurelistAL((DialogAttrib<JTextField>) newAttr, this)); + cComp = input; + ((DialogAttrib<JTextField>) newAttr).input = input; } break; default: @@ -942,41 +777,34 @@ } // switch (dType) assert newAttr != null; - if (newAttr.helpButton != null) { - // help button: popup Info Window when clicked - newAttr.helpButton.addActionListener(new HelpAL(newAttr.ref)); + dialogAttribs.add(newAttr); + helpButton.addActionListener(new HelpActionListener(newAttr.ref)); + if (cLabel != null) { + panel.add(cLabel, labelGbc); + cLabel.addFocusListener(this); } - - // now attach the new attribute into the list - if (attrHead == null) { - attrHead = attrTail = newAttr; - } else { - attrTail.next = newAttr; - attrTail = attrTail.next; + if (cComp != null) { + panel.add(cComp, compGbc); + cComp.addFocusListener(this); } - - if (!isText) { - panel2.setSize(new Dimension(width - 70, 20)); - panel.add(panel2); + if (cRow != null) { + panel.add(cRow, rowGbc); + cRow.addFocusListener(this); } + if (cGlue != null) { + panel.add(cGlue, glueGbc); + cGlue.addFocusListener(this); + } } } if (!isText) { - // for non-text panels: put everything into a scrollpane - final JScrollPane scrollPane = new JScrollPane(panel); - final JScrollPane scrollPane2 = new JScrollPane(scrollPane); - scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); - scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); // don't show the border - - scrollPane2.setPreferredSize(new Dimension(20, 20)); - scrollPane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); - fullPanel = scrollPane2; // return this scrollpane + // if the component does not already have glue, put glue inside to align its contents to the top. + panel.add(Box.createGlue(), glueGbc); } - - return fullPanel; // return the full panel + final JScrollPane panelReturn = new JScrollPane(panel); + panelReturn.getVerticalScrollBar().setUnitIncrement(8); + return panelReturn; } /** @@ -1000,81 +828,52 @@ } /** - * Construct the lower part of the attribute dialog, - * containing the buttons (help, default, okay, apply, cancel). - * @return a <code>JScrollPane</code> with the lower part of the attribute dialog + * Construct the dialog options: help, default, okay, apply, cancel. + * @return Object[] with dialog options */ - private JScrollPane buildButtons() { - final JPanel totalBar = new JPanel(new BorderLayout()); // all buttons - final JPanel rightBar = new JPanel(new FlowLayout(FlowLayout.RIGHT)); // right side - final JPanel leftBar = new JPanel(new FlowLayout(FlowLayout.LEFT)); // left side + private Object[] buildOptions() { + return new Object[] { + new JButton(ACTION_FACTORY.createAction(false, "attribHelp", this)), + summaryEditButton = new JButton(summaryAction), + Box.createHorizontalStrut(32), + okButton = new JButton(ACTION_FACTORY.createAction(false, "attribOk", th... [truncated message content] |
From: <aki...@us...> - 2006-11-27 22:26:53
|
Revision: 736 http://svn.sourceforge.net/gridarta/?rev=736&view=rev Author: akirschbaum Date: 2006-11-27 14:26:52 -0800 (Mon, 27 Nov 2006) Log Message: ----------- Whitespace changes. Modified Paths: -------------- trunk/daimonin/src/daieditor/CAttribDialog.java Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-11-27 22:03:37 UTC (rev 735) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-11-27 22:26:52 UTC (rev 736) @@ -306,7 +306,6 @@ setOptions(buildOptions()); setMessage(contentPanel); - } /** {@inheritDoc} */ @@ -1101,8 +1100,7 @@ valString = attr.ref.getMisc()[1]; // false string } // now see if we need to write it into the archtext or not - if ("0".equals(valString) && !(archetype.getAttributeString(attr.ref.getNameOld()).length() == 0) || !valString.equals("0") && !archetype.getAttributeString(attr.ref.getNameOld()).equals(valString)) - { + if ("0".equals(valString) && !(archetype.getAttributeString(attr.ref.getNameOld()).length() == 0) || !valString.equals("0") && !archetype.getAttributeString(attr.ref.getNameOld()).equals(valString)) { newArchText = newArchText + attr.ref.getNameOld() + ' ' + valString + '\n'; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-27 22:03:37
|
Revision: 735 http://svn.sourceforge.net/gridarta/?rev=735&view=rev Author: akirschbaum Date: 2006-11-27 14:03:37 -0800 (Mon, 27 Nov 2006) Log Message: ----------- Fix typo in comment. Modified Paths: -------------- trunk/daimonin/src/daieditor/CAttribDialog.java Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-11-27 22:01:27 UTC (rev 734) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-11-27 22:03:37 UTC (rev 735) @@ -1616,7 +1616,7 @@ /** * Constructor. - * @param dialog the popu dialog + * @param dialog the popup dialog * @param gameObject the gameObject which has the error to be added * @param errors list of all errors (= initial content of the textarea) * @param keepB button "keep what is in the textfield" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |