Drop character credits
This commit is contained in:
1 parent
ee13be56d7
commit
518e2b3cc5
10 files changed
+14
-32
No files matched your search
+10
-20
@@ -43,12 +43,12 @@ constexpr float TASKBAR_FIT = 0.8f;
|
||||
constexpr int BUTTONS_FIXED = 9;
|
||||
constexpr float INFO_GAP = 4;
|
||||
constexpr int COOLDOWN_SEGMENTS = 48;
|
||||
constexpr const char* PANEL_ICONS[] = {"", "stats", "catalog", "settings", "cheats", "credits"};
|
||||
constexpr const char* PANEL_NAMES[] = {"", "Stats", "Catalog", "Settings", "Cheats", "Credits"};
|
||||
constexpr const char* PANEL_ICONS[] = {"", "stats", "catalog", "settings", "cheats"};
|
||||
constexpr const char* PANEL_NAMES[] = {"", "Stats", "Catalog", "Settings", "Cheats"};
|
||||
constexpr float PREVIEW_FRACTION = 0.68f;
|
||||
constexpr float PREVIEW_WIDTH = 760;
|
||||
constexpr float SELECT_BUTTON_SIZE = 112;
|
||||
constexpr int SELECT_BUTTONS_FIXED = 2;
|
||||
constexpr int SELECT_BUTTONS_FIXED = 1;
|
||||
constexpr float KG_TO_G = 1000;
|
||||
constexpr float KG_TO_LB = 2.20462f;
|
||||
constexpr float LB_TO_OZ = 16;
|
||||
@@ -1049,6 +1049,8 @@ void Ui::select_update(std::vector<Character>& characters, Settings& settings)
|
||||
{
|
||||
Character& entry = characters[i];
|
||||
ImGui::PushID(i);
|
||||
if (i > 0)
|
||||
ImGui::SameLine();
|
||||
style_push(entry.color);
|
||||
bool isCurrent = i == characterIndex;
|
||||
if (isCurrent)
|
||||
@@ -1065,18 +1067,13 @@ void Ui::select_update(std::vector<Character>& characters, Settings& settings)
|
||||
ImGui::SetItemTooltip("%s", entry.name.c_str());
|
||||
style_pop();
|
||||
ImGui::PopID();
|
||||
ImGui::SameLine();
|
||||
}
|
||||
ImGui::SameLine(0, style.ItemSpacing.x * INFO_GAP / 2);
|
||||
float gap = style.ItemSpacing.x * (INFO_GAP + 1);
|
||||
ImGui::SameLine(0, gap);
|
||||
ImVec2 cursor = ImGui::GetCursorScreenPos();
|
||||
ImGui::GetWindowDrawList()->AddLine({cursor.x, cursor.y}, {cursor.x, cursor.y + buttonSize},
|
||||
cursor.x -= gap / 2;
|
||||
ImGui::GetWindowDrawList()->AddLine(cursor, {cursor.x, cursor.y + buttonSize},
|
||||
ImGui::GetColorU32(ImGuiCol_Separator));
|
||||
ImGui::SameLine(0, style.ItemSpacing.x * INFO_GAP / 2);
|
||||
ImGui::BeginDisabled(!selected);
|
||||
if (icon_button("credits", "Credits", BUTTON_NORMAL))
|
||||
panel = PANEL_CREDITS;
|
||||
ImGui::EndDisabled();
|
||||
ImGui::SameLine();
|
||||
if (icon_button("settings", "Settings", BUTTON_NORMAL))
|
||||
panel = PANEL_SETTINGS;
|
||||
}
|
||||
@@ -1181,14 +1178,7 @@ void Ui::select_update(std::vector<Character>& characters, Settings& settings)
|
||||
|
||||
if (window_begin(screen, height))
|
||||
{
|
||||
if (panel == PANEL_CREDITS && selected)
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, imvec4_get(GRAY));
|
||||
ImGui::TextWrapped("%s", selected->credits.empty() ? "No credits listed." : selected->credits.c_str());
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
else
|
||||
settings_draw(settings);
|
||||
settings_draw(settings);
|
||||
window_end();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user