Skip to content

Few Minor Visual Indicator Enhancements to Loadout #6716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/missionui/missionscreencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ void common_buttons_init(UI_WINDOW *ui_window)
if ( brief_only_allow_briefing() ) {
Common_buttons[Current_screen-1][gr_screen.res][COMMON_SS_REGION].button.disable();
Common_buttons[Current_screen-1][gr_screen.res][COMMON_WEAPON_REGION].button.disable();
ui_window->add_XSTR("Ships/Weapons Locked", 749, Common_buttons[Current_screen-1][gr_screen.res][COMMON_WEAPON_BUTTON].xt, Common_buttons[Current_screen-1][gr_screen.res][COMMON_WEAPON_BUTTON].yt + 30, &Common_buttons[Current_screen-1][gr_screen.res][COMMON_WEAPON_BUTTON].button, UI_XSTR_COLOR_GREEN);
}
}

Expand Down
6 changes: 3 additions & 3 deletions code/missionui/missionshipchoice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ void ship_select_do(float frametime)

draw_ship_icons();
for ( int i = 0; i < MAX_WING_BLOCKS; i++ ) {
draw_wing_block(i, Hot_ss_slot, -1, Selected_ss_class);
draw_wing_block(i, Hot_ss_slot, -1, Selected_ss_class, true, false);
}
}

Expand Down Expand Up @@ -2142,7 +2142,7 @@ void pick_from_wing(int wb_num, int ws_num)
// hot_slot => index of slot that mouse is over
// selected_slot => index of slot that is selected
// class_select => all ships of this class are drawn selected (send -1 to not use)
void draw_wing_block(int wb_num, int hot_slot, int selected_slot, int class_select, bool ship_selection )
void draw_wing_block(int wb_num, int hot_slot, int selected_slot, int class_select, bool ship_selection, bool always_highlight_ply )
{
GR_DEBUG_SCOPE("Wing block");

Expand Down Expand Up @@ -2259,7 +2259,7 @@ void draw_wing_block(int wb_num, int hot_slot, int selected_slot, int class_sele
}
}

if ( ws->status & WING_SLOT_IS_PLAYER && (selected_slot != slot_index) )
if ( ws->status & WING_SLOT_IS_PLAYER && (always_highlight_ply || (selected_slot != slot_index)) )
{
if(icon->model_index == -1)
bitmap_to_draw = icon->icon_bmaps[ICON_FRAME_PLAYER];
Expand Down
2 changes: 1 addition & 1 deletion code/missionui/missionshipchoice.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ typedef struct ss_wing_info {
extern ss_wing_info Ss_wings_teams[MAX_TVT_TEAMS][MAX_WING_BLOCKS];
extern ss_wing_info* Ss_wings;

void draw_wing_block(int wb_num, int hot_slot, int selected_slot, int class_select, bool ship_selection = true);
void draw_wing_block(int wb_num, int hot_slot, int selected_slot, int class_select, bool ship_selection = true, bool always_highlight_ply = false);
void ship_select_init();
void ship_select_do(float frametime);
void ship_select_close();
Expand Down
2 changes: 1 addition & 1 deletion code/missionui/missionweaponchoice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2836,7 +2836,7 @@ void weapon_select_do(float frametime)
wl_render_overhead_view(frametime);
wl_draw_ship_weapons(Selected_wl_slot);
for ( int i = 0; i < MAX_WING_BLOCKS; i++ ) {
draw_wing_block(i, Hot_wl_slot, Selected_wl_slot, -1, false);
draw_wing_block(i, Hot_wl_slot, Selected_wl_slot, -1, false, true);
}
common_render_selected_screen_button();
}
Expand Down
Loading