Initial Commit
This commit is contained in:
parent
37700563de
commit
fe7120e9e1
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Build Folders
|
||||||
|
build*/
|
||||||
|
cmake-build-debug/
|
||||||
|
|
||||||
|
# IDE Generated Files
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
.cache/
|
||||||
|
NetrwTreeListing
|
39
CMakeLists.txt
Normal file
39
CMakeLists.txt
Normal file
@ -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})
|
@ -1,3 +1,2 @@
|
|||||||
# HypixelOverlay
|
# Hypixel Overlay
|
||||||
|
simple overlay for hypixel games
|
||||||
Overlay for Hypixel Games
|
|
65
src/main.cpp
Normal file
65
src/main.cpp
Normal file
@ -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();
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user