Merge branch 'button_pointers' into master
This commit is contained in:
commit
6efd304118
|
@ -149,6 +149,21 @@ static std::unique_ptr<UI_GADGET_ICON>
|
||||||
|
|
||||||
int Found_seg_index=0; // Index in Found_segs corresponding to Cursegp
|
int Found_seg_index=0; // Index in Found_segs corresponding to Cursegp
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
class editor_dialog
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
array<std::unique_ptr<UI_GADGET_BUTTON>, 9> pad_goto;
|
||||||
|
std::unique_ptr<UI_GADGET_BUTTON>
|
||||||
|
pad_prev,
|
||||||
|
pad_next;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static editor_dialog editor_window;
|
||||||
|
|
||||||
|
|
||||||
static void print_status_bar( char message[DIAGNOSTIC_MESSAGE_MAX] ) {
|
static void print_status_bar( char message[DIAGNOSTIC_MESSAGE_MAX] ) {
|
||||||
|
|
||||||
|
@ -730,21 +745,23 @@ void init_editor_screen()
|
||||||
//ui_add_gadget_button( EditorWindow, 520, 540, 50, 25, "About", ShowAbout );
|
//ui_add_gadget_button( EditorWindow, 520, 540, 50, 25, "About", ShowAbout );
|
||||||
//ui_add_gadget_button( EditorWindow, 640, 540, 50, 25, "Shell", DosShell );
|
//ui_add_gadget_button( EditorWindow, 640, 540, 50, 25, "Shell", DosShell );
|
||||||
|
|
||||||
|
auto &e = editor_window;
|
||||||
|
|
||||||
ui_pad_activate(*EditorWindow, PAD_X, PAD_Y);
|
ui_pad_activate(*EditorWindow, PAD_X, PAD_Y);
|
||||||
Pad_info = info_window_create();
|
Pad_info = info_window_create();
|
||||||
ui_add_gadget_button( EditorWindow, PAD_X+6, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "<<", med_keypad_goto_prev );
|
e.pad_prev = ui_add_gadget_button( EditorWindow, PAD_X+6, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "<<", med_keypad_goto_prev );
|
||||||
ui_add_gadget_button( EditorWindow, PAD_X+PAD_WIDTH1+6, PAD_Y+(30*5)+22, PAD_WIDTH, 20, ">>", med_keypad_goto_next );
|
e.pad_next = ui_add_gadget_button( EditorWindow, PAD_X+PAD_WIDTH1+6, PAD_Y+(30*5)+22, PAD_WIDTH, 20, ">>", med_keypad_goto_next );
|
||||||
|
|
||||||
{ int i;
|
{ int i;
|
||||||
i = 0; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "SR", med_keypad_goto_0 );
|
i = 0; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "SR", med_keypad_goto_0 );
|
||||||
i++; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "SS", med_keypad_goto_1 );
|
i++; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "SS", med_keypad_goto_1 );
|
||||||
i++; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "CF", med_keypad_goto_2 );
|
i++; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "CF", med_keypad_goto_2 );
|
||||||
i++; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "TM", med_keypad_goto_3 );
|
i++; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "TM", med_keypad_goto_3 );
|
||||||
i++; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "OP", med_keypad_goto_4 );
|
i++; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "OP", med_keypad_goto_4 );
|
||||||
i++; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "OR", med_keypad_goto_5 );
|
i++; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "OR", med_keypad_goto_5 );
|
||||||
i++; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "GE", med_keypad_goto_6 );
|
i++; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "GE", med_keypad_goto_6 );
|
||||||
i++; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "LI", med_keypad_goto_7 );
|
i++; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "LI", med_keypad_goto_7 );
|
||||||
i++; ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "TT", med_keypad_goto_8 );
|
i++; e.pad_goto[i] = ui_add_gadget_button( EditorWindow, PAD_X+16+(i+2)*PAD_WIDTH1, PAD_Y+(30*5)+22, PAD_WIDTH, 20, "TT", med_keypad_goto_8 );
|
||||||
}
|
}
|
||||||
|
|
||||||
gr_set_curfont(editor_font);
|
gr_set_curfont(editor_font);
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace {
|
||||||
struct wall_dialog
|
struct wall_dialog
|
||||||
{
|
{
|
||||||
std::unique_ptr<UI_GADGET_USERBOX> wallViewBox;
|
std::unique_ptr<UI_GADGET_USERBOX> wallViewBox;
|
||||||
std::unique_ptr<UI_GADGET_BUTTON> quitButton;
|
std::unique_ptr<UI_GADGET_BUTTON> quitButton, prev_wall, next_wall, blastable, door, illusory, closed_wall, goto_prev_wall, goto_next_wall, remove, bind_trigger, bind_control;
|
||||||
array<std::unique_ptr<UI_GADGET_CHECKBOX>, 3> doorFlag;
|
array<std::unique_ptr<UI_GADGET_CHECKBOX>, 3> doorFlag;
|
||||||
array<std::unique_ptr<UI_GADGET_RADIO>, 4> keyFlag;
|
array<std::unique_ptr<UI_GADGET_RADIO>, 4> keyFlag;
|
||||||
int old_wall_num;
|
int old_wall_num;
|
||||||
|
@ -360,17 +360,17 @@ static int wall_dialog_created(UI_DIALOG *const w, wall_dialog *const wd)
|
||||||
wd->wallViewBox = ui_add_gadget_userbox(w, 155, 5, 64, 64);
|
wd->wallViewBox = ui_add_gadget_userbox(w, 155, 5, 64, 64);
|
||||||
// A bunch of buttons...
|
// A bunch of buttons...
|
||||||
i = 80;
|
i = 80;
|
||||||
ui_add_gadget_button(w, 155, i, 70, 22, "<< Clip", PrevWall);
|
wd->prev_wall = ui_add_gadget_button(w, 155, i, 70, 22, "<< Clip", PrevWall);
|
||||||
ui_add_gadget_button(w, 155+70, i, 70, 22, "Clip >>", NextWall);i += 25;
|
wd->next_wall = ui_add_gadget_button(w, 155+70, i, 70, 22, "Clip >>", NextWall);i += 25;
|
||||||
ui_add_gadget_button(w, 155, i, 140, 22, "Add Blastable", wall_add_blastable); i += 25;
|
wd->blastable = ui_add_gadget_button(w, 155, i, 140, 22, "Add Blastable", wall_add_blastable); i += 25;
|
||||||
ui_add_gadget_button(w, 155, i, 140, 22, "Add Door", wall_add_door ); i += 25;
|
wd->door = ui_add_gadget_button(w, 155, i, 140, 22, "Add Door", wall_add_door ); i += 25;
|
||||||
ui_add_gadget_button(w, 155, i, 140, 22, "Add Illusory", wall_add_illusion); i += 25;
|
wd->illusory = ui_add_gadget_button(w, 155, i, 140, 22, "Add Illusory", wall_add_illusion); i += 25;
|
||||||
ui_add_gadget_button(w, 155, i, 140, 22, "Add Closed Wall", wall_add_closed_wall); i+=25;
|
wd->closed_wall = ui_add_gadget_button(w, 155, i, 140, 22, "Add Closed Wall", wall_add_closed_wall); i+=25;
|
||||||
ui_add_gadget_button(w, 155, i, 70, 22, "<< Prev", GotoPrevWall);
|
wd->goto_prev_wall = ui_add_gadget_button(w, 155, i, 70, 22, "<< Prev", GotoPrevWall);
|
||||||
ui_add_gadget_button(w, 155+70, i, 70, 22, "Next >>", GotoNextWall);i += 25;
|
wd->goto_next_wall = ui_add_gadget_button(w, 155+70, i, 70, 22, "Next >>", GotoNextWall);i += 25;
|
||||||
ui_add_gadget_button(w, 155, i, 140, 22, "Remove Wall", wall_remove); i += 25;
|
wd->remove = ui_add_gadget_button(w, 155, i, 140, 22, "Remove Wall", wall_remove); i += 25;
|
||||||
ui_add_gadget_button(w, 155, i, 140, 22, "Bind to Trigger", bind_wall_to_trigger); i += 25;
|
wd->bind_trigger = ui_add_gadget_button(w, 155, i, 140, 22, "Bind to Trigger", bind_wall_to_trigger); i += 25;
|
||||||
ui_add_gadget_button(w, 155, i, 140, 22, "Bind to Control", bind_wall_to_control_center); i+=25;
|
wd->bind_control = ui_add_gadget_button(w, 155, i, 140, 22, "Bind to Control", bind_wall_to_control_center); i+=25;
|
||||||
wd->old_wall_num = -2; // Set to some dummy value so everything works ok on the first frame.
|
wd->old_wall_num = -2; // Set to some dummy value so everything works ok on the first frame.
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue