Skip to content
Merged
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
15 changes: 15 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Code of Conduct

```
░░░░░░░░▄▄▄▀▀▀▄▄███▄░░░░░░░░░░░░░░
░░░░░▄▀▀░░░░░░░▐░▀██▌░░░░░░░░░░░░░
░░░▄▀░░░░▄▄███░▌▀▀░▀█░░░░░░░░░░░░░
░░▄█░░▄▀▀▒▒▒▒▒▄▐░░░░█▌░░░░░░░░░░░░
░▐█▀▄▀▄▄▄▄▀▀▀▀▌░░░░░▐█▄░░░░░░░░░░░
░▌▄▄▀▀░░░░░░░░▌░░░░▄███████▄░░░░░░
░░░░░░░░░░░░░▐░░░░▐███████████▄░░░
░░░░░le░░░░░░░▐░░░░▐█████████████▄
░░░░toucan░░░░░░▀▄░░░▐█████████████▄
░░░░░░says░░░░░░░▀▄▄███████████████
░░CoC is stupid░░░░░░░░░█▀██████░░
```
10 changes: 6 additions & 4 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,12 @@ while a click on our own card would; and `place_overlay` logs the geometry it ch
thing to read when the panel lands somewhere unexpected.

The **idle status marker** replaces the old "● PPC" spike: two lines — `PoPC v<version>` and the data
bundle's version — in outlined yellow at half opacity over the middle of the mana globe, which is
where the game itself has nothing to say. `Config::status_right`/`status_bottom` place it, as offsets
from the game window's bottom-right corner ÷ its height (the same reasoning as the frame edges), and
they are config-file-only. `place_overlay` sizes the window to the text for that screen, so the idle
bundle's version — in outlined yellow at half opacity over the mana globe, which is where the game
itself has nothing to say. `Config::status_right`/`status_bottom` place its centre, as offsets from
the game window's bottom-right corner ÷ its height (the same reasoning as the frame edges), and they
are config-file-only. Horizontally that centre is the globe's; vertically it sits below it, in the
globe's lower half, so that the third line — the one an available update adds — still lands on the
glass instead of on the frame. `place_overlay` sizes the window to the text for that screen, so the idle
overlay is a 200×48 rectangle rather than a dialog-sized one nothing is drawn into.

**Settings is three tabs** — General, Price check, Application — between a fixed header (the title
Expand Down
19 changes: 10 additions & 9 deletions src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void SDLCALL tray_exit_cb(void* userdata, SDL_TrayEntry*) {
// game's own height, which is the one thing that can force that scrollbar.
constexpr int kSettingsW = 640, kSettingsH = 720;

// The idle status: two short lines over the middle of the mana globe. Wide enough for a long
// The idle status: two short lines over the lower half of the mana globe. Wide enough for a long
// data version at the size below, and no wider — the window is what swallows mouse input, and
// while idle it is only click-through because nothing else is open.
constexpr int kStatusW = 200, kStatusH = 48;
Expand Down Expand Up @@ -158,10 +158,10 @@ void draw_outlined_line(const char* text, float centre_x, float y, float alpha)
dl->AddText(font, size, at, IM_COL32(255, 215, 0, static_cast<int>(alpha * 255)), text);
}

/// The idle marker: the application's version and the data bundle's, over the middle of the mana
/// globe (see `Config::status_right`). It says the overlay is alive and which data it is pricing
/// against — the two things there is no other way to see without opening Settings. Only drawn
/// while the game is the window in front; `update_overlay_placement` unmaps it otherwise.
/// The idle marker: the application's version and the data bundle's, over the lower half of the
/// mana globe (see `Config::status_right`). It says the overlay is alive and which data it is
/// pricing against — the two things there is no other way to see without opening Settings. Only
/// drawn while the game is the window in front; `update_overlay_placement` unmaps it otherwise.
void draw_status_marker(App& app) {
ImGuiIO& io = ImGui::GetIO();
ImGui::SetNextWindowPos(ImVec2(0, 0));
Expand Down Expand Up @@ -994,10 +994,11 @@ void App::place_overlay() {
}

if (screen_ == Screen::Hidden) {
// Over the middle of the mana globe, which hangs off the bottom-right corner and scales
// with the game's height — so both offsets are fractions of that height, exactly like the
// two frame edges. The window is no bigger than the text: it is click-through while idle,
// but it is also what the compositor has to composite every time the game redraws.
// Over the lower half of the mana globe, which hangs off the bottom-right corner and
// scales with the game's height — so both offsets are fractions of that height, exactly
// like the two frame edges. The window is no bigger than the text: it is click-through
// while idle, but it is also what the compositor has to composite every time the game
// redraws.
const int cx = gx + gw - static_cast<int>(gh * config_.status_right);
const int cy = gy + gh - static_cast<int>(gh * config_.status_bottom);
// Room for the update line when there is one, and not a pixel of it otherwise: this
Expand Down
15 changes: 9 additions & 6 deletions src/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ struct Config {
float stash_edge = 0.615f; ///< stash frame's right edge, ÷ game height
float inventory_edge = 0.615f; ///< inventory frame's left edge from the right, ÷ game height

// Where the idle status sits: the middle of the mana globe, which is anchored to the
// bottom-right corner of the game window and scales with its height — so both offsets are
// measured from that corner and divided by the height, like the two edges above. Defaults
// are off tests/data/full_screen_1440p.jpeg. Config-file only, like poe_window_title: the
// Where the idle status sits: over the mana globe, which is anchored to the bottom-right
// corner of the game window and scales with its height — so both offsets are measured from
// that corner and divided by the height, like the two edges above. Horizontally that is the
// globe's centre; vertically it is deliberately below it, in the globe's lower half, where
// the art is flattest and where the third line has somewhere to go when an update is
// waiting. Both are measured off tests/data/full_screen_1440p.jpeg, whose globe fits a
// circle at (2401, 1282) with a radius of 105. Config-file only, like poe_window_title: the
// globe moves when GGG moves the HUD, which is not often enough to be a knob in the UI.
float status_right = 0.098f; ///< globe centre's distance from the right edge, ÷ game height
float status_bottom = 0.080f; ///< globe centre's distance from the bottom edge, ÷ game height
float status_right = 0.110f; ///< marker centre's distance from the right edge, ÷ game height
float status_bottom = 0.070f; ///< marker centre's distance from the bottom edge, ÷ game height

/// Draw every panel's background solid instead of letting the game through it. An
/// accessibility setting: text over a moving background is the hard case this answers.
Expand Down