#pragma once
#include "../Module.h"
#include "../ModuleCategory.h"
#include "../../config/CheckboxValue.h"
#include "../../config/ColorpickerValue.h"
#include "../../config/TextboxValue.h"
#include "../../util/globals.h"

class WatermarkModule : Module
{
public:
    WatermarkModule() : Module("Watermark", Misc, "watermark_mod")
    {
    }

    CheckboxValue* enabled = conf(new CheckboxValue(true, "enabled_cb"));
    TextboxValue* text = conf(new TextboxValue(globals::get_display_title(), "text_txt"));
    ColorpickerValue* color = conf(new ColorpickerValue({0, 0.5, 1, 1}, "color_clr"));
    IntSliderValue* font_size = conf(new IntSliderValue(16, 8, 36, "font_size_itm"));

    void draw_overlay(ImDrawList* draw_list) override
    {
        if (enabled->get_value())
            draw_list->AddText(menu::get_hud_font(),
                               static_cast<float>(font_size->get_value()) * menu::get_scale_factor(), {10, 10},
                               ImGui::GetColorU32(color->get_value()), text->get().c_str());
    }

    void application_update() override
    {
    }

    void gameworld_update(const Il2CppClass* game_world_class, Il2CppObjectInstance game_world_instance,
                                  Il2CppObjectInstance main_player) override
    {
    }

    void init() override
    {
    }
};
