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:
2014-07-12 22:13:27 -04:00
parent bbc9667c88
commit 41c3396aa3
80 changed files with 7983 additions and 4005 deletions

View File

@@ -8,16 +8,17 @@
#include "scen.graphics.h"
#include <cmath>
#include "scen.btnmg.h"
#include "scrollbar.h"
//extern piles_of_stuff_dumping_type *data_store;
extern Rect right_sbar_rect;
extern RECT right_sbar_rect;
Rect left_button[NLS];
extern Rect right_buttons[NRSONPAGE];
Rect right_scrollbar_rect;
Rect right_area_rect;
RECT left_button[NLS];
extern RECT right_buttons[NRSONPAGE];
RECT right_scrollbar_rect;
RECT right_area_rect;
extern short current_rs_top;
char strings_ls[NLS][40];
char strings_rs[NRS][40];
@@ -25,7 +26,7 @@ char strings_rs[NRS][40];
bool left_buttons_active = 1,right_buttons_active = 0;
extern short left_button_status[NLS]; // 0 - clear, 1 - text, 2 - title text, 3 - tabbed text, +10 - button
extern short right_button_status[NRS];
extern ControlHandle right_sbar;
extern std::shared_ptr<cScrollbar> right_sbar;
// 0 - clear
// 1000 + x - terrain type x
// 2000 + x - monster type x
@@ -62,7 +63,7 @@ void reset_lb() {
// is slot >= 0, force that slot
// if -1, use 1st free slot
void set_lb(short slot, short mode, char *label, short do_draw) {
void set_lb(short slot, short mode, const char *label, short do_draw) {
short i;
if (slot < 0) {
@@ -88,8 +89,7 @@ void set_lb(short slot, short mode, char *label, short do_draw) {
void init_rb() {
short i;
SetControlMinimum(right_sbar,0);
SetControlValue(right_sbar,0);
right_sbar->setPosition(0);
for (i = 0; i < NRS; i++) {
right_button_status[i] = 0;
strcpy((char *) strings_rs[i], "");
@@ -103,13 +103,13 @@ void reset_rb() {
right_button_status[i] = 0;
}
draw_rb();
SetControlMaximum(right_sbar,0);
SetControlValue(right_sbar,0);
right_sbar->setMaximum(0);
right_sbar->setPosition(0);
}
// is slot >= 0, force that slot
// if -1, use 1st free slot
void set_rb(short slot, short mode, char *label, short do_draw) {
void set_rb(short slot, short mode, const char *label, short do_draw) {
short i;
if (slot < 0) {