Skip to content
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
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ add_executable(Harbour
Harbour/src/main.cpp
Harbour/src/App.cpp
Harbour/src/GameCard.cpp
Harbour/src/utils/FileManager.cpp
Harbour/include/MenuScreen.h
Harbour/src/utils/FileManager.cpp
Harbour/src/MenuScreen.cpp
Harbour/include/utils/LoadImage.h
Harbour/src/utils/LoadImage.cpp
Harbour/src/utils/ColorManager.cpp
)

target_include_directories(Harbour PRIVATE
Expand Down
4 changes: 4 additions & 0 deletions Harbour/include/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "GameCard.h"
#include "utils/FileManager.h"
#include "utils/ColorManager.h"
#include "MenuScreen.h"

namespace Harbour {
Expand Down Expand Up @@ -38,7 +39,10 @@ namespace Harbour {

private:
HarbourUtils::FileManager m_fileManager = {};
HarbourUtils::ColorManager m_colorManager = {};

void constructLibraryFromJSON(std::vector<GameCard>& output, std::string lib);


};
}
3 changes: 1 addition & 2 deletions Harbour/include/GameCard.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include "utils/LoadImage.h"
#include <string>

namespace Harbour {
Expand All @@ -26,7 +25,7 @@ namespace Harbour {
std::string m_version;
const char* m_thumbnailFilePath = nullptr;

GLuint m_texture = 0;
unsigned int m_texture = 0; //GLuint equivalent
};

}
68 changes: 63 additions & 5 deletions Harbour/include/MenuScreen.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#pragma once

#include "imgui.h"
#include <vector>
#include "GameCard.h"

#include "utils/ColorManager.h"

namespace HarbourGUI {
enum screenID {
const enum screenID {
MyLibrary,
AllGames,
Settings,
Expand All @@ -15,6 +14,65 @@ namespace HarbourGUI {

void MyLibraryScreen(std::vector<Harbour::GameCard>& myLibrary);
void downloadsScreen(std::vector<Harbour::GameCard>& downloads);
void settingsScreen();
void settingsScreen(HarbourUtils::ColorManager& colorManager);
void helpScreen();
}
}

/*
Nice, you found it! `0.1, 0.1, 0.15, 1.0` is a nice dark bluish-gray � easy on the eyes and doesn�t clash with ImGui�s default colors.

Here are some suggestions for alternative color schemes and the general �feel� they give:

---

### **1. Green-themed**

* `0.05, 0.1, 0.05, 1.0` ? very dark forest green, calm and natural
* Works well with beige/tan or light green accent buttons
* Gives a �terminal + nature� vibe

---

### **2. Red-themed**

* `0.15, 0.05, 0.05, 1.0` ? dark maroon / burgundy
* Good for alert-heavy UI or if you want a warm, energetic feel
* Red can be tiring if the UI is used a lot, so best for accents

---

### **3. Gray-themed / Neutral**

* `0.1, 0.1, 0.1, 1.0` ? almost black, very neutral
* `0.15, 0.15, 0.15, 1.0` ? slightly lighter, good for soft contrast
* Easy on eyes, very professional, works well with any highlight color (green/red/blue/yellow)

---

### **4. Blue / Nautical**

* `0.05, 0.05, 0.2, 1.0` ? navy, classic dark blue
* Fits your �nautical� theme perfectly
* Works with white, teal, or gold highlights

---

### **5. Teal / Sci-Fi**

* `0.05, 0.15, 0.15, 1.0` ? dark teal
* Gives a techy, slightly futuristic look
* Accent with cyan or orange

---

**Tips for choosing a scheme:**

* Keep background darker than your text for readability.
* Use 1�2 accent colors for highlights/buttons to avoid visual clutter.
* If you plan to make this customizable, consider saving the RGBA in a JSON settings file so users can pick a color in the UI.

---

If you want, I can mock up a **few ready-to-use RGBA palettes** for Harbour/SoH that would look good with ImGui�s default widgets � could save you time experimenting. Do you want me to do that?

*/
42 changes: 42 additions & 0 deletions Harbour/include/utils/ColorManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#pragma once

struct ImVec4;

namespace HarbourUtils {
const enum Colors {
BlueGray, //Default
DarkBlue, //0.0, 0.0, 0.25, 1.0
LightBlue, //0.43 0.52 0.89
Green, //0.05, 0.2, 0.05
Teal, //0.05, 0.25, 0.25
DarkRed, //0.2, 0.05, 0.05
LightRed, //0.85, 0.25, 0.25
DarkGray, //0.15, 0.15, 0.15
};

class ColorManager {
public:
ColorManager();

public:
//Getters/setters
ImVec4 getBackground() const;
int getThemeColor() const;
void drawBackground() const;
void setThemeColor(int colorTheme);

private:
void setBackgroundColor();
void setAccentColor();
void setHoverColor();
void setMenuBarColor();

Colors m_currentColorTheme = {}; //Doesn't do much yet, add load by file

ImVec4 m_backgroundColor = {}; //Set by setBackgroundColor() and m_currentColorTheme
ImVec4 m_menuBarColor = {}; //The menu bar background, only changes on certain themes
ImVec4 m_accentColor = {}; //Dropdowns, other UI
ImVec4 m_hoverColor = {}; //Buttons when hovered

};
}
4 changes: 1 addition & 3 deletions Harbour/include/utils/FileManager.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#pragma once
#include <filesystem>
#include <fstream>

#include <string>
#include <nlohmann/json.hpp>
#include <curl/curl.h>

namespace HarbourUtils {
class FileManager {
Expand Down
1 change: 0 additions & 1 deletion Harbour/include/utils/LoadImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#pragma once
#include <glad/glad.h>
#include "imgui.h"

#define _CRT_SECURE_NO_WARNINGS
#include "stb/stb_image.h"
Expand Down
Loading