| 1016 | shared.stream_locked[1] = 0; |
| 1017 | } |
| 1018 | static void refresh_prompts() |
| 1019 | { |
| 1020 | ztalkbox& active = *shared.active; |
| 1021 | |
| 1022 | if (active.prompt_box) |
| 1023 | { |
| 1024 | char* message; |
| 1025 | |
| 1026 | if (shared.wait.type.prompt && shared.prompt_ready) |
| 1027 | { |
| 1028 | char* queries[2] = { (char*)active.prompt.skip, (char*)active.prompt.yesno }; |
| 1029 | message = queries[shared.wait.query]; |
| 1030 | } |
| 1031 | else |
| 1032 | { |
| 1033 | message = (char*)active.prompt.noskip; |
| 1034 | } |
| 1035 | |
| 1036 | if (message) |
| 1037 | { |
| 1038 | active.prompt_box->set_text(message); |
| 1039 | if (active.flag.visible) |
| 1040 | { |
| 1041 | active.prompt_box->activate(); |
| 1042 | } |
| 1043 | } |
| 1044 | else |
| 1045 | { |
| 1046 | active.prompt_box->deactivate(); |
| 1047 | } |
| 1048 | } |
| 1049 | |
| 1050 | if (active.quit_box) |
| 1051 | { |
| 1052 | if (shared.allow_quit && active.prompt.quit && shared.quit_ready) |
| 1053 | { |
| 1054 | active.quit_box->set_text(active.prompt.quit); |
| 1055 | if (active.flag.visible) |
| 1056 | { |
| 1057 | active.quit_box->activate(); |
| 1058 | } |
| 1059 | } |
| 1060 | else if (shared.allow_quit && shared.quit_delay <= 0.0f) |
| 1061 | { |
| 1062 | active.quit_box->deactivate(); |
| 1063 | } |
| 1064 | else if (active.prompt.noquit) |
| 1065 | { |
| 1066 | active.quit_box->set_text(active.prompt.noquit); |
| 1067 | if (active.flag.visible) |
| 1068 | { |
| 1069 | active.quit_box->activate(); |
| 1070 | } |
| 1071 | } |
| 1072 | else |
| 1073 | { |
| 1074 | active.quit_box->deactivate(); |
| 1075 | } |
no test coverage detected