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:
@@ -588,6 +588,21 @@ graf_pos cCustomGraphics::find_graphic(pic_num_t which_rect, bool party) {
|
||||
return std::make_pair(party ? this->party : &sheets[sheet],store_rect);
|
||||
}
|
||||
|
||||
size_t cCustomGraphics::count() {
|
||||
if(sheets == NULL) return 0;
|
||||
else if(is_old) {
|
||||
RECT bounds(sheets[0]);
|
||||
if(bounds.width() < 280) return bounds.width() / 28;
|
||||
return bounds.height() / 36;
|
||||
} else {
|
||||
size_t count = 100 * (numSheets - 1);
|
||||
RECT bounds(sheets[numSheets - 1]);
|
||||
if(bounds.width() < 280) count += bounds.width() / 28;
|
||||
else count += bounds.height() / 36;
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: This doesn't belong in this file
|
||||
std::string get_str(std::string list, short j){
|
||||
if(j == 0) return list;
|
||||
|
Reference in New Issue
Block a user