mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
change text depending on if you are client or server (#92)
This commit is contained in:
parent
897f6712a3
commit
a1ac136258
1 changed files with 17 additions and 5 deletions
|
@ -14,10 +14,17 @@ static void djui_panel_pause_quit_yes(UNUSED struct DjuiBase* caller) {
|
|||
}
|
||||
|
||||
static void djui_panel_pause_quit(struct DjuiBase* caller) {
|
||||
djui_panel_confirm_create(caller,
|
||||
"\\#ff0800\\Q\\#1be700\\U\\#00b3ff\\I\\#ffef00\\T",
|
||||
"Are you sure you want to disconnect?",
|
||||
djui_panel_pause_quit_yes);
|
||||
if (gNetworkType == NT_SERVER) {
|
||||
djui_panel_confirm_create(caller,
|
||||
"\\#ff0800\\Q\\#1be700\\U\\#00b3ff\\I\\#ffef00\\T",
|
||||
"Are you sure you want to stop hosting?",
|
||||
djui_panel_pause_quit_yes);
|
||||
} else {
|
||||
djui_panel_confirm_create(caller,
|
||||
"\\#ff0800\\Q\\#1be700\\U\\#00b3ff\\I\\#ffef00\\T",
|
||||
"Are you sure you want to disconnect?",
|
||||
djui_panel_pause_quit_yes);
|
||||
}
|
||||
}
|
||||
|
||||
void djui_panel_pause_create(struct DjuiBase* caller) {
|
||||
|
@ -48,7 +55,12 @@ void djui_panel_pause_create(struct DjuiBase* caller) {
|
|||
djui_base_set_size(&button2->base, 1.0f, 64);
|
||||
djui_interactable_hook_click(&button2->base, djui_panel_pause_resume);
|
||||
|
||||
struct DjuiButton* button3 = djui_button_create(&body->base, "Disconnect");
|
||||
struct DjuiButton* button3;
|
||||
if (gNetworkType == NT_SERVER) {
|
||||
button3 = djui_button_create(&body->base, "Stop Hosting");
|
||||
} else {
|
||||
button3 = djui_button_create(&body->base, "Disconnect");
|
||||
}
|
||||
djui_base_set_size_type(&button3->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||
djui_base_set_size(&button3->base, 1.0f, 64);
|
||||
djui_interactable_hook_click(&button3->base, djui_panel_pause_quit);
|
||||
|
|
Loading…
Reference in a new issue