Convert item type editing dialogs
This commit is contained in:
@@ -477,6 +477,9 @@
|
||||
919DDC0E1900751C003E7FED /* freetype.framework in Copy Libraries and Frameworks */ = {isa = PBXBuildFile; fileRef = 919DDC091900750D003E7FED /* freetype.framework */; };
|
||||
919DDC0F1900751F003E7FED /* freetype.framework in Copy Libraries and Frameworks */ = {isa = PBXBuildFile; fileRef = 919DDC091900750D003E7FED /* freetype.framework */; };
|
||||
91A073581A285293002F7E72 /* edit-monster-abils.xml in Copy Dialog Definitions */ = {isa = PBXBuildFile; fileRef = 91A073561A2828C6002F7E72 /* edit-monster-abils.xml */; };
|
||||
91A0735C1A297C3F002F7E72 /* item-types.txt in Copy Strings */ = {isa = PBXBuildFile; fileRef = 91A0735B1A2975AD002F7E72 /* item-types.txt */; };
|
||||
91A0735D1A297C4D002F7E72 /* edit-item.xml in Copy Dialog Definitions */ = {isa = PBXBuildFile; fileRef = 91A073591A29202E002F7E72 /* edit-item.xml */; };
|
||||
91A0735E1A297C4D002F7E72 /* edit-item-abils.xml in Copy Dialog Definitions */ = {isa = PBXBuildFile; fileRef = 91A0735A1A2928B4002F7E72 /* edit-item-abils.xml */; };
|
||||
91A0B1601900FFE500EF438F /* mask.frag in Copy Shaders */ = {isa = PBXBuildFile; fileRef = 91A0B15A1900F73E00EF438F /* mask.frag */; };
|
||||
91A32D160FDE049900C4E957 /* ticpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBA270FB8C459001E34EA /* ticpp.cpp */; };
|
||||
91A32D170FDE049900C4E957 /* tinystr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBA2E0FB8C459001E34EA /* tinystr.cpp */; };
|
||||
@@ -1065,6 +1068,8 @@
|
||||
914CA49E190C47D000B6ADD1 /* edit-intro.xml in Copy Dialog Definitions */,
|
||||
91C9C97D19116446001E14EB /* edit-monster.xml in Copy Dialog Definitions */,
|
||||
91A073581A285293002F7E72 /* edit-monster-abils.xml in Copy Dialog Definitions */,
|
||||
91A0735D1A297C4D002F7E72 /* edit-item.xml in Copy Dialog Definitions */,
|
||||
91A0735E1A297C4D002F7E72 /* edit-item-abils.xml in Copy Dialog Definitions */,
|
||||
);
|
||||
name = "Copy Dialog Definitions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -1100,6 +1105,7 @@
|
||||
914CA478190C47BD00B6ADD1 /* outdoor-default.txt in Copy Strings */,
|
||||
914CA479190C47BD00B6ADD1 /* scen-default.txt in Copy Strings */,
|
||||
914CA47A190C47BD00B6ADD1 /* town-default.txt in Copy Strings */,
|
||||
91A0735C1A297C3F002F7E72 /* item-types.txt in Copy Strings */,
|
||||
);
|
||||
name = "Copy Strings";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -1663,6 +1669,9 @@
|
||||
919DDBFB19006CC9003E7FED /* libboost_system.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libboost_system.dylib; path = /usr/local/lib/libboost_system.dylib; sourceTree = "<absolute>"; };
|
||||
919DDC091900750D003E7FED /* freetype.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = freetype.framework; path = ../../../../../../Library/Frameworks/freetype.framework; sourceTree = "<group>"; };
|
||||
91A073561A2828C6002F7E72 /* edit-monster-abils.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "edit-monster-abils.xml"; sourceTree = "<group>"; };
|
||||
91A073591A29202E002F7E72 /* edit-item.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "edit-item.xml"; sourceTree = "<group>"; };
|
||||
91A0735A1A2928B4002F7E72 /* edit-item-abils.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "edit-item-abils.xml"; sourceTree = "<group>"; };
|
||||
91A0735B1A2975AD002F7E72 /* item-types.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "item-types.txt"; path = "strings/item-types.txt"; sourceTree = "<group>"; };
|
||||
91A0B15A1900F73E00EF438F /* mask.frag */ = {isa = PBXFileReference; explicitFileType = sourcecode.glsl; fileEncoding = 4; path = mask.frag; sourceTree = "<group>"; };
|
||||
91A32BBA0FDB657800C4E957 /* dialog.results.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dialog.results.h; sourceTree = "<group>"; };
|
||||
91A32BD10FDB797B00C4E957 /* dlogutil.buttons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dlogutil.buttons.h; sourceTree = "<group>"; };
|
||||
@@ -2073,6 +2082,7 @@
|
||||
914CA456190749E100B6ADD1 /* town-default.txt */,
|
||||
9192C13818F327230088A580 /* traits.txt */,
|
||||
914CA46D190C478400B6ADD1 /* trim-names.txt */,
|
||||
91A0735B1A2975AD002F7E72 /* item-types.txt */,
|
||||
);
|
||||
name = strings;
|
||||
sourceTree = "<group>";
|
||||
@@ -2196,6 +2206,8 @@
|
||||
91364F1218F0914F0033B58E /* view-sign.xml */,
|
||||
91364F1318F0914F0033B58E /* welcome.xml */,
|
||||
91A073561A2828C6002F7E72 /* edit-monster-abils.xml */,
|
||||
91A073591A29202E002F7E72 /* edit-item.xml */,
|
||||
91A0735A1A2928B4002F7E72 /* edit-item-abils.xml */,
|
||||
);
|
||||
path = dialogs;
|
||||
sourceTree = "<group>";
|
||||
|
@@ -37,11 +37,6 @@ extern short start_volume, start_dir;
|
||||
short spec_item_spec,store_horse_page,store_boat_page ;
|
||||
short cur_shortcut;
|
||||
|
||||
const char *item_types[] = {"No Item","1-Handed weapon","2-Handed weapon","Gold","Bow","Arrows","Thrown missile",
|
||||
"Potion/Magic Item","Scroll/Magic Item","Wand","Tool","Food","Shield","Armor","Helm",
|
||||
"Gloves","Shield","Boots","Ring","Necklace",
|
||||
"Weapon Poison","Non-Use Object","Pants","Crossbow","Bolts","Missile (no ammo)","Unused","Unused"};
|
||||
|
||||
void init_scenario() {
|
||||
short i;
|
||||
rectangle dummy_rect;
|
||||
@@ -789,344 +784,395 @@ cMonster edit_monst_abil(cMonster starting_record,short which_monst) {
|
||||
return store_monst;
|
||||
}
|
||||
|
||||
void put_item_info_in_dlog() {
|
||||
#if 0
|
||||
cdsin(818,52,store_which_item);
|
||||
CDST(818,2,store_item.full_name.c_str());
|
||||
CDST(818,3,store_item.name.c_str());
|
||||
if (store_item.graphic_num >= 1000) // was 150
|
||||
csp(818,49,store_item.graphic_num % 1000,PICT_CUSTOM + PICT_ITEM);
|
||||
else csp(818,49,/*1800 + */store_item.graphic_num,PICT_ITEM);
|
||||
CDSN(818,4,store_item.graphic_num);
|
||||
cd_set_led_range(818,18,45,store_item.variety);
|
||||
CDSN(818,5,store_item.item_level);
|
||||
CDSN(818,6,store_item.awkward);
|
||||
CDSN(818,7,store_item.bonus);
|
||||
CDSN(818,8,store_item.protection);
|
||||
CDSN(818,9,store_item.charges);
|
||||
CDSN(818,10,store_item.type_flag);
|
||||
CDSN(818,11,store_item.value);
|
||||
CDSN(818,12,store_item.weight);
|
||||
CDSN(818,13,store_item.special_class);
|
||||
cd_set_led_range(818,46,48,store_item.type - 1);
|
||||
#endif
|
||||
void put_item_info_in_dlog(cDialog& me, cItemRec& store_item, short which_item) {
|
||||
me["num"].setTextToNum(which_item);
|
||||
me["full"].setText(store_item.full_name);
|
||||
me["short"].setText(store_item.name);
|
||||
if(store_item.graphic_num >= 1000) // was 150
|
||||
dynamic_cast<cPict&>(me["pic"]).setPict(store_item.graphic_num, PIC_CUSTOM_ITEM);
|
||||
else dynamic_cast<cPict&>(me["pic"]).setPict(store_item.graphic_num, PIC_ITEM);
|
||||
me["picnum"].setTextToNum(store_item.graphic_num);
|
||||
|
||||
cLedGroup& variety = dynamic_cast<cLedGroup&>(me["variety"]);
|
||||
switch(store_item.variety) {
|
||||
case ITEM_TYPE_NO_ITEM:
|
||||
variety.setSelected("none");
|
||||
break;
|
||||
case ITEM_TYPE_ONE_HANDED:
|
||||
variety.setSelected("weap1");
|
||||
break;
|
||||
case ITEM_TYPE_TWO_HANDED:
|
||||
variety.setSelected("weap2");
|
||||
break;
|
||||
case ITEM_TYPE_GOLD:
|
||||
variety.setSelected("gold");
|
||||
break;
|
||||
case ITEM_TYPE_BOW:
|
||||
variety.setSelected("bow");
|
||||
break;
|
||||
case ITEM_TYPE_ARROW:
|
||||
variety.setSelected("arrow");
|
||||
break;
|
||||
case ITEM_TYPE_THROWN_MISSILE:
|
||||
variety.setSelected("thrown");
|
||||
break;
|
||||
case ITEM_TYPE_POTION:
|
||||
variety.setSelected("potion");
|
||||
break;
|
||||
case ITEM_TYPE_SCROLL:
|
||||
variety.setSelected("scroll");
|
||||
break;
|
||||
case ITEM_TYPE_WAND:
|
||||
variety.setSelected("wand");
|
||||
break;
|
||||
case ITEM_TYPE_TOOL:
|
||||
variety.setSelected("tool");
|
||||
break;
|
||||
case ITEM_TYPE_FOOD:
|
||||
variety.setSelected("food");
|
||||
break;
|
||||
case ITEM_TYPE_SHIELD:
|
||||
variety.setSelected("shield");
|
||||
break;
|
||||
case ITEM_TYPE_ARMOR:
|
||||
variety.setSelected("armor");
|
||||
break;
|
||||
case ITEM_TYPE_HELM:
|
||||
variety.setSelected("helm");
|
||||
break;
|
||||
case ITEM_TYPE_GLOVES:
|
||||
variety.setSelected("gloves");
|
||||
break;
|
||||
case ITEM_TYPE_SHIELD_2:
|
||||
variety.setSelected("shield2");
|
||||
break;
|
||||
case ITEM_TYPE_BOOTS:
|
||||
variety.setSelected("boots");
|
||||
break;
|
||||
case ITEM_TYPE_RING:
|
||||
variety.setSelected("ring");
|
||||
break;
|
||||
case ITEM_TYPE_NECKLACE:
|
||||
variety.setSelected("necklace");
|
||||
break;
|
||||
case ITEM_TYPE_WEAPON_POISON:
|
||||
variety.setSelected("poison");
|
||||
break;
|
||||
case ITEM_TYPE_NON_USE_OBJECT:
|
||||
variety.setSelected("nonuse");
|
||||
break;
|
||||
case ITEM_TYPE_PANTS:
|
||||
variety.setSelected("pants");
|
||||
break;
|
||||
case ITEM_TYPE_CROSSBOW:
|
||||
variety.setSelected("xbow");
|
||||
break;
|
||||
case ITEM_TYPE_BOLTS:
|
||||
variety.setSelected("bolt");
|
||||
break;
|
||||
case ITEM_TYPE_MISSILE_NO_AMMO:
|
||||
variety.setSelected("missile");
|
||||
break;
|
||||
case ITEM_TYPE_UNUSED1:
|
||||
variety.setSelected("unused1");
|
||||
break;
|
||||
case ITEM_TYPE_UNUSED2:
|
||||
variety.setSelected("unused2");
|
||||
break;
|
||||
}
|
||||
|
||||
cLedGroup& weapType = dynamic_cast<cLedGroup&>(me["melee-type"]);
|
||||
switch(store_item.type) {
|
||||
case ITEM_NOT_MELEE:
|
||||
case ITEM_EDGED:
|
||||
weapType.setSelected("edge");
|
||||
break;
|
||||
case ITEM_BASHING:
|
||||
weapType.setSelected("bash");
|
||||
break;
|
||||
case ITEM_POLE:
|
||||
weapType.setSelected("pole");
|
||||
break;
|
||||
}
|
||||
|
||||
me["level"].setTextToNum(store_item.item_level);
|
||||
me["awkward"].setTextToNum(store_item.awkward);
|
||||
me["bonus"].setTextToNum(store_item.bonus);
|
||||
me["prot"].setTextToNum(store_item.protection);
|
||||
me["charges"].setTextToNum(store_item.charges);
|
||||
me["flag"].setTextToNum(store_item.type_flag);
|
||||
me["value"].setTextToNum(store_item.value);
|
||||
me["weight"].setTextToNum(store_item.weight);
|
||||
me["class"].setTextToNum(store_item.special_class);
|
||||
}
|
||||
|
||||
bool save_item_info() {
|
||||
#if 0
|
||||
char str[256];
|
||||
bool save_item_info(cDialog& me, cItemRec& store_item, short which_item) {
|
||||
store_item.full_name = me["full"].getText();
|
||||
store_item.name = me["short"].getText();
|
||||
store_item.graphic_num = me["picnum"].getTextAsNum();
|
||||
|
||||
CDGT(818,2,(char *) str);
|
||||
str[24] = 0;
|
||||
store_item.full_name = (char*)str;
|
||||
CDGT(818,3,(char *) str);
|
||||
str[14] = 0;
|
||||
store_item.name = (char*)str;
|
||||
store_item.graphic_num = CDGN(818,4);
|
||||
std::string variety = dynamic_cast<cLedGroup&>(me["variety"]).getSelected();
|
||||
if(variety == "none") store_item.variety = ITEM_TYPE_NO_ITEM;
|
||||
else if(variety == "weap1") store_item.variety = ITEM_TYPE_ONE_HANDED;
|
||||
else if(variety == "weap2") store_item.variety = ITEM_TYPE_TWO_HANDED;
|
||||
else if(variety == "gold") store_item.variety = ITEM_TYPE_GOLD;
|
||||
else if(variety == "bow") store_item.variety = ITEM_TYPE_BOW;
|
||||
else if(variety == "arrow") store_item.variety = ITEM_TYPE_ARROW;
|
||||
else if(variety == "thrown") store_item.variety = ITEM_TYPE_THROWN_MISSILE;
|
||||
else if(variety == "potion") store_item.variety = ITEM_TYPE_POTION;
|
||||
else if(variety == "scroll") store_item.variety = ITEM_TYPE_SCROLL;
|
||||
else if(variety == "wand") store_item.variety = ITEM_TYPE_WAND;
|
||||
else if(variety == "tool") store_item.variety = ITEM_TYPE_TOOL;
|
||||
else if(variety == "food") store_item.variety = ITEM_TYPE_FOOD;
|
||||
else if(variety == "shield") store_item.variety = ITEM_TYPE_SHIELD;
|
||||
else if(variety == "armor") store_item.variety = ITEM_TYPE_ARMOR;
|
||||
else if(variety == "helm") store_item.variety = ITEM_TYPE_HELM;
|
||||
else if(variety == "gloves") store_item.variety = ITEM_TYPE_GLOVES;
|
||||
else if(variety == "shield2") store_item.variety = ITEM_TYPE_SHIELD_2;
|
||||
else if(variety == "boots") store_item.variety = ITEM_TYPE_BOOTS;
|
||||
else if(variety == "ring") store_item.variety = ITEM_TYPE_RING;
|
||||
else if(variety == "necklace") store_item.variety = ITEM_TYPE_NECKLACE;
|
||||
else if(variety == "poison") store_item.variety = ITEM_TYPE_WEAPON_POISON;
|
||||
else if(variety == "nonuse") store_item.variety = ITEM_TYPE_NON_USE_OBJECT;
|
||||
else if(variety == "pants") store_item.variety = ITEM_TYPE_PANTS;
|
||||
else if(variety == "xbow") store_item.variety = ITEM_TYPE_CROSSBOW;
|
||||
else if(variety == "bolt") store_item.variety = ITEM_TYPE_BOLTS;
|
||||
else if(variety == "missile") store_item.variety = ITEM_TYPE_MISSILE_NO_AMMO;
|
||||
else if(variety == "unused1") store_item.variety = ITEM_TYPE_UNUSED1;
|
||||
else if(variety == "unused2") store_item.variety = ITEM_TYPE_UNUSED2;
|
||||
store_item.type = ITEM_NOT_MELEE;
|
||||
if(store_item.variety == ITEM_TYPE_ONE_HANDED || store_item.variety == ITEM_TYPE_TWO_HANDED) {
|
||||
std::string weapType = dynamic_cast<cLedGroup&>(me["melee-type"]).getSelected();
|
||||
if(weapType == "edge") store_item.type = ITEM_EDGED;
|
||||
else if(weapType == "bash") store_item.type = ITEM_BASHING;
|
||||
else if(weapType == "pole") store_item.type = ITEM_POLE;
|
||||
}
|
||||
|
||||
store_item.variety = (eItemType) cd_get_led_range(818,18,45);
|
||||
store_item.type = (eWeapType) (cd_get_led_range(818,46,48) + 1);
|
||||
|
||||
store_item.item_level = CDGN(818,5);
|
||||
if (cre(store_item.item_level,0,50,"Item Level must be from 0 to 50.","",818) > 0) return false;
|
||||
if (((store_item.variety == 3) || (store_item.variety == 11)) && (store_item.item_level == 0))
|
||||
store_item.item_level = me["level"].getTextAsNum();
|
||||
if((store_item.variety == 3 || store_item.variety == 11) && store_item.item_level == 0)
|
||||
store_item.item_level = 1;
|
||||
|
||||
store_item.awkward = CDGN(818,6);
|
||||
if (cre(store_item.awkward,0,20,"Awkward must be from 0 to 20.","",818) > 0) return false;
|
||||
store_item.bonus = CDGN(818,7);
|
||||
if (cre(store_item.bonus,0,60,"Bonus must be from 0 to 60.","",818) > 0) return false;
|
||||
store_item.protection = CDGN(818,8);
|
||||
if (cre(store_item.protection,-10,20,"Protection must be from -10 to 20.","",818) > 0) return false;
|
||||
store_item.charges = CDGN(818,9);
|
||||
if (cre(store_item.charges,0,100,"Charges must be from 0 to 100.","",818) > 0) return false;
|
||||
store_item.type_flag = CDGN(818,10);
|
||||
if (cre(store_item.type_flag,0,1000,"Type Flag must be from 0 to 1000.","",818) > 0) return false;
|
||||
store_item.value = CDGN(818,11);
|
||||
if (cre(store_item.value,0,10000,"Value must be from 0 to 10000.","",818) > 0) return false;
|
||||
store_item.weight = CDGN(818,12);
|
||||
if (cre(store_item.weight,0,250,"Weight must be from 0 to 250.","",818) > 0) return false;
|
||||
store_item.special_class = CDGN(818,13);
|
||||
if (cre(store_item.special_class,0,100,"Special Class must be from 0 to 100.","",818) > 0) return false;
|
||||
store_item.awkward = me["awkward"].getTextAsNum();
|
||||
store_item.bonus = me["bonus"].getTextAsNum();;
|
||||
store_item.protection = me["prot"].getTextAsNum();
|
||||
store_item.charges = me["charges"].getTextAsNum();
|
||||
store_item.type_flag = me["flag"].getTextAsNum();
|
||||
store_item.value = me["value"].getTextAsNum();
|
||||
store_item.weight = me["weight"].getTextAsNum();
|
||||
store_item.special_class = me["class"].getTextAsNum();
|
||||
|
||||
if ((store_item.type_flag > 0) && (store_item.charges == 0)) {
|
||||
give_error("If the Type Flag is greater than 0, the Charges must also be greater than 0.","",818);
|
||||
giveError("If the Type Flag is greater than 0, the Charges must also be greater than 0.","",&me);
|
||||
return false;
|
||||
}
|
||||
if (store_item.variety > 25) {
|
||||
give_error("The Unused item varieties are reserved for later expansions, and can't be used now.","",818);
|
||||
giveError("The Unused item varieties are reserved for later expansions, and can't be used now.","",&me);
|
||||
return false;
|
||||
}
|
||||
if ((store_item.ability >= 70) && (store_item.ability < 170) && (store_item.charges == 0)) {
|
||||
give_error("An item with the special ability selected must have at least 1 charge.","",818);
|
||||
giveError("An item with the special ability selected must have at least 1 charge.","",&me);
|
||||
return false;
|
||||
}
|
||||
scenario.scen_items[store_which_item] = store_item ;
|
||||
#endif
|
||||
scenario.scen_items[which_item] = store_item;
|
||||
return true;
|
||||
}
|
||||
|
||||
void edit_item_type_event_filter (short item_hit) {
|
||||
#if 0
|
||||
bool edit_item_type_event_filter(cDialog& me, std::string item_hit, cItemRec& store_item, short store_which_item) {
|
||||
short i;
|
||||
cItemRec temp_item;
|
||||
|
||||
switch (item_hit) {
|
||||
case 15:
|
||||
toast_dialog();
|
||||
break;
|
||||
case 14:
|
||||
if (save_item_info() == true)
|
||||
toast_dialog();
|
||||
break;
|
||||
|
||||
case 16:
|
||||
if (save_item_info() == false) break;
|
||||
if(item_hit == "cancel") {
|
||||
me.toast();
|
||||
} else if(item_hit == "okay") {
|
||||
if(save_item_info(me, store_item, store_which_item)) me.toast();
|
||||
} else if(item_hit == "prev") {
|
||||
if(!save_item_info(me, store_item, store_which_item)) return true;
|
||||
store_which_item--;
|
||||
if (store_which_item < 0) store_which_item = 399;
|
||||
store_item = scenario.scen_items[store_which_item];
|
||||
put_item_info_in_dlog();
|
||||
break;
|
||||
case 17:
|
||||
if (save_item_info() == false) break;
|
||||
put_item_info_in_dlog(me, store_item, store_which_item);
|
||||
} else if(item_hit == "next") {
|
||||
if(!save_item_info(me, store_item, store_which_item)) return true;
|
||||
store_which_item++;
|
||||
if (store_which_item > 399) store_which_item = 0;
|
||||
store_item = scenario.scen_items[store_which_item];
|
||||
put_item_info_in_dlog();
|
||||
break;
|
||||
case 56:
|
||||
if (save_item_info() == false) break;
|
||||
i = choose_graphic(/*1800,1922*/0,PICT_N_ITEM,store_item.graphic_num/* + 1800*/,PICT_ITEM,818);
|
||||
if (i < 0) break;
|
||||
put_item_info_in_dlog(me, store_item, store_which_item);
|
||||
} else if(item_hit == "choospic") {
|
||||
if(!save_item_info(me, store_item, store_which_item)) return true;
|
||||
i = pick_picture(PIC_ITEM, me, "picnum", "pic", 0);
|
||||
if(i < 0) return true;
|
||||
store_item.graphic_num = i;
|
||||
put_item_info_in_dlog();
|
||||
break;
|
||||
case 69:
|
||||
if (store_item.variety == 0) {
|
||||
give_error("You must give the item a type (weapon, armor, etc.) before you can choose its abilities.","",818);
|
||||
break;
|
||||
}
|
||||
if ((store_item.variety == 3) || (store_item.variety == 11)) {
|
||||
give_error("Gold and Food cannot be given special abilities.","",818);
|
||||
break;
|
||||
}
|
||||
temp_item = edit_item_abil(store_item,818);
|
||||
} else if(item_hit == "abils") {
|
||||
if(store_item.variety == 0) {
|
||||
giveError("You must give the item a type (weapon, armor, etc.) before you can choose its abilities.","",&me);
|
||||
return true;
|
||||
}
|
||||
if((store_item.variety == 3) || (store_item.variety == 11)) {
|
||||
giveError("Gold and Food cannot be given special abilities.","",&me);
|
||||
return true;
|
||||
}
|
||||
temp_item = edit_item_abil(store_item,store_which_item);
|
||||
if (temp_item.variety != 0)
|
||||
store_item = temp_item;
|
||||
break;
|
||||
default:
|
||||
cd_hit_led_range(818,18,45,item_hit);
|
||||
store_item.variety = (eItemType) cd_get_led_range(818,18,45);
|
||||
if ((store_item.variety == ITEM_TYPE_ONE_HANDED) || (store_item.variety == ITEM_TYPE_TWO_HANDED))
|
||||
store_item.type = ITEM_EDGED;
|
||||
else store_item.type = ITEM_NOT_MELEE;
|
||||
cd_hit_led_range(818,46,48,item_hit);
|
||||
break;
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
short edit_item_type(short which_item) {
|
||||
#if 0
|
||||
// ignore parent in Mac version
|
||||
short item_hit,i;
|
||||
|
||||
store_which_item = which_item;
|
||||
store_item = scenario.scen_items[store_which_item];
|
||||
//make_cursor_sword();
|
||||
|
||||
cd_create_dialog_parent_num(818,0);
|
||||
|
||||
put_item_info_in_dlog();
|
||||
|
||||
for (i = 18; i < 46; i++)
|
||||
cd_add_label(818, i,item_types[i - 18],47);
|
||||
cd_add_label(818,46,"Edged",23);
|
||||
cd_add_label(818,47,"Bashing",23);
|
||||
cd_add_label(818,48,"Pole",23);
|
||||
cd_attach_key(818,16,0);
|
||||
cd_attach_key(818,17,0);
|
||||
|
||||
item_hit = cd_run_dialog();
|
||||
|
||||
cd_kill_dialog(818);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void put_item_abils_in_dlog() {
|
||||
#if 0
|
||||
char str[256];
|
||||
|
||||
cdsin(824,16,store_which_item);
|
||||
csit(824,32,store_item2.full_name.c_str());
|
||||
csit(824,34,item_types[store_item2.variety]);
|
||||
get_str(str,23,store_item2.ability + 1);
|
||||
csit(824,19,(char *) str);
|
||||
|
||||
cd_set_led_range(824,5,8,store_item2.magic_use_type);
|
||||
cd_set_led_range(824,26,30,store_item2.treas_class);
|
||||
CDSN(824,2,store_item2.ability_strength);
|
||||
if (store_item2.ident)
|
||||
cd_set_led(824,9,1);
|
||||
else cd_set_led(824,9,0);
|
||||
if (store_item2.magic)
|
||||
cd_set_led(824,10,1);
|
||||
else cd_set_led(824,10,0);
|
||||
if (store_item2.cursed)
|
||||
cd_set_led(824,11,1);
|
||||
else cd_set_led(824,11,0);
|
||||
if (store_item2.concealed)
|
||||
cd_set_led(824,12,1);
|
||||
else cd_set_led(824,12,0);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool save_item_abils() {
|
||||
#if 0
|
||||
store_item2.magic_use_type = cd_get_led_range(824,5,8);
|
||||
store_item2.treas_class = cd_get_led_range(824,26,30);
|
||||
store_item2.ability_strength = CDGN(824,2);
|
||||
if ((store_item2.ability != 119) && (store_item2.ability != 120)) {
|
||||
if (cre(store_item2.ability_strength,0,10,"Ability Strength must always be a number from 0 to 10.","",824) > 0) return false;
|
||||
}
|
||||
else if (cre(store_item2.ability_strength,0,255,"Ability Strength must be 0 to 255 - the number of the monster to summon.","",824) > 0) return false;
|
||||
store_item2.property = store_item2.enchanted = store_item2.contained = false;
|
||||
store_item2.ident = cd_get_led(824,9);
|
||||
store_item2.magic = cd_get_led(824,10);
|
||||
store_item2.cursed = store_item2.unsellable = cd_get_led(824,11);
|
||||
store_item2.concealed = cd_get_led(824,12);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
void edit_item_abil_event_filter (short item_hit) {
|
||||
#if 0
|
||||
short i;
|
||||
short edit_item_type(short which_item) {
|
||||
using namespace std::placeholders;
|
||||
cItemRec store_item = scenario.scen_items[which_item];
|
||||
|
||||
switch (item_hit) {
|
||||
case 4:
|
||||
store_item2.ability = ITEM_NO_ABILITY;
|
||||
toast_dialog();
|
||||
break;
|
||||
case 3:
|
||||
if (save_item_abils() == true)
|
||||
toast_dialog();
|
||||
break;
|
||||
case 17:
|
||||
if (save_item_abils() == false) break;
|
||||
if (store_item.variety > 2) {
|
||||
give_error("You can only give an ability of this sort to a melee weapon.","",824);
|
||||
break;
|
||||
}
|
||||
i = choose_text_res(23,1,15,store_item2.ability + 1,824,"Choose Weapon Ability (inherent)");
|
||||
if (i >= 0) store_item2.ability = (eItemAbil) (i - 1);
|
||||
else store_item2.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog();
|
||||
break;
|
||||
case 35:
|
||||
if (save_item_abils() == false) break;
|
||||
if ((store_item.variety == 5) || (store_item.variety == 6)|| (store_item.variety == 7) || (store_item.variety == 8) ||
|
||||
(store_item.variety == 9) || (store_item.variety == 10) || (store_item.variety == 20) ||
|
||||
(store_item.variety == 21) || (store_item.variety == 24)){
|
||||
give_error("You can only give an ability of this sort to an non-missile item which can be equipped (like armor, or a ring).","",824);
|
||||
break;
|
||||
}
|
||||
i = choose_text_res(23,31,63,store_item2.ability + 1,824,"Choose General Ability (inherent)");
|
||||
if (i >= 0) store_item2.ability = (eItemAbil) (i - 1);
|
||||
else store_item2.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog();
|
||||
break;
|
||||
case 36:
|
||||
if (save_item_abils() == false) break;
|
||||
if ((store_item.variety == 5) || (store_item.variety == 6) || (store_item.variety == 24)){
|
||||
give_error("You can only give an ability of this sort to an item which isn't a missile.","",824);
|
||||
break;
|
||||
}
|
||||
i = choose_text_res(23,71,95,store_item2.ability + 1,824,"Choose Usable Ability (Not spell)");
|
||||
if (i >= 0) store_item2.ability = (eItemAbil) (i - 1);
|
||||
else store_item2.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog();
|
||||
break;
|
||||
case 39:
|
||||
if (save_item_abils() == false) break;
|
||||
if ((store_item.variety == 5) || (store_item.variety == 6) || (store_item.variety == 24)){
|
||||
give_error("You can only give an ability of this sort to an item which isn't a missile.","",824);
|
||||
break;
|
||||
}
|
||||
i = choose_text_res(23,111,136,store_item2.ability + 1,824,"Choose Usable Ability (Spell)");
|
||||
if (i >= 0) store_item2.ability = (eItemAbil) (i - 1);
|
||||
else store_item2.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog();
|
||||
break;
|
||||
case 38:
|
||||
if (save_item_abils() == false) break;
|
||||
if (store_item.variety != 21){
|
||||
give_error("You can only give an ability of this sort to an item of type Non-Use Object.","",824);
|
||||
break;
|
||||
}
|
||||
i = choose_text_res(23,151,162,store_item2.ability + 1,824,"Choose Reagent Ability");
|
||||
if (i >= 0) store_item2.ability = (eItemAbil) (i - 1);
|
||||
else store_item2.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog();
|
||||
break;
|
||||
case 37:
|
||||
if (save_item_abils() == false) break;
|
||||
if ((store_item.variety != 5) && (store_item.variety != 6) && (store_item.variety != 24)){
|
||||
give_error("You can only give an ability of this sort to an item which isn't a missile.","",824);
|
||||
break;
|
||||
}
|
||||
i = choose_text_res(23,171,177,store_item2.ability + 1,824,"Choose Missile Ability");
|
||||
if (i >= 0) store_item2.ability = (eItemAbil) (i - 1);
|
||||
else store_item2.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog();
|
||||
break;
|
||||
default:
|
||||
cd_hit_led_range(824,26,30,item_hit);
|
||||
cd_hit_led_range(824,5,8,item_hit);
|
||||
for (i = 9; i < 13; i++)
|
||||
cd_flip_led(824,i,item_hit);
|
||||
break;
|
||||
|
||||
}
|
||||
#endif
|
||||
cDialog item_dlg("edit-item.xml");
|
||||
item_dlg["level"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 50, "Item Level"));
|
||||
item_dlg["awkward"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 20, "Awkward"));
|
||||
item_dlg["bonus"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 60, "Bonus"));
|
||||
item_dlg["prot"].attachFocusHandler(std::bind(check_range, _1, _2, _3, -10, 20, "Protection"));
|
||||
item_dlg["charges"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 100, "Charges"));
|
||||
item_dlg["flag"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 1000, "Type Flag"));
|
||||
item_dlg["value"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 10000, "Value"));
|
||||
item_dlg["weight"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 250, "Weight"));
|
||||
item_dlg["class"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 100, "Special Class"));
|
||||
item_dlg.attachClickHandlers(std::bind(edit_item_type_event_filter, _1, _2, std::ref(store_item), which_item), {"okay", "cancel", "prev", "next", "abils", "choosepic"});
|
||||
|
||||
put_item_info_in_dlog(item_dlg, store_item, which_item);
|
||||
|
||||
item_dlg.run();
|
||||
return 0;
|
||||
}
|
||||
|
||||
cItemRec edit_item_abil(cItemRec starting_record,short parent_num) {
|
||||
cItemRec store_item2 = starting_record;
|
||||
#if 0
|
||||
// ignore parent in Mac version
|
||||
short item_hit;
|
||||
void put_item_abils_in_dlog(cDialog& me, cItemRec& store_item, short which_item) {
|
||||
char str[256];
|
||||
|
||||
//store_which_item = which_item;
|
||||
store_item2 = starting_record;
|
||||
//make_cursor_sword();
|
||||
me["num"].setTextToNum(which_item);
|
||||
me["name"].setText(store_item.full_name.c_str());
|
||||
me["variety"].setText(get_str("item-types", store_item.variety));
|
||||
me["abilname"].setText(get_str("item-abilities", store_item.ability + 1));
|
||||
|
||||
cd_create_dialog_parent_num(824,parent_num);
|
||||
dynamic_cast<cLedGroup&>(me["use-type"]).setSelected("use" + std::to_string(store_item.magic_use_type));
|
||||
dynamic_cast<cLedGroup&>(me["treasure"]).setSelected("type" + std::to_string(store_item.treas_class));
|
||||
me["str"].setTextToNum(store_item.ability_strength);
|
||||
|
||||
put_item_abils_in_dlog();
|
||||
dynamic_cast<cLed&>(me["always-id"]).setState(store_item.ident ? led_red : led_off);
|
||||
dynamic_cast<cLed&>(me["magic"]).setState(store_item.magic ? led_red : led_off);
|
||||
dynamic_cast<cLed&>(me["cursed"]).setState(store_item.cursed ? led_red : led_off);
|
||||
dynamic_cast<cLed&>(me["conceal"]).setState(store_item.concealed ? led_red : led_off);
|
||||
}
|
||||
|
||||
bool save_item_abils(cDialog& me, cItemRec& store_item) {
|
||||
store_item.magic_use_type = boost::lexical_cast<short>(dynamic_cast<cLedGroup&>(me["use-type"]).getSelected().substr(3));
|
||||
store_item.treas_class = boost::lexical_cast<short>(dynamic_cast<cLedGroup&>(me["treasure"]).getSelected().substr(4));
|
||||
store_item.ability_strength = me["str"].getTextAsNum();
|
||||
|
||||
cd_add_label(824,26,"Type 0: Junk, Not left",68);
|
||||
cd_add_label(824,27,"Type 1: Lousy, 1 - 20 gp",68);
|
||||
cd_add_label(824,28,"Type 2: So-so, 20-200 gp",68);
|
||||
cd_add_label(824,29,"Type 3: Good, 200+ gp",68);
|
||||
cd_add_label(824,30,"Type 4: Great, 2500+ gp",68);
|
||||
store_item.property = store_item.enchanted = store_item.contained = false;
|
||||
store_item.ident = dynamic_cast<cLed&>(me["always-id"]).getState() != led_off;
|
||||
store_item.magic = dynamic_cast<cLed&>(me["magic"]).getState() != led_off;
|
||||
store_item.cursed = store_item.unsellable = dynamic_cast<cLed&>(me["cursed"]).getState() != led_off;
|
||||
store_item.concealed = dynamic_cast<cLed&>(me["conceal"]).getState() != led_off;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool edit_item_abil_event_filter(cDialog& me, std::string item_hit, cItemRec& store_item, short which_item) {
|
||||
short i;
|
||||
|
||||
cd_add_label(824,5,"Help using PC",50);
|
||||
cd_add_label(824,6,"Harm using PC",50);
|
||||
cd_add_label(824,7,"Help whole party",50);
|
||||
cd_add_label(824,8,"Harm whole party",50);
|
||||
if(item_hit == "cancel") {
|
||||
store_item.ability = ITEM_NO_ABILITY;
|
||||
me.toast();
|
||||
return true;
|
||||
} else if(item_hit == "okay") {
|
||||
if(save_item_abils(me, store_item)) {
|
||||
me.toast();
|
||||
return true;
|
||||
}
|
||||
} else if(item_hit == "weapon") {
|
||||
if(!save_item_abils(me, store_item)) return true;
|
||||
if(store_item.variety > 2) {
|
||||
giveError("You can only give an ability of this sort to a melee weapon.","",&me);
|
||||
return true;
|
||||
}
|
||||
i = choose_text_res("item-abilities", 1, 15, store_item.ability + 1, &me, "Choose Weapon Ability (inherent)");
|
||||
if(i >= 0) store_item.ability = (eItemAbil) (i - 1);
|
||||
else store_item.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog(me, store_item, which_item);
|
||||
} else if(item_hit == "general") {
|
||||
if(save_item_abils(me, store_item)) return true;
|
||||
if((store_item.variety == 5) || (store_item.variety == 6)|| (store_item.variety == 7) || (store_item.variety == 8) ||
|
||||
(store_item.variety == 9) || (store_item.variety == 10) || (store_item.variety == 20) ||
|
||||
(store_item.variety == 21) || (store_item.variety == 24)){
|
||||
giveError("You can only give an ability of this sort to an non-missile item which can be equipped (like armor, or a ring).","",&me);
|
||||
return true;
|
||||
}
|
||||
i = choose_text_res("item-abilities", 31, 63, store_item.ability + 1, &me, "Choose General Ability (inherent)");
|
||||
if(i >= 0) store_item.ability = (eItemAbil) (i - 1);
|
||||
else store_item.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog(me, store_item, which_item);
|
||||
} else if(item_hit == "usable") {
|
||||
if(save_item_abils(me, store_item)) return true;
|
||||
if((store_item.variety == 5) || (store_item.variety == 6) || (store_item.variety == 24)){
|
||||
giveError("You can only give an ability of this sort to an item which isn't a missile.","",&me);
|
||||
return true;
|
||||
}
|
||||
i = choose_text_res("item-abilities", 71, 95, store_item.ability + 1, &me, "Choose Usable Ability (Not spell)");
|
||||
if(i >= 0) store_item.ability = (eItemAbil) (i - 1);
|
||||
else store_item.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog(me, store_item, which_item);
|
||||
} else if(item_hit == "spell") {
|
||||
if(!save_item_abils(me,store_item)) return true;
|
||||
if((store_item.variety == 5) || (store_item.variety == 6) || (store_item.variety == 24)){
|
||||
giveError("You can only give an ability of this sort to an item which isn't a missile.","",&me);
|
||||
return true;
|
||||
}
|
||||
i = choose_text_res("item-abilities", 111, 136, store_item.ability + 1, &me, "Choose Usable Ability (Spell)");
|
||||
if(i >= 0) store_item.ability = (eItemAbil) (i - 1);
|
||||
else store_item.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog(me, store_item, which_item);
|
||||
} else if(item_hit == "reagent") {
|
||||
if(!save_item_abils(me, store_item)) return true;
|
||||
if(store_item.variety != 21){
|
||||
giveError("You can only give an ability of this sort to an item of type Non-Use Object.","",&me);
|
||||
return true;
|
||||
}
|
||||
i = choose_text_res("item-abilities", 151, 162, store_item.ability + 1, &me, "Choose Reagent Ability");
|
||||
if(i >= 0) store_item.ability = (eItemAbil) (i - 1);
|
||||
else store_item.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog(me, store_item, which_item);
|
||||
} else if(item_hit == "missile") {
|
||||
if(!save_item_abils(me,store_item)) return true;
|
||||
if((store_item.variety != 5) && (store_item.variety != 6) && (store_item.variety != 24)){
|
||||
giveError("You can only give an ability of this sort to an item which isn't a missile.","",&me);
|
||||
return true;
|
||||
}
|
||||
i = choose_text_res("item-abilities", 171, 177, store_item.ability + 1, &me, "Choose Missile Ability");
|
||||
if(i >= 0) store_item.ability = (eItemAbil) (i - 1);
|
||||
else store_item.ability = ITEM_NO_ABILITY;
|
||||
put_item_abils_in_dlog(me, store_item, which_item);
|
||||
}
|
||||
using namespace std::placeholders;
|
||||
if(store_item.ability != 119 && store_item.ability != 120) {
|
||||
me["str"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 10, "Ability Strength"));
|
||||
} else {
|
||||
me["str"].attachFocusHandler(std::bind(check_range_msg, _1,_2,_3, 0,255, "Ability Strength","the number of the monster to summon"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
cItemRec edit_item_abil(cItemRec starting_record,short which_item) {
|
||||
using namespace std::placeholders;
|
||||
|
||||
cItemRec store_item = starting_record;
|
||||
|
||||
cd_add_label(824,9,"Always identified",50);
|
||||
cd_add_label(824,10,"Magical",50);
|
||||
cd_add_label(824,11,"Cursed",50);
|
||||
cd_add_label(824,12,"Conceal ability",50);
|
||||
cDialog item_dlg("edit-item-abils.xml");
|
||||
if(store_item.ability != 119 && store_item.ability != 120) {
|
||||
item_dlg["str"].attachFocusHandler(std::bind(check_range, _1, _2, _3, 0, 10, "Ability Strength"));
|
||||
} else {
|
||||
item_dlg["str"].attachFocusHandler(std::bind(check_range_msg,_1,_2,_3, 0,255, "Ability Strength","the number of the monster to summon"));
|
||||
}
|
||||
item_dlg.attachClickHandlers(std::bind(edit_item_abil_event_filter, _1, _2, std::ref(store_item), which_item), {"okay", "cancel", "weapon", "general", "usable", "missile", "reagent", "spell"});
|
||||
|
||||
item_hit = cd_run_dialog();
|
||||
cd_kill_dialog(824);
|
||||
#endif
|
||||
return store_item2;
|
||||
put_item_abils_in_dlog(item_dlg, store_item, which_item);
|
||||
|
||||
item_dlg.run();
|
||||
|
||||
return store_item;
|
||||
}
|
||||
|
||||
void put_spec_item_in_dlog() {
|
||||
|
53
rsrc/dialogs/edit-item-abils.xml
Normal file
53
rsrc/dialogs/edit-item-abils.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||
<!--<!DOCTYPE dialog SYSTEM "dialog.dtd">-->
|
||||
<dialog skin='light' defbtn='okay' debug='true'>
|
||||
<field name='str' top='88' left='183' width='77' height='16'/>
|
||||
<button name='okay' type='regular' top='266' left='471'>OK</button>
|
||||
<button name='cancel' type='regular' top='266' left='405' def-key='esc'>Cancel</button>
|
||||
<!--
|
||||
NOTE: All these LEDs have been shifted 100 pixels left to account for the labels swapping sides
|
||||
-->
|
||||
<group name='use-type'>
|
||||
<led name='use0' state='off' top='143' left='164' width='100'>Help using PC</led>
|
||||
<led name='use1' state='off' top='158' left='164' width='100'>Harm using PC</led>
|
||||
<led name='use2' state='off' top='173' left='164' width='100'>Help whole party</led>
|
||||
<led name='use3' state='off' top='188' left='164' width='100'>Harm whole party</led>
|
||||
</group>
|
||||
<led name='always-id' state='off' top='144' left='415' width='100'>Always identified</led>
|
||||
<led name='magic' state='off' top='159' left='415' width='100'>Magical</led>
|
||||
<led name='cursed' state='off' top='174' left='415' width='100'>Cursed</led>
|
||||
<led name='conceal' state='off' top='189' left='415' width='100'>Conceal ability</led>
|
||||
<pict type='dlog' num='16' top='8' left='11'/>
|
||||
<text size='large' top='6' left='50' width='158' height='16'>Edit Item Abilities</text>
|
||||
<text top='8' left='222' width='111' height='14'>Item number:</text>
|
||||
<text name='num' top='8' left='340' width='37' height='14'/>
|
||||
<button name='weapon' type='large' top='58' left='333'>Weapon Abil.</button>
|
||||
<text size='large' top='63' left='8' width='142' height='13'>Item special ability:</text>
|
||||
<text name='abilname' framed='true' top='63' left='161' width='163' height='13'/>
|
||||
<text top='17' left='486' width='45' height='14'/>
|
||||
<text top='84' left='8' width='168' height='27'>Ability strength: (Usually 0-10, see instructions)</text>
|
||||
<text top='140' left='8' width='135' height='13'>Item use properties</text>
|
||||
<text top='156' left='21' width='123' height='39'>Only used for item abilities which are used (like healing).</text>
|
||||
<text top='140' left='292' width='121' height='13'>Other properties:</text>
|
||||
<text top='209' left='10' width='155' height='42'>Item treasure class: (0 is lowest level of treasure, 4 is highest)</text>
|
||||
<!--
|
||||
NOTE: All these LEDs have been shifted 100 pixels left to account for the labels swapping sides
|
||||
-->
|
||||
<group name='treasure'>
|
||||
<led name='type0' state='off' top='213' left='208' width='140'>Type 0: Junk, Not left</led>
|
||||
<led name='type1' state='off' top='228' left='208' width='140'>Type 1: Lousy, 1 - 20 gp</led>
|
||||
<led name='type2' state='off' top='243' left='208' width='140'>Type 2: So-so, 20-200 gp</led>
|
||||
<led name='type3' state='off' top='258' left='208' width='140'>Type 2: Good, 200+ gp</led>
|
||||
<led name='type4' state='off' top='273' left='208' width='140'>Type 4: Greate, 2500+ gp</led>
|
||||
</group>
|
||||
<text top='25' left='50' width='145' height='14'>Current item name:</text>
|
||||
<text name='name' top='25' left='198' width='196' height='14'/>
|
||||
<text top='41' left='50' width='145' height='14'>Current item variety:</text>
|
||||
<text name='variety' top='41' left='198' width='196' height='14'/>
|
||||
<button name='general' type='large' top='57' left='441'>General Abil.</button>
|
||||
<button name='usable' type='large' top='83' left='333'>NonSpell Use</button>
|
||||
<button name='missile' type='large' top='107' left='441'>Missiles</button>
|
||||
<button name='reagent' type='large' top='108' left='333'>Reagents</button>
|
||||
<button name='spell' type='large' top='82' left='441'>Spell Usable</button>
|
||||
</dialog>
|
90
rsrc/dialogs/edit-item.xml
Normal file
90
rsrc/dialogs/edit-item.xml
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||
<!--<!DOCTYPE dialog SYSTEM "dialog.dtd">-->
|
||||
<dialog skin='light' defbtn='okay' debug='true'>
|
||||
<field name='full' top='30' left='163' width='126' height='16'/>
|
||||
<field name="short" top='30' left='458' width='125' height='16'/>
|
||||
<field name='picnum' top='62' left='140' width='52' height='16'/>
|
||||
<field name='level' top='199' left='161' width='52' height='16'/>
|
||||
<field name='awkward' top='223' left='161' width='52' height='16'/>
|
||||
<field name='bonus' top='247' left='161' width='52' height='16'/>
|
||||
<field name='prot' top='271' left='161' width='52' height='16'/>
|
||||
<field name='charges' top='295' left='161' width='52' height='16'/>
|
||||
<field name='flag' top='199' left='366' width='52' height='16'/>
|
||||
<field name='value' top='223' left='366' width='52' height='16'/>
|
||||
<field name='weight' top='247' left='366' width='52' height='16'/>
|
||||
<field name='class' top='271' left='366' width='52' height='16'/>
|
||||
<button name='okay' type='regular' top='337' left='509'>OK</button>
|
||||
<button name='cancel' type='regular' top='337' left='434' def-key='esc'>Cancel</button>
|
||||
<button name='prev' type='left' top='337' left='13'/>
|
||||
<button name='next' type='right' top='337' left='76'/>
|
||||
<!--
|
||||
NOTE: All these LEDs have been shifted 100 pixels left to account for the labels swapping sides
|
||||
-->
|
||||
<group name='variety'>
|
||||
<led name='none' state='off' top='89' left='106' width='90'>No Item</led>
|
||||
<led name='weap1' state='off' top='104' left='106' width='90'>1-Handed weapon</led>
|
||||
<led name='weap2' state='off' top='119' left='106' width='90'>2-Handed weapon</led>
|
||||
<led name='gold' state='off' top='134' left='106' width='90'>Gold</led>
|
||||
<led name='bow' state='off' top='149' left='106' width='90'>Bow</led>
|
||||
<led name='arrow' state='off' top='164' left='106' width='90'>Arrows</led>
|
||||
<led name='thrown' state='off' top='179' left='106' width='90'>Thrown missile</led>
|
||||
<led name='potion' state='off' top='89' left='218' width='90'>Potion/Magic Item</led>
|
||||
<led name='scroll' state='off' top='104' left='218' width='90'>Scroll/Magic Item</led>
|
||||
<led name='wand' state='off' top='119' left='218' width='90'>Wand</led>
|
||||
<led name='tool' state='off' top='134' left='218' width='90'>Tool</led>
|
||||
<led name='food' state='off' top='149' left='218' width='90'>Food</led>
|
||||
<led name='shield' state='off' top='164' left='218' width='90'>Shield</led>
|
||||
<led name='armor' state='off' top='179' left='218' width='90'>Armor</led>
|
||||
<led name='helm' state='off' top='89' left='336' width='90'>Helm</led>
|
||||
<led name='gloves' state='off' top='104' left='336' width='90'>Gloves</led>
|
||||
<!--
|
||||
TODO: Why are there two shields?
|
||||
-->
|
||||
<led name='shield2' state='off' top='119' left='336' width='90'>Shield</led>
|
||||
<led name='boots' state='off' top='134' left='336' width='90'>Boots</led>
|
||||
<led name='ring' state='off' top='149' left='336' width='90'>Ring</led>
|
||||
<led name='necklace' state='off' top='164' left='336' width='90'>Necklace</led>
|
||||
<led name='poison' state='off' top='179' left='336' width='90'>Weapon Poison</led>
|
||||
<led name='nonuse' state='off' top='89' left='448' width='90'>Non-Use Object</led>
|
||||
<led name='pants' state='off' top='104' left='448' width='90'>Pants</led>
|
||||
<led name='xbow' state='off' top='119' left='448' width='90'>Crossbow</led>
|
||||
<led name='bolt' state='off' top='134' left='448' width='90'>Bolts</led>
|
||||
<led name='missile' state='off' top='149' left='448' width='90'>Missile (no ammo)</led>
|
||||
<led name='unused1' state='off' top='164' left='448' width='90'>Unused</led>
|
||||
<led name='unused2' state='off' top='179' left='448' width='80'>Unused</led>
|
||||
</group>
|
||||
<!--
|
||||
NOTE: These LEDs have been shifted 80 pixels left to account for the labels swapping sides
|
||||
-->
|
||||
<group name='melee-type'>
|
||||
<led name='edge' state='off' top='233' left='442' width='80'>Edged</led>
|
||||
<led name='bash' state='off' top='248' left='442' width='80'>Bashing</led>
|
||||
<led name='pole' state='off' top='263' left='442' width='80'>Pole</led>
|
||||
</group>
|
||||
<pict name="pic" type='dlog' num='16' top='8' left='11'/>
|
||||
<text size='large' top='6' left='50' width='158' height='16'>Edit an Item Type</text>
|
||||
<text top='8' left='222' width='111' height='14'>Item number:</text>
|
||||
<text name='num' top='8' left='340' width='37' height='14'/>
|
||||
<text top='31' left='50' width='107' height='14'>Item Full Name:</text>
|
||||
<text top='31' left='298' width='155' height='14'>Item Unidentified Name:</text>
|
||||
<text top='63' left='8' width='120' height='14'>Item picture:</text>
|
||||
<button name="choosepic" type='large' top='58' left='201'>Select Icon</button>
|
||||
<text size='large' top='87' left='8' width='86' height='16'>Item type:</text>
|
||||
<text top='200' left='8' width='148' height='14'>Item level: (0 - 50)</text>
|
||||
<text top='224' left='8' width='148' height='14'>Awkwardness: (0-20)</text>
|
||||
<text top='248' left='8' width='148' height='14'>Bonus: (0-10)</text>
|
||||
<text top='272' left='8' width='148' height='14'>Protection: (-10 - 20)</text>
|
||||
<text top='296' left='8' width='148' height='14'>Charges: (0-100)</text>
|
||||
<text top='200' left='220' width='137' height='13'>Type flag: (0-1000)</text>
|
||||
<text top='224' left='220' width='141' height='13'>Value: (0-10000)</text>
|
||||
<text top='248' left='220' width='141' height='13'>Weight: (0-250)</text>
|
||||
<text top='272' left='220' width='141' height='13'>Special class: (0-100)</text>
|
||||
<text top='200' left='425' width='161' height='28'>Weapon type: (ignored if not a weapon)</text>
|
||||
<text top='293' left='221' width='363' height='40'>
|
||||
Enter properties for this item type.
|
||||
For a detailed description of the fields, see the documentation.
|
||||
Click Edit Abilities to edit item abilities.
|
||||
</text>
|
||||
<button name="abils" type='large' top='337' left='155'>Abilities</button>
|
||||
</dialog>
|
@@ -8,7 +8,7 @@
|
||||
<field name='loot-item' top='246' left='194' width='64' height='16'/>
|
||||
<field name='loot-chance' top='247' left='464' width='64' height='16'/>
|
||||
<button name='okay' type='regular' top='325' left='572'>OK</button>
|
||||
<button name='cancel' type='regular' top='325' left='506'>Cancel</button>
|
||||
<button name='cancel' type='regular' top='325' left='506' def-key='esc'>Cancel</button>
|
||||
<!--
|
||||
TODO: Originally these LED labels would've been bold, I think
|
||||
Note: These LEDs were shifted left 100 pixels to account for the labels swapping sides
|
||||
|
0
rsrc/strings/item-types.txt
Normal file
0
rsrc/strings/item-types.txt
Normal file
Reference in New Issue
Block a user