Tear out most of the legacy code in the scenario editor - see below for details
- All Carbon code is gone - Many dialogs converted; some are still left unimplemented since they still need to be converted - Menus converted to a xib file - The giant arrays specifying the configuration of the special node dialog for each special node type have been replaced with maps and sets. Changes to dialogs: - pict choice dialog can now show picts of differing types; this was required for picking a monster graphic, as monsters of all sizes need to be shown in the same dialog - string choice dialog can set the title, and properly shows the currently selected string - LEDs now accept font format - Fixed LED group's calculation of its rect - Fixed LED group crashing if it has no selection - Tabbing between text fields now works - Fix display of larger monster graphics in dialogs - Fix the script element content showing in the browser preview
This commit is contained in:
@@ -1325,34 +1325,6 @@ bool save_party(fs::path dest_file)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<std::string> load_strings(std::string which){
|
||||
// TODO: Fix the bundle-ness
|
||||
// TODO: Is this even used anywhere?
|
||||
#if 0
|
||||
UniChar* strListName = new UniChar[which.length()];
|
||||
for(int i = 0; i < which.length(); i++) strListName[i] = which[i];
|
||||
char stringsPath[512];
|
||||
std::string path;
|
||||
CFBundleRef mainBundle=CFBundleGetMainBundle();
|
||||
CFURLRef stringsURL = CFBundleCopyResourceURL(
|
||||
mainBundle,
|
||||
CFStringCreateWithCharacters(NULL, strListName, which.length()),
|
||||
CFSTR(""), CFSTR("strings")
|
||||
);
|
||||
delete strListName;
|
||||
if(stringsURL == NULL) return std::vector<std::string>(); // if not found, return an empty list
|
||||
CFStringGetCString(CFURLCopyFileSystemPath(stringsURL, kCFURLPOSIXPathStyle), stringsPath, 512, kCFStringEncodingUTF8);
|
||||
#endif
|
||||
fs::path path = progDir/which;
|
||||
printf("Loading strings from: %s\n",path.c_str());
|
||||
std::ifstream fin(path.c_str());
|
||||
std::string s;
|
||||
std::vector<std::string> v;
|
||||
while(getline(fin,s))
|
||||
v.push_back(s);
|
||||
return v;
|
||||
}
|
||||
|
||||
std::string read_maybe_quoted_string(std::istream& from) {
|
||||
std::string result;
|
||||
if(from.peek() == '"' || from.peek() == '\'') {
|
||||
|
Reference in New Issue
Block a user