| 3885 | } |
| 3886 | |
| 3887 | void TCSSPutButtonsOnScreen(void) { |
| 3888 | int monitor_y, monitor_x; |
| 3889 | monitor_y = Telcom_system.Monitor_coords[MONITOR_MAIN].top; |
| 3890 | monitor_x = Telcom_system.Monitor_coords[MONITOR_MAIN].left; |
| 3891 | |
| 3892 | TCBMPDESC bmpdesc; |
| 3893 | bmpdesc.type = TC_BMP_STATIC; |
| 3894 | bmpdesc.flags = 0; |
| 3895 | bmpdesc.caps = TCBD_XY; |
| 3896 | |
| 3897 | TCBUTTONDESC buttdesc; |
| 3898 | buttdesc.sibling_id = buttdesc.parent_id = -1; |
| 3899 | buttdesc.internal = TCSSButtonCallback; |
| 3900 | buttdesc.flash_time = 0; |
| 3901 | buttdesc.button_type = BUTT_INTERNAL; |
| 3902 | buttdesc.flasher = false; |
| 3903 | buttdesc.click_type = CLICKTYPE_CLICKUP; |
| 3904 | buttdesc.osflags = OBF_GLOW | OBF_CHANGEFOCUSISCLICK; |
| 3905 | buttdesc.tab_stop = true; // all main menu buttons can have focus |
| 3906 | |
| 3907 | int left_x, top_y, gap; |
| 3908 | if (TCShipSelect.ShipCount == 2) { |
| 3909 | left_x = SSA_LEFTX; |
| 3910 | top_y = SSA_TOPY; |
| 3911 | gap = SSA_GAP; |
| 3912 | |
| 3913 | bmpdesc.x = left_x - monitor_x; |
| 3914 | bmpdesc.y = top_y - monitor_y; |
| 3915 | strcpy(bmpdesc.filename, "SS 2 button group.ogf"); |
| 3916 | } else { |
| 3917 | left_x = SSB_LEFTX; |
| 3918 | top_y = SSB_TOPY; |
| 3919 | gap = SSB_GAP; |
| 3920 | |
| 3921 | bmpdesc.x = left_x - monitor_x; |
| 3922 | bmpdesc.y = top_y - monitor_y; |
| 3923 | strcpy(bmpdesc.filename, "SS 3 button group.ogf"); |
| 3924 | } |
| 3925 | /* |
| 3926 | $$TABLE_GAMEFILE "SS 3 button group.ogf" |
| 3927 | $$TABLE_GAMEFILE "SS 2 button group.ogf" |
| 3928 | */ |
| 3929 | CreateBitmapEffect(&bmpdesc, MONITOR_MAIN, 0); |
| 3930 | |
| 3931 | int i; |
| 3932 | int width; |
| 3933 | int curr_x, curr_y; |
| 3934 | curr_x = left_x + 3; |
| 3935 | curr_y = top_y + 2; |
| 3936 | const char *lit_name, *name; |
| 3937 | |
| 3938 | for (i = 0; i < MAX_NUM_SHIPS; i++) { |
| 3939 | if (SSShips[i].found) { |
| 3940 | buttdesc.x = curr_x; |
| 3941 | buttdesc.y = curr_y; |
| 3942 | |
| 3943 | switch (i) { |
| 3944 | case SHIP_PYRO_ID: |
no test coverage detected