Shared character defaults, fixed paths and names, one global font
This commit is contained in:
1 parent
4962eac7a8
commit
7dbb4cc154
22 files changed
+434
-567
No files matched your search
+7
-9
@@ -24,6 +24,7 @@ constexpr float INDICATOR_BOB = 0.12f;
|
||||
constexpr float INDICATOR_SIZE = 0.35f;
|
||||
constexpr float INDICATOR_SPEED = 2;
|
||||
constexpr float ITEM_SIZE = 96;
|
||||
constexpr float ROUNDING = 10;
|
||||
constexpr float BAR_WIDTH_MIN = 120;
|
||||
constexpr float BUTTON_SIZE_MAX = 96;
|
||||
constexpr float BUTTON_SIZE_MIN = 56;
|
||||
@@ -108,10 +109,10 @@ static Palette palette_get(Color color)
|
||||
{ImGuiCol_ChildBg, shade(COLOR_BACKGROUND, 0)}}};
|
||||
}
|
||||
|
||||
void style_set(Color color, float rounding)
|
||||
void style_set(Color color)
|
||||
{
|
||||
ImGuiStyle& style = ImGui::GetStyle();
|
||||
style.WindowRounding = style.FrameRounding = style.GrabRounding = style.PopupRounding = rounding;
|
||||
style.WindowRounding = style.FrameRounding = style.GrabRounding = style.PopupRounding = ROUNDING;
|
||||
style.ScrollbarSize = SCROLLBAR_SIZE;
|
||||
style.FontSizeBase = FONT_NORMAL;
|
||||
for (auto [id, value] : palette_get(color))
|
||||
@@ -461,9 +462,7 @@ void Ui::taskbar_draw(Play& play, ImVec2 screen)
|
||||
Items& items = play.items;
|
||||
Dialogue& dialogue = data.dialogue;
|
||||
ImGuiStyle& style = ImGui::GetStyle();
|
||||
std::string moodPool = body.stage <= 0
|
||||
? data.dialoguePool
|
||||
: data.stages[std::min(body.stage, (int)data.stages.size()) - 1].dialoguePool;
|
||||
std::string moodPool = data.stage_name_get(body.stage);
|
||||
|
||||
const char* labels[] = {"Weight", "Capacity", "Digestion"};
|
||||
bool isMax = body.stage >= (int)data.stages.size();
|
||||
@@ -777,8 +776,7 @@ void Ui::settings_draw(Settings& settings)
|
||||
isColorChanged = true;
|
||||
}
|
||||
if (isColorChanged)
|
||||
style_set(character && settings.isCharacterColor ? character->color : settings.color,
|
||||
character ? character->menu.rounding : 0);
|
||||
style_set(character && settings.isCharacterColor ? character->color : settings.color);
|
||||
if (!character)
|
||||
return;
|
||||
ImGui::Separator();
|
||||
@@ -837,7 +835,7 @@ void Ui::cheats_draw(Play& play)
|
||||
Stats& stats = body.stats;
|
||||
Traits& traits = data.traits;
|
||||
is_fx(ImGui::SliderFloat("Calories", &stats.calories, 0, body.capacity_max_get(), "%0.0f kcal"));
|
||||
is_fx(ImGui::SliderFloat("Capacity", &stats.capacity, traits.capacityMin, traits.capacityMax, "%0.0f kcal"));
|
||||
is_fx(ImGui::SliderFloat("Capacity", &stats.capacity, traits.capacity, traits.capacityMax, "%0.0f kcal"));
|
||||
if (is_fx(ImGui::SliderFloat("Weight", &stats.weight, traits.weight, traits.weightMax, "%0.2f kg")))
|
||||
{
|
||||
body.stage_set(body.stage_get(stats.weight));
|
||||
@@ -1043,7 +1041,7 @@ void Ui::select_update(std::vector<Character>& characters, Settings& settings)
|
||||
}
|
||||
if (is_fx(ImGui::BeginTabItem("In Game")))
|
||||
{
|
||||
Anm2* anm2 = selected->anm2_get(selected->anm2Path, *renderer, *audio);
|
||||
Anm2* anm2 = selected->anm2_get(ANM2_PATH, *renderer, *audio);
|
||||
if (previewActor.anm2 != anm2 || !anm2)
|
||||
previewActor = Actor(anm2);
|
||||
previewActor.update(*audio);
|
||||
|
||||
Reference in new issue
Block a user