A tool for deriving PKG packet encryption keys for ps4 written in c++
| 1 | // SPDX-FileCopyrightText: Copyright 2025 shadPKG |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include <assert.h> |
| 7 | #include "common/assert.h" |
| 8 | #ifndef IM_ASSERT |
| 9 | #define IM_ASSERT(_EXPR) ASSERT(_EXPR) |
| 10 | #endif |
| 11 | #include "GUIContext.h" |
| 12 | #include "imgui.h" |
| 13 | |
| 14 | // ╔═══════════════════════════════════════════════════════════════════════════╗ |
| 15 | // ║ NavBar: Vertical navigation sidebar (Discord/VSCode style) ║ |
| 16 | // ║ ║ |
| 17 | // ║ Layout: ║ |
| 18 | // ║ ┌────────┐ ║ |
| 19 | // ║ │ 📦 │ ← Extract (PKG extraction) ║ |
| 20 | // ║ │ │ ║ |
| 21 | // ║ │ 🔍 │ ← Inspect (PKG metadata viewer) ║ |
| 22 | // ║ │ │ ║ |
| 23 | // ║ │ 🔑 │ ← RIF (Generation & validation) ║ |
| 24 | // ║ │ │ ║ |
| 25 | // ║ │ │ ║ |
| 26 | // ║ │ ⚙️ │ ← Settings ║ |
| 27 | // ║ └────────┘ ║ |
| 28 | // ╚═══════════════════════════════════════════════════════════════════════════╝ |
| 29 | |
| 30 | namespace ShadPKG::GUI { |
| 31 | |
| 32 | class NavBar { |
| 33 | public: |
| 34 | NavBar() = default; |
| 35 | ~NavBar() = default; |
| 36 | |
| 37 | // Draw the navigation bar |
| 38 | // Returns the selected view if changed, otherwise the current view |
| 39 | void Draw(GUIContext &ctx); |
| 40 | |
| 41 | static constexpr float Width = 60.0f; |
| 42 | |
| 43 | private: |
| 44 | bool DrawNavButton(const char *icon, const char *tooltip, bool selected); |
| 45 | }; |
| 46 | |
| 47 | } // namespace ShadPKG::GUI |
| 48 |