Added logic to cheat search window to make all sorting buttons insentive until the search reset button is hit once.
This commit is contained in:
parent
a58f5dc5e0
commit
f929a7cc23
|
@ -68,6 +68,11 @@ class cheat_win_t
|
||||||
GtkWidget *cheat_cmp_entry;
|
GtkWidget *cheat_cmp_entry;
|
||||||
GtkWidget *cheat_del_button;
|
GtkWidget *cheat_del_button;
|
||||||
GtkWidget *cheat_edit_button;
|
GtkWidget *cheat_edit_button;
|
||||||
|
GtkWidget *cheat_search_known_btn;
|
||||||
|
GtkWidget *cheat_search_eq_btn;
|
||||||
|
GtkWidget *cheat_search_neq_btn;
|
||||||
|
GtkWidget *cheat_search_gr_btn;
|
||||||
|
GtkWidget *cheat_search_lt_btn;
|
||||||
|
|
||||||
cheat_win_t (void)
|
cheat_win_t (void)
|
||||||
{
|
{
|
||||||
|
@ -95,6 +100,11 @@ class cheat_win_t
|
||||||
cheat_cmp_entry = NULL;
|
cheat_cmp_entry = NULL;
|
||||||
cheat_del_button = NULL;
|
cheat_del_button = NULL;
|
||||||
cheat_edit_button = NULL;
|
cheat_edit_button = NULL;
|
||||||
|
cheat_search_known_btn = NULL;
|
||||||
|
cheat_search_eq_btn = NULL;
|
||||||
|
cheat_search_neq_btn = NULL;
|
||||||
|
cheat_search_gr_btn = NULL;
|
||||||
|
cheat_search_lt_btn = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void showActiveCheatList (bool reset);
|
void showActiveCheatList (bool reset);
|
||||||
|
@ -150,6 +160,12 @@ static void cheatSearchReset (GtkButton * button, cheat_win_t * cw)
|
||||||
//cheat_search_gt_value = 0;
|
//cheat_search_gt_value = 0;
|
||||||
//cheat_search_lt_value = 0;
|
//cheat_search_lt_value = 0;
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_known_btn , TRUE );
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_eq_btn , TRUE );
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_neq_btn , TRUE );
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_gr_btn , TRUE );
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_lt_btn , TRUE );
|
||||||
|
|
||||||
FCEUI_CheatSearchBegin ();
|
FCEUI_CheatSearchBegin ();
|
||||||
cw->showCheatSearchResults ();
|
cw->showCheatSearchResults ();
|
||||||
// Enable Cheat Search Buttons - Change Sensitivity
|
// Enable Cheat Search Buttons - Change Sensitivity
|
||||||
|
@ -1125,6 +1141,7 @@ void openCheatsWindow (void)
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
|
||||||
button = gtk_button_new_with_label ("Known Value:");
|
button = gtk_button_new_with_label ("Known Value:");
|
||||||
|
cw->cheat_search_known_btn = button;
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (cheatSearchKnown), (gpointer) cw);
|
G_CALLBACK (cheatSearchKnown), (gpointer) cw);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 5);
|
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 5);
|
||||||
|
@ -1156,6 +1173,7 @@ void openCheatsWindow (void)
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 1);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 1);
|
||||||
button = gtk_button_new_with_label ("Equal");
|
button = gtk_button_new_with_label ("Equal");
|
||||||
|
cw->cheat_search_eq_btn = button;
|
||||||
//gtk_widget_set_halign( button, GTK_ALIGN_BASELINE);
|
//gtk_widget_set_halign( button, GTK_ALIGN_BASELINE);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
|
||||||
|
@ -1165,6 +1183,7 @@ void openCheatsWindow (void)
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
button = gtk_button_new_with_label ("Not Equal");
|
button = gtk_button_new_with_label ("Not Equal");
|
||||||
|
cw->cheat_search_neq_btn = button;
|
||||||
//gtk_widget_set_halign( button, GTK_ALIGN_BASELINE);
|
//gtk_widget_set_halign( button, GTK_ALIGN_BASELINE);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
|
||||||
cw->neq_chkbox = gtk_check_button_new ();
|
cw->neq_chkbox = gtk_check_button_new ();
|
||||||
|
@ -1186,6 +1205,7 @@ void openCheatsWindow (void)
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
button = gtk_button_new_with_label ("Greater Than");
|
button = gtk_button_new_with_label ("Greater Than");
|
||||||
|
cw->cheat_search_gr_btn = button;
|
||||||
//gtk_widget_set_halign( button, GTK_ALIGN_BASELINE);
|
//gtk_widget_set_halign( button, GTK_ALIGN_BASELINE);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
|
||||||
cw->gt_chkbox = gtk_check_button_new ();
|
cw->gt_chkbox = gtk_check_button_new ();
|
||||||
|
@ -1207,6 +1227,7 @@ void openCheatsWindow (void)
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
button = gtk_button_new_with_label ("Less Than");
|
button = gtk_button_new_with_label ("Less Than");
|
||||||
|
cw->cheat_search_lt_btn = button;
|
||||||
//gtk_widget_set_halign( button, GTK_ALIGN_BASELINE);
|
//gtk_widget_set_halign( button, GTK_ALIGN_BASELINE);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
|
||||||
cw->lt_chkbox = gtk_check_button_new ();
|
cw->lt_chkbox = gtk_check_button_new ();
|
||||||
|
@ -1229,6 +1250,12 @@ void openCheatsWindow (void)
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 1);
|
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 1);
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_known_btn , FALSE );
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_eq_btn , FALSE );
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_neq_btn , FALSE );
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_gr_btn , FALSE );
|
||||||
|
gtk_widget_set_sensitive( cw->cheat_search_lt_btn , FALSE );
|
||||||
|
|
||||||
frame = gtk_frame_new ("Cheat Search");
|
frame = gtk_frame_new ("Cheat Search");
|
||||||
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
||||||
gtk_box_pack_start (GTK_BOX (main_hbox), frame, TRUE, TRUE, 5);
|
gtk_box_pack_start (GTK_BOX (main_hbox), frame, TRUE, TRUE, 5);
|
||||||
|
|
Loading…
Reference in New Issue