diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..909042c --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Build Folders +build*/ +cmake-build-debug/ + +# IDE Generated Files +.idea/ +.vscode/ +.cache/ +NetrwTreeListing diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..498ceae --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.28) +project(HypixelOverlay) + +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(FETCHCONTENT_QUIET OFF) + +set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE) + +include(FetchContent) + +find_package(OpenGL REQUIRED) + +FetchContent_Declare( + libhv + GIT_REPOSITORY https://github.com/ithewei/libhv.git +) +FetchContent_MakeAvailable(libhv) + +FetchContent_Declare( + fltk + GIT_REPOSITORY https://github.com/fltk/fltk.git +) +FetchContent_MakeAvailable(fltk) + + +set(PROJECT_SOURCES + "src/main.cpp" +) +set(PROJECT_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/src/include") + +add_executable(${PROJECT_NAME}) +target_sources(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCES}) +target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_INCLUDE}) + +target_link_libraries(${PROJECT_NAME} PRIVATE hv_static fltk) +target_link_libraries(${PROJECT_NAME} PRIVATE fltk) +target_include_directories(${PROJECT_NAME} PRIVATE ${fltk_SOURCE_DIR}) \ No newline at end of file diff --git a/README.md b/README.md index 5449889..fb4a403 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ -# HypixelOverlay - -Overlay for Hypixel Games \ No newline at end of file +# Hypixel Overlay +simple overlay for hypixel games \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..dc2729f --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,65 @@ +#include "FL/Fl.H" +#include "FL/Fl_Window.H" +#include "FL/Fl_Box.H" +#include "FL/fl_draw.H" + +// Rosé Pine-inspired color scheme +Fl_Color backgroundColor = fl_rgb_color(25, 23, 36); // #191724 +Fl_Color textColor = fl_rgb_color(224, 222, 244); // #e0def4 +Fl_Color accentColor = fl_rgb_color(196, 167, 231); // #c4a7e7 +Fl_Color secondaryAccent = fl_rgb_color(235, 188, 186); // #ebbcba +Fl_Color boxColor = fl_rgb_color(48, 44, 64); // Slightly darker than the background +Fl_Color highlightColor = fl_rgb_color(143, 131, 174); // Softer purple for hover effect + +// Custom Box with Rosé Pine-inspired style +class StyledBox : public Fl_Box { +public: + Fl_Color current_color; + + StyledBox(int x, int y, int w, int h, const char *label = 0) + : Fl_Box(x, y, w, h, label), current_color(boxColor) { + box(FL_FLAT_BOX); + } + + void draw() override { + // background color + fl_color(current_color); + fl_rectf(x(), y(), w(), h(), current_color); + + // border + fl_color(accentColor); + fl_rect(x() + 5, y() + 5, w() - 10, h() - 10, accentColor); + + // label with custom font and color + fl_color(textColor); + fl_font(FL_HELVETICA_BOLD, 20); // Minimalist font size and style + fl_draw(label(), x(), y(), w(), h(), FL_ALIGN_CENTER); + } + + // Mouse hover event + int handle(int event) override { + switch (event) { + case FL_ENTER: + current_color = highlightColor; + redraw(); + return 1; + case FL_LEAVE: + current_color = boxColor; + redraw(); + return 1; + default: + return Fl_Box::handle(event); + } + } +}; + +int main(int argc, char **argv) { + Fl_Window *window = new Fl_Window(400, 300, "Rosé Pine Styled FLTK"); + window->color(backgroundColor); + StyledBox *box = new StyledBox(50, 100, 300, 80, "Hello, Rosé Pine!"); + + window->end(); + window->show(argc, argv); + + return Fl::run(); +}