[
  {
    "path": "README.md",
    "content": "# ue4-canvas-gui\n\n## It's a simple Canvas GUI for Unreal Engine 4 with mouse operation.\n\nIncluded elements:<br>\nRendering Text (left/center);<br>\nRendering Rects;<br>\nRendering Circles (filled and not);<br>\nButton, Slider, Checkbox, Combobox, Hotkeys and ColorPicker.<br>\n<br>\nImplemented a simple post-render system to draw on top of menu and all.<br>\n<br>\n## Screenshots with default style:<br>\n![EU4 GUI](screenshots/canvas1.jpg \"\")\n \n![EU4 GUI](screenshots/canvas2.jpg \"\")\n \n![EU4 GUI](screenshots/canvas3.jpg \"\")\n \nIngame render\n![EU4 GUI](screenshots/canvas4.jpg \"\")\n\n## Small \"How to use\" guide:<br>\nFirst you need get **UCanvas** from game.<br>\nAfter it you can draw like this:<br>\n\n```cpp\n//I'll show you with an example Post Render Hook\nvoid PostRenderHook(UGameViewportClient* viewport, UCanvas* canvas)\n{\n\tZeroGUI::SetupCanvas(canvas);\n\tMenu::Tick();\n}\n\n//Menu.h\nvoid Tick()\n{\n\tZeroGUI::Input::Handle();\n\t\n\tstatic bool menu_opened = false;\n\tif (GetAsyncKeyState(VK_F2) & 1) menu_opened = !menu_opened; //Our menu key\n\n\tif (ZeroGUI::Window(\"Superior UE4 GUI\", &pos, FVector2D{ 500.0f, 400.0f }, menu_opened))\n\t{\n\t\t//Simple Tabs\n\t\tstatic int tab = 0;\n\t\tif (ZeroGUI::ButtonTab(\"Tab 1\", FVector2D{ 110, 25 }, tab == 0)) tab = 0;\n\t\tif (ZeroGUI::ButtonTab(\"Tab 2\", FVector2D{ 110, 25 }, tab == 1)) tab = 1;\n\t\tif (ZeroGUI::ButtonTab(\"Tab 3\", FVector2D{ 110, 25 }, tab == 2)) tab = 2;\n\t\tif (ZeroGUI::ButtonTab(\"Tab 4\", FVector2D{ 110, 25 }, tab == 3)) tab = 3;\n\t\tZeroGUI::NextColumn(130.0f);\n\t\t//\n\t\t\n\t\t//Some Elements\n\t\tstatic bool text_check = false;\n\t\tstatic float text_slider = 15.0f;\n\t\tstatic int test_hotkey = 0x2;\n\t\tstatic FLinearColor test_color{ 0.0f, 0.0f, 1.0f, 1.0f };\n\n\t\tZeroGUI::Checkbox(\"Test Checkbox\", &text_check);\n\t\tZeroGUI::SliderFloat(\"Test Slider\", &text_slider, 0.0f, 180.0f);\n\t\tZeroGUI::Hotkey(\"Test Hotkey\", FVector2D{ 80, 25 }, &test_hotkey);\n\n\t\tZeroGUI::Text(\"Left aligned text!\");\n\t\tZeroGUI::Text(\"Outline and Center aligned text!\", true, true);\n\n\t\t//Element with padding\n\t\tZeroGUI::PushNextElementY(50.0f);\n\t\tZeroGUI::Combobox(\"Combobox\", FVector2D{ 100, 25 }, &test_number, \"None\", \"First\", \"Second\", \"Third\", NULL); //NULL at end is required!\n\t\tZeroGUI::SameLine();//inline items\n\t\tif (ZeroGUI::Button(\"It's a Button!\", FVector2D{ 100, 25 })) { /*clicked!*/ }\n\n\t\t//Color Picker\n\t\tZeroGUI::ColorPicker(\"Color Picker\", &test_color);\n\t}\n\tZeroGUI::Render();//Custom Render. I use it for drawing Combobox and ColorPicker over the menu\n\tZeroGUI::Draw_Cursor(menu_opened);\n}\n```\n"
  },
  {
    "path": "screenshots/.gitkeep",
    "content": "\n"
  },
  {
    "path": "source/ZeroGUI.h",
    "content": "\nwchar_t* s2wc(const char* c)\n{\n\tconst size_t cSize = strlen(c) + 1;\n\twchar_t* wc = new wchar_t[cSize];\n\tmbstowcs(wc, c, cSize);\n\n\treturn wc;\n}\n\nfloat GetScreenScale()\n{\n\tHDC hdc = GetDC(NULL);\n\tint dpi = GetDeviceCaps(hdc, LOGPIXELSX);\n\tfloat scale = (float)dpi / 96.0f;\n\tReleaseDC(NULL, hdc);\n\treturn scale;\n}\n\nnamespace ZeroGUI\n{\n\tnamespace Colors\n\t{\n\t\tFLinearColor Text{ 1.0f, 1.0f, 1.0f, 1.0f };\n\t\tFLinearColor Text_Shadow{ 0.0f, 0.0f, 0.0f, 0.0f };\n\t\tFLinearColor Text_Outline{ 0.0f, 0.0f, 0.0f, 0.30f };\n\n\t\tFLinearColor Window_Background{ 0.009f, 0.009f, 0.009f, 1.0f };\n\t\tFLinearColor Window_Header{ 0.10f, 0.15f, 0.84f, 1.0f };\n\n\t\tFLinearColor Button_Idle{ 0.10f, 0.15f, 0.84f, 1.0f };\n\t\tFLinearColor Button_Hovered{ 0.15f, 0.20f, 0.89f, 1.0f };\n\t\tFLinearColor Button_Active{ 0.20f, 0.25f, 0.94f, 1.0f };\n\n\t\tFLinearColor Checkbox_Idle{ 0.17f, 0.16f, 0.23f, 1.0f };\n\t\tFLinearColor Checkbox_Hovered{ 0.22f, 0.30f, 0.72f, 1.0f };\n\t\tFLinearColor Checkbox_Enabled{ 0.20f, 0.25f, 0.94f, 1.0f };\n\n\t\tFLinearColor Combobox_Idle{ 0.17f, 0.16f, 0.23f, 1.0f };\n\t\tFLinearColor Combobox_Hovered{ 0.17f, 0.16f, 0.23f, 1.0f };\n\t\tFLinearColor Combobox_Elements{ 0.239f, 0.42f, 0.82f, 1.0f };\n\n\t\tFLinearColor Slider_Idle{ 0.17f, 0.16f, 0.23f, 1.0f };\n\t\tFLinearColor Slider_Hovered{ 0.17f, 0.16f, 0.23f, 1.0f };\n\t\tFLinearColor Slider_Progress{ 0.22f, 0.30f, 0.72f, 1.0f };\n\t\tFLinearColor Slider_Button{ 0.10f, 0.15f, 0.84f, 1.0f };\n\n\t\tFLinearColor ColorPicker_Background{ 0.006f, 0.006f, 0.006f, 1.0f };\n\t}\n\n\tnamespace PostRenderer\n\t{\n\t\tstruct DrawList\n\t\t{\n\t\t\tint type = -1; //1 = FilledRect, 2 = TextLeft, 3 = TextCenter, 4 = Draw_Line\n\t\t\tFVector2D pos;\n\t\t\tFVector2D size;\n\t\t\tFLinearColor color;\n\t\t\tchar* name;\n\t\t\tbool outline;\n\n\t\t\tFVector2D from;\n\t\t\tFVector2D to;\n\t\t\tint thickness;\n\t\t};\n\t\tDrawList drawlist[128];\n\n\t\tvoid drawFilledRect(FVector2D pos, float w, float h, FLinearColor color)\n\t\t{\n\t\t\tfor (int i = 0; i < 128; i++)\n\t\t\t{\n\t\t\t\tif (drawlist[i].type == -1)\n\t\t\t\t{\n\t\t\t\t\tdrawlist[i].type = 1;\n\t\t\t\t\tdrawlist[i].pos = pos;\n\t\t\t\t\tdrawlist[i].size = FVector2D{ w, h };\n\t\t\t\t\tdrawlist[i].color = color;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvoid TextLeft(char* name, FVector2D pos, FLinearColor color, bool outline)\n\t\t{\n\t\t\tfor (int i = 0; i < 128; i++)\n\t\t\t{\n\t\t\t\tif (drawlist[i].type == -1)\n\t\t\t\t{\n\t\t\t\t\tdrawlist[i].type = 2;\n\t\t\t\t\tdrawlist[i].name = name;\n\t\t\t\t\tdrawlist[i].pos = pos;\n\t\t\t\t\tdrawlist[i].outline = outline;\n\t\t\t\t\tdrawlist[i].color = color;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvoid TextCenter(char* name, FVector2D pos, FLinearColor color, bool outline)\n\t\t{\n\t\t\tfor (int i = 0; i < 128; i++)\n\t\t\t{\n\t\t\t\tif (drawlist[i].type == -1)\n\t\t\t\t{\n\t\t\t\t\tdrawlist[i].type = 3;\n\t\t\t\t\tdrawlist[i].name = name;\n\t\t\t\t\tdrawlist[i].pos = pos;\n\t\t\t\t\tdrawlist[i].outline = outline;\n\t\t\t\t\tdrawlist[i].color = color;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvoid Draw_Line(FVector2D from, FVector2D to, int thickness, FLinearColor color)\n\t\t{\n\t\t\tfor (int i = 0; i < 128; i++)\n\t\t\t{\n\t\t\t\tif (drawlist[i].type == -1)\n\t\t\t\t{\n\t\t\t\t\tdrawlist[i].type = 4;\n\t\t\t\t\tdrawlist[i].from = from;\n\t\t\t\t\tdrawlist[i].to = to;\n\t\t\t\t\tdrawlist[i].thickness = thickness;\n\t\t\t\t\tdrawlist[i].color = color;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tUCanvas* canvas;\n\n\n\tbool hover_element = false;\n\tFVector2D menu_pos = FVector2D{ 0, 0 };\n\tfloat offset_x = 0.0f;\n\tfloat offset_y = 0.0f;\n\n\tFVector2D first_element_pos = FVector2D{ 0, 0 };\n\n\tFVector2D last_element_pos = FVector2D{ 0, 0 };\n\tFVector2D last_element_size = FVector2D{ 0, 0 };\n\n\tint current_element = -1;\n\tFVector2D current_element_pos = FVector2D{ 0, 0 };\n\tFVector2D current_element_size = FVector2D{ 0, 0 };\n\tint elements_count = 0;\n\n\tbool sameLine = false;\n\n\tbool pushY = false;\n\tfloat pushYvalue = 0.0f;\n\n\tvoid SetupCanvas(UCanvas* _canvas)\n\t{\n\t\tcanvas = _canvas;\n\t}\n\n\tFVector2D CursorPos()\n\t{\n\t\tPOINT cursorPos;\n\t\tGetCursorPos(&cursorPos);\n\t\tauto DPI = draw->GetScreenScale();\n\t\treturn FVector2D{ (float)cursorPos.x / DPI, (float)cursorPos.y / DPI };\n\t}\n\tbool MouseInZone(FVector2D pos, FVector2D size)\n\t{\n\t\tFVector2D cursor_pos = CursorPos();\n\n\t\tif (cursor_pos.X > pos.X && cursor_pos.Y > pos.Y)\n\t\t\tif (cursor_pos.X < pos.X + size.X && cursor_pos.Y < pos.Y + size.Y)\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}\n\n\tvoid Draw_Cursor(bool toogle)\n\t{\n\t\tif (toogle)\n\t\t{\n\t\t\tFVector2D cursorPos = CursorPos();\n\t\t\tcanvas->K2_DrawLine(FVector2D{ cursorPos.X, cursorPos.Y }, FVector2D{ cursorPos.X + 35, cursorPos.Y + 10 }, 1, FLinearColor{ 0.30f, 0.30f, 0.80f, 1.0f });\n\n\n\t\t\tint x = 35;\n\t\t\tint y = 10;\n\t\t\twhile (y != 30) //20 steps\n\t\t\t{\n\t\t\t\tx -= 1; if (x < 15) x = 15;\n\t\t\t\ty += 1; if (y > 30) y = 30;\n\n\t\t\t\tcanvas->K2_DrawLine(FVector2D{ cursorPos.X, cursorPos.Y }, FVector2D{ cursorPos.X + x, cursorPos.Y + y }, 1, FLinearColor{ 0.30f, 0.30f, 0.80f, 1.0f });\n\t\t\t}\n\n\t\t\tcanvas->K2_DrawLine(FVector2D{ cursorPos.X, cursorPos.Y }, FVector2D{ cursorPos.X + 15, cursorPos.Y + 30 }, 1, FLinearColor{ 0.30f, 0.30f, 0.80f, 1.0f });\n\t\t\tcanvas->K2_DrawLine(FVector2D{ cursorPos.X + 35, cursorPos.Y + 10 }, FVector2D{ cursorPos.X + 15, cursorPos.Y + 30 }, 1, FLinearColor{ 0.30f, 0.30f, 0.80f, 1.0f });\n\t\t}\n\t}\n\n\tvoid SameLine()\n\t{\n\t\tsameLine = true;\n\t}\n\tvoid PushNextElementY(float y, bool from_last_element = true)\n\t{\n\t\tpushY = true;\n\t\tif (from_last_element)\n\t\t\tpushYvalue = last_element_pos.Y + last_element_size.Y + y;\n\t\telse\n\t\t\tpushYvalue = y;\n\t}\n\tvoid NextColumn(float x)\n\t{\n\t\toffset_x = x;\n\t\tPushNextElementY(first_element_pos.Y, false);\n\t}\n\tvoid ClearFirstPos()\n\t{\n\t\tfirst_element_pos = FVector2D{ 0, 0 };\n\t}\n\n\tvoid TextLeft(char* name, FVector2D pos, FLinearColor color, bool outline)\n\t{\n\t\tint length = strlen(name) + 1;\n\t\tcanvas->K2_DrawText(Functions::NamesFont, FString{ s2wc(name), length, length }, pos, FVector2D{ 0.97f, 0.97f }, color, false, Colors::Text_Shadow, FVector2D{ pos.X + 1, pos.Y + 1 }, false, true, true, Colors::Text_Outline);\n\t}\n\tvoid TextCenter(char* name, FVector2D pos, FLinearColor color, bool outline)\n\t{\n\t\tint length = strlen(name) + 1;\n\t\tcanvas->K2_DrawText(Functions::NamesFont, FString{ s2wc(name), length, length }, pos, FVector2D{ 0.97f, 0.97f }, color, false, Colors::Text_Shadow, FVector2D{ pos.X + 1, pos.Y + 1 }, true, true, true, Colors::Text_Outline);\n\t}\n\n\tvoid GetColor(FLinearColor* color, float* r, float* g, float* b, float* a)\n\t{\n\t\t*r = color->R;\n\t\t*g = color->G;\n\t\t*b = color->B;\n\t\t*a = color->A;\n\t}\n\tUINT32 GetColorUINT(int r, int g, int b, int a)\n\t{\n\t\tUINT32 result = (BYTE(a) << 24) + (BYTE(r) << 16) + (BYTE(g) << 8) + BYTE(b);\n\t\treturn result;\n\t}\n\n\tvoid Draw_Line(FVector2D from, FVector2D to, int thickness, FLinearColor color)\n\t{\n\t\tcanvas->K2_DrawLine(FVector2D{ from.X, from.Y }, FVector2D{ to.X, to.Y }, thickness, color);\n\t}\n\tvoid drawFilledRect(FVector2D initial_pos, float w, float h, FLinearColor color)\n\t{\n\t\tfor (float i = 0.0f; i < h; i += 1.0f)\n\t\t\tcanvas->K2_DrawLine(FVector2D{ initial_pos.X, initial_pos.Y + i }, FVector2D{ initial_pos.X + w, initial_pos.Y + i }, 1.0f, color);\n\t}\n\tvoid DrawFilledCircle(FVector2D pos, float r, FLinearColor color)\n\t{\n\t\tfloat smooth = 0.07f;\n\n\t\tdouble PI = 3.14159265359;\n\t\tint size = (int)(2.0f * PI / smooth) + 1;\n\n\t\tfloat angle = 0.0f;\n\t\tint i = 0;\n\n\t\tfor (; angle < 2 * PI; angle += smooth, i++)\n\t\t{\n\t\t\tDraw_Line(FVector2D{ pos.X, pos.Y }, FVector2D{ pos.X + cosf(angle) * r, pos.Y + sinf(angle) * r }, 1.0f, color);\n\t\t}\n\t}\n\tvoid DrawCircle(FVector2D pos, int radius, int numSides, FLinearColor Color)\n\t{\n\t\tfloat PI = 3.1415927f;\n\n\t\tfloat Step = PI * 2.0 / numSides;\n\t\tint Count = 0;\n\t\tFVector2D V[128];\n\t\tfor (float a = 0; a < PI * 2.0; a += Step) {\n\t\t\tfloat X1 = radius * cos(a) + pos.X;\n\t\t\tfloat Y1 = radius * sin(a) + pos.Y;\n\t\t\tfloat X2 = radius * cos(a + Step) + pos.X;\n\t\t\tfloat Y2 = radius * sin(a + Step) + pos.Y;\n\t\t\tV[Count].X = X1;\n\t\t\tV[Count].Y = Y1;\n\t\t\tV[Count + 1].X = X2;\n\t\t\tV[Count + 1].Y = Y2;\n\t\t\t//Draw_Line(FVector2D{ pos.X, pos.Y }, FVector2D{ X2, Y2 }, 1.0f, Color); // Points from Centre to ends of circle\n\t\t\tDraw_Line(FVector2D{ V[Count].X, V[Count].Y }, FVector2D{ X2, Y2 }, 1.0f, Color);// Circle Around\n\t\t}\n\t}\n\n\tFVector2D dragPos;\n\tbool Window(char* name, FVector2D* pos, FVector2D size, bool isOpen)\n\t{\n\t\telements_count = 0;\n\n\t\tif (!isOpen)\n\t\t\treturn false;\n\n\t\tbool isHovered = MouseInZone(FVector2D{ pos->X, pos->Y }, size);\n\n\t\t//Drop last element\n\t\tif (current_element != -1 && !GetAsyncKeyState(0x1))\n\t\t{\n\t\t\tcurrent_element = -1;\n\t\t}\n\n\t\t//Drag\n\t\tif (hover_element && GetAsyncKeyState(0x1))\n\t\t{\n\n\t\t}\n\t\telse if ((isHovered || dragPos.X != 0) && !hover_element)\n\t\t{\n\t\t\tif (Input::IsMouseClicked(0, elements_count, true))\n\t\t\t{\n\t\t\t\tFVector2D cursorPos = CursorPos();\n\n\t\t\t\tcursorPos.X -= size.X;\n\t\t\t\tcursorPos.Y -= size.Y;\n\n\t\t\t\tif (dragPos.X == 0)\n\t\t\t\t{\n\t\t\t\t\tdragPos.X = (cursorPos.X - pos->X);\n\t\t\t\t\tdragPos.Y = (cursorPos.Y - pos->Y);\n\t\t\t\t}\n\t\t\t\tpos->X = cursorPos.X - dragPos.X;\n\t\t\t\tpos->Y = cursorPos.Y - dragPos.Y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdragPos = FVector2D{ 0, 0 };\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\thover_element = false;\n\t\t}\n\n\n\t\toffset_x = 0.0f; offset_y = 0.0f;\n\t\tmenu_pos = FVector2D{ pos->X, pos->Y };\n\t\tfirst_element_pos = FVector2D{ 0, 0 };\n\t\tcurrent_element_pos = FVector2D{ 0, 0 };\n\t\tcurrent_element_size = FVector2D{ 0, 0 };\n\n\t\t//Bg\n\t\tdrawFilledRect(FVector2D{ pos->X, pos->Y }, size.X, size.Y, Colors::Window_Background);\n\t\t//drawFilledRect(FVector2D{ pos->X, pos->Y }, 122, size.Y, FLinearColor{ 0.006f, 0.006f, 0.006f, 1.0f });//My tabs bg\n\n\t\t//Header\n\t\tdrawFilledRect(FVector2D{ pos->X, pos->Y }, size.X, 25.0f, Colors::Window_Header);\n\n\t\toffset_y += 25.0f;\n\n\t\t//Title\n\t\tFVector2D titlePos = FVector2D{ pos->X + size.X / 2, pos->Y + 25 / 2 };\n\t\tTextCenter(name, titlePos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\t\treturn true;\n\t}\n\n\tvoid Text(char* text, bool center = false, bool outline = false)\n\t{\n\t\telements_count++;\n\n\t\tfloat size = 25;\n\t\tFVector2D padding = FVector2D{ 10, 10 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size + padding.Y;\n\n\t\t//Text\n\t\tFVector2D textPos = FVector2D{ pos.X + 5.0f, pos.Y + size / 2 };\n\t\tif (center)\n\t\t\tTextCenter(text, textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, outline);\n\t\telse\n\t\t\tTextLeft(text, textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, outline);\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\t//last_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\t}\n\tbool ButtonTab(char* name, FVector2D size, bool active)\n\t{\n\t\telements_count++;\n\n\t\tFVector2D padding = FVector2D{ 5, 10 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y }, size);\n\n\t\t//Bg\n\t\tif (active)\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Button_Active);\n\t\t}\n\t\telse if (isHovered)\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Button_Hovered);\n\t\t\thover_element = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Button_Idle);\n\t\t}\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size.Y + padding.Y;\n\n\t\t//Text\n\t\tFVector2D textPos = FVector2D{ pos.X + size.X / 2, pos.Y + size.Y / 2 };\n\t\tTextCenter(name, textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\tlast_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\n\t\tif (isHovered && Input::IsMouseClicked(0, elements_count, false))\n\t\t\treturn true;\n\n\t\treturn false;\n\t}\n\tbool Button(char* name, FVector2D size)\n\t{\n\t\telements_count++;\n\n\t\tFVector2D padding = FVector2D{ 5, 10 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y }, size);\n\n\t\t//Bg\n\t\tif (isHovered)\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Button_Hovered);\n\t\t\thover_element = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Button_Idle);\n\t\t}\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size.Y + padding.Y;\n\n\t\t//Text\n\t\tFVector2D textPos = FVector2D{ pos.X + size.X / 2, pos.Y + size.Y / 2 };\n\t\t//if (!TextOverlapedFromActiveElement(textPos))\n\t\tTextCenter(name, textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\tlast_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\n\t\tif (isHovered && Input::IsMouseClicked(0, elements_count, false))\n\t\t\treturn true;\n\n\t\treturn false;\n\t}\n\tvoid Checkbox(char* name, bool* value)\n\t{\n\t\telements_count++;\n\n\t\tfloat size = 18;\n\t\tFVector2D padding = FVector2D{ 10, 10 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y }, FVector2D{ size, size });\n\n\t\t//Bg\n\t\tif (isHovered)\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size, size, Colors::Checkbox_Hovered);\n\t\t\thover_element = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size, size, Colors::Checkbox_Idle);\n\t\t}\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size + padding.Y;\n\n\t\tif (*value)\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X + 3, pos.Y + 3 }, size - 6, size - 6, Colors::Checkbox_Enabled);\n\t\t\t//drawFilledRect(FVector2D{ pos.X + 9, pos.Y + 9 }, size - 18, size - 18, Colors::Checkbox_Hovered);\n\t\t}\n\n\n\n\t\t//Text\n\t\tFVector2D textPos = FVector2D{ pos.X + size + 5.0f, pos.Y + size / 2 };\n\t\t//if (!TextOverlapedFromActiveElement(textPos))\n\t\tTextLeft(name, textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\t//last_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\n\t\tif (isHovered && Input::IsMouseClicked(0, elements_count, false))\n\t\t\t*value = !*value;\n\t}\n\tvoid SliderInt(char* name, int* value, int min, int max)\n\t{\n\t\telements_count++;\n\n\t\tFVector2D size = FVector2D{ 240, 50 };\n\t\tFVector2D slider_size = FVector2D{ 200, 10 };\n\t\tFVector2D padding = FVector2D{ 10, 15 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y }, slider_size);\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size.Y + padding.Y;\n\n\t\t//Bg\n\t\tif (isHovered || current_element == elements_count)\n\t\t{\n\t\t\t//Drag\n\t\t\tif (Input::IsMouseClicked(0, elements_count, true))\n\t\t\t{\n\t\t\t\tcurrent_element = elements_count;\n\n\t\t\t\tFVector2D cursorPos = CursorPos();\n\t\t\t\t*value = ((cursorPos.X - pos.X) * ((max - min) / slider_size.X)) + min;\n\t\t\t\tif (*value < min) *value = min;\n\t\t\t\tif (*value > max) *value = max;\n\t\t\t}\n\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y }, slider_size.X, slider_size.Y, Colors::Slider_Hovered);\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y + 5.0f }, 5.0f, 5.0f, Colors::Slider_Progress);\n\n\t\t\thover_element = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y }, slider_size.X, slider_size.Y, Colors::Slider_Idle);\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y + 5.0f }, 5.0f, 5.0f, Colors::Slider_Progress);\n\t\t}\n\n\n\t\t//Value\n\t\tfloat oneP = slider_size.X / (max - min);\n\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y }, oneP * (*value - min), slider_size.Y, Colors::Slider_Progress);\n\t\t//drawFilledRect(FVector2D{ pos.X + oneP * (*value - min) - 10.0f, pos.Y + slider_size.Y - 5.0f + padding.Y }, 20.0f, 20.0f, Colors::Slider_Button);\n\t\tDrawFilledCircle(FVector2D{ pos.X + oneP * (*value - min), pos.Y + slider_size.Y + 3.3f + padding.Y }, 10.0f, Colors::Slider_Button);\n\t\tDrawFilledCircle(FVector2D{ pos.X + oneP * (*value - min), pos.Y + slider_size.Y + 3.3f + padding.Y }, 5.0f, Colors::Slider_Progress);\n\n\t\tchar buffer[32];\n\t\tsprintf_s(buffer, \"%i\", *value);\n\t\tFVector2D valuePos = FVector2D{ pos.X + oneP * (*value - min), pos.Y + slider_size.Y + 25 + padding.Y };\n\t\tTextCenter(buffer, valuePos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\t\t//Text\n\t\tFVector2D textPos = FVector2D{ pos.X + 5, pos.Y + 10 };\n\t\tTextLeft(name, textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\tlast_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\t}\n\tvoid SliderFloat(char* name, float* value, float min, float max, char* format = \"%.0f\")\n\t{\n\t\telements_count++;\n\n\t\tFVector2D size = FVector2D{ 210, 40 };\n\t\tFVector2D slider_size = FVector2D{ 170, 7 };\n\t\tFVector2D adjust_zone = FVector2D{ 0, 20 };\n\t\tFVector2D padding = FVector2D{ 10, 15 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y - adjust_zone.Y }, FVector2D{ slider_size.X, slider_size.Y + adjust_zone.Y * 1.5f });\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size.Y + padding.Y;\n\n\t\t//Bg\n\t\tif (isHovered || current_element == elements_count)\n\t\t{\n\t\t\t//Drag\n\t\t\tif (Input::IsMouseClicked(0, elements_count, true))\n\t\t\t{\n\t\t\t\tcurrent_element = elements_count;\n\n\t\t\t\tFVector2D cursorPos = CursorPos();\n\t\t\t\t*value = ((cursorPos.X - pos.X) * ((max - min) / slider_size.X)) + min;\n\t\t\t\tif (*value < min) *value = min;\n\t\t\t\tif (*value > max) *value = max;\n\t\t\t}\n\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y }, slider_size.X, slider_size.Y, Colors::Slider_Hovered);\n\t\t\tDrawFilledCircle(FVector2D{ pos.X, pos.Y + padding.Y + 9.3f }, 3.1f, Colors::Slider_Progress);\n\t\t\tDrawFilledCircle(FVector2D{ pos.X + slider_size.X, pos.Y + padding.Y + 9.3f }, 3.1f, Colors::Slider_Hovered);\n\n\t\t\thover_element = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y }, slider_size.X, slider_size.Y, Colors::Slider_Idle);\n\t\t\tDrawFilledCircle(FVector2D{ pos.X, pos.Y + padding.Y + 9.3f }, 3.1f, Colors::Slider_Progress);\n\t\t\tDrawFilledCircle(FVector2D{ pos.X + slider_size.X, pos.Y + padding.Y + 9.3f }, 3.1f, Colors::Slider_Idle);\n\t\t}\n\n\n\t\t//Text\n\t\tFVector2D textPos = FVector2D{ pos.X, pos.Y + 5 };\n\t\tTextLeft(name, textPos, Colors::Text, false);\n\n\t\t//Value\n\t\tfloat oneP = slider_size.X / (max - min);\n\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y + slider_size.Y + padding.Y }, oneP * (*value - min), slider_size.Y, Colors::Slider_Progress);\n\t\tDrawFilledCircle(FVector2D{ pos.X + oneP * (*value - min), pos.Y + slider_size.Y + 2.66f + padding.Y }, 8.0f, Colors::Slider_Button);\n\t\tDrawFilledCircle(FVector2D{ pos.X + oneP * (*value - min), pos.Y + slider_size.Y + 2.66f + padding.Y }, 4.0f, Colors::Slider_Progress);\n\n\t\tchar buffer[32];\n\t\tsprintf_s(buffer, format, *value);\n\t\tFVector2D valuePos = FVector2D{ pos.X + oneP * (*value - min), pos.Y + slider_size.Y + 20 + padding.Y };\n\t\tTextCenter(buffer, valuePos, Colors::Text, false);\n\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\tlast_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\t}\n\n\n\n\tbool checkbox_enabled[256];\n\tvoid Combobox(char* name, FVector2D size, int* value, const char* arg, ...)\n\t{\n\t\telements_count++;\n\n\t\tFVector2D padding = FVector2D{ 5, 10 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y }, size);\n\n\t\t//Bg\n\t\tif (isHovered || checkbox_enabled[elements_count])\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Combobox_Hovered);\n\n\t\t\thover_element = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Combobox_Idle);\n\t\t}\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size.Y + padding.Y;\n\n\t\t//Text\n\t\tFVector2D textPos = FVector2D{ pos.X + size.X + 5.0f, pos.Y + size.Y / 2 };\n\t\tTextLeft(name, textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\t\t//Elements\n\t\tbool isHovered2 = false;\n\t\tFVector2D element_pos = pos;\n\t\tint num = 0;\n\n\t\tif (checkbox_enabled[elements_count])\n\t\t{\n\t\t\tcurrent_element_size.X = element_pos.X - 5.0f;\n\t\t\tcurrent_element_size.Y = element_pos.Y - 5.0f;\n\t\t}\n\t\tva_list arguments;\n\t\tfor (va_start(arguments, arg); arg != NULL; arg = va_arg(arguments, const char*))\n\t\t{\n\t\t\t//Selected Element\n\t\t\tif (num == *value)\n\t\t\t{\n\t\t\t\tFVector2D _textPos = FVector2D{ pos.X + size.X / 2, pos.Y + size.Y / 2 };\n\t\t\t\tTextCenter((char*)arg, _textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\t\t\t}\n\n\t\t\tif (checkbox_enabled[elements_count])\n\t\t\t{\n\t\t\t\telement_pos.Y += 25.0f;\n\n\t\t\t\tisHovered2 = MouseInZone(FVector2D{ element_pos.X, element_pos.Y }, FVector2D{ size.X, 25.0f });\n\t\t\t\tif (isHovered2)\n\t\t\t\t{\n\t\t\t\t\thover_element = true;\n\t\t\t\t\tPostRenderer::drawFilledRect(FVector2D{ element_pos.X, element_pos.Y }, size.X, 25.0f, Colors::Combobox_Hovered);\n\n\t\t\t\t\t//Click\n\t\t\t\t\tif (Input::IsMouseClicked(0, elements_count, false))\n\t\t\t\t\t{\n\t\t\t\t\t\t*value = num;\n\t\t\t\t\t\tcheckbox_enabled[elements_count] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tPostRenderer::drawFilledRect(FVector2D{ element_pos.X, element_pos.Y }, size.X, 25.0f, Colors::Combobox_Idle);\n\t\t\t\t}\n\n\t\t\t\tPostRenderer::TextLeft((char*)arg, FVector2D{ element_pos.X + 5.0f, element_pos.Y + 15.0f }, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\t\t\t}\n\t\t\tnum++;\n\t\t}\n\t\tva_end(arguments);\n\t\tif (checkbox_enabled[elements_count])\n\t\t{\n\t\t\tcurrent_element_size.X = element_pos.X + 5.0f;\n\t\t\tcurrent_element_size.Y = element_pos.Y + 5.0f;\n\t\t}\n\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\tlast_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\n\t\tif (isHovered && Input::IsMouseClicked(0, elements_count, false))\n\t\t{\n\t\t\tcheckbox_enabled[elements_count] = !checkbox_enabled[elements_count];\n\t\t}\n\t\tif (!isHovered && !isHovered2 && Input::IsMouseClicked(0, elements_count, false))\n\t\t{\n\t\t\tcheckbox_enabled[elements_count] = false;\n\t\t}\n\t}\n\n\tint active_hotkey = -1;\n\tbool already_pressed = false;\n\tstd::string VirtualKeyCodeToString(UCHAR virtualKey)\n\t{\n\t\tUINT scanCode = MapVirtualKey(virtualKey, MAPVK_VK_TO_VSC);\n\n\t\tif (virtualKey == VK_LBUTTON)\n\t\t{\n\t\t\treturn crypt(\"MOUSE0\");\n\t\t}\n\t\tif (virtualKey == VK_RBUTTON)\n\t\t{\n\t\t\treturn crypt(\"MOUSE1\");\n\t\t}\n\t\tif (virtualKey == VK_MBUTTON)\n\t\t{\n\t\t\treturn crypt(\"MBUTTON\");\n\t\t}\n\t\tif (virtualKey == VK_XBUTTON1)\n\t\t{\n\t\t\treturn crypt(\"XBUTTON1\");\n\t\t}\n\t\tif (virtualKey == VK_XBUTTON2)\n\t\t{\n\t\t\treturn crypt(\"XBUTTON2\");\n\t\t}\n\n\t\tCHAR szName[128];\n\t\tint result = 0;\n\t\tswitch (virtualKey)\n\t\t{\n\t\tcase VK_LEFT: case VK_UP: case VK_RIGHT: case VK_DOWN:\n\t\tcase VK_RCONTROL: case VK_RMENU:\n\t\tcase VK_LWIN: case VK_RWIN: case VK_APPS:\n\t\tcase VK_PRIOR: case VK_NEXT:\n\t\tcase VK_END: case VK_HOME:\n\t\tcase VK_INSERT: case VK_DELETE:\n\t\tcase VK_DIVIDE:\n\t\tcase VK_NUMLOCK:\n\t\t\tscanCode |= KF_EXTENDED;\n\t\tdefault:\n\t\t\tresult = GetKeyNameTextA(scanCode << 16, szName, 128);\n\t\t}\n\n\t\treturn szName;\n\t}\n\tvoid Hotkey(char* name, FVector2D size, int* key)\n\t{\n\t\telements_count++;\n\n\t\tFVector2D padding = FVector2D{ 5, 10 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y + (last_element_size.Y / 2) - size.Y / 2;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y }, size);\n\n\t\t//Bg\n\t\tif (isHovered)\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Button_Hovered);\n\t\t\thover_element = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, Colors::Button_Idle);\n\t\t}\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size.Y + padding.Y;\n\n\t\tif (active_hotkey == elements_count)\n\t\t{\n\t\t\t//Text\n\t\t\tFVector2D textPos = FVector2D{ pos.X + size.X / 2, pos.Y + size.Y / 2 };\n\t\t\tTextCenter(crypt(\"[Press Key]\"), textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\t\t\tif (!ZeroGUI::Input::IsAnyMouseDown())\n\t\t\t{\n\t\t\t\talready_pressed = false;\n\t\t\t}\n\n\t\t\tif (!already_pressed)\n\t\t\t{\n\t\t\t\tfor (int code = 0; code < 255; code++)\n\t\t\t\t{\n\t\t\t\t\tif (GetAsyncKeyState(code))\n\t\t\t\t\t{\n\t\t\t\t\t\t*key = code;\n\t\t\t\t\t\tactive_hotkey = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Text\n\t\t\tFVector2D textPos = FVector2D{ pos.X + size.X / 2, pos.Y + size.Y / 2 };\n\t\t\tTextCenter((char*)VirtualKeyCodeToString(*key).c_str(), textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\t\t\tif (isHovered)\n\t\t\t{\n\t\t\t\tif (Input::IsMouseClicked(0, elements_count, false))\n\t\t\t\t{\n\t\t\t\t\talready_pressed = true;\n\t\t\t\t\tactive_hotkey = elements_count;\n\n\t\t\t\t\t//Queue Fix\n\t\t\t\t\tfor (int code = 0; code < 255; code++)\n\t\t\t\t\t\tif (GetAsyncKeyState(code)) {}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (Input::IsMouseClicked(0, elements_count, false))\n\t\t\t\t{\n\t\t\t\t\tactive_hotkey = -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\tlast_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\t}\n\n\tint active_picker = -1;\n\tFLinearColor saved_color;\n\tbool ColorPixel(FVector2D pos, FVector2D size, FLinearColor* original, FLinearColor color)\n\t{\n\t\tPostRenderer::drawFilledRect(FVector2D{ pos.X, pos.Y }, size.X, size.Y, color);\n\n\t\t//Выбранный цвет\n\t\tif (original->R == color.R && original->G == color.G && original->B == color.B)\n\t\t{\n\t\t\tPostRenderer::Draw_Line(FVector2D{ pos.X, pos.Y }, FVector2D{ pos.X + size.X - 1, pos.Y }, 1.0f, FLinearColor{ 0.0f, 0.0f, 0.0f, 1.0f });\n\t\t\tPostRenderer::Draw_Line(FVector2D{ pos.X, pos.Y + size.Y - 1 }, FVector2D{ pos.X + size.X - 1, pos.Y + size.Y - 1 }, 1.0f, FLinearColor{ 0.0f, 0.0f, 0.0f, 1.0f });\n\t\t\tPostRenderer::Draw_Line(FVector2D{ pos.X, pos.Y }, FVector2D{ pos.X, pos.Y + size.Y - 1 }, 1.0f, FLinearColor{ 0.0f, 0.0f, 0.0f, 1.0f });\n\t\t\tPostRenderer::Draw_Line(FVector2D{ pos.X + size.X - 1, pos.Y }, FVector2D{ pos.X + size.X - 1, pos.Y + size.Y - 1 }, 1.0f, FLinearColor{ 0.0f, 0.0f, 0.0f, 1.0f });\n\t\t}\n\n\t\t//Смена цвета\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y }, size);\n\t\tif (isHovered)\n\t\t{\n\t\t\tif (Input::IsMouseClicked(0, elements_count, false))\n\t\t\t\t*original = color;\n\t\t}\n\n\t\treturn true;\n\t}\n\tvoid ColorPicker(char* name, FLinearColor* color)\n\t{\n\t\telements_count++;\n\n\t\tfloat size = 25;\n\t\tFVector2D padding = FVector2D{ 10, 10 };\n\t\tFVector2D pos = FVector2D{ menu_pos.X + padding.X + offset_x, menu_pos.Y + padding.Y + offset_y };\n\t\tif (sameLine)\n\t\t{\n\t\t\tpos.X = last_element_pos.X + last_element_size.X + padding.X;\n\t\t\tpos.Y = last_element_pos.Y;\n\t\t}\n\t\tif (pushY)\n\t\t{\n\t\t\tpos.Y = pushYvalue;\n\t\t\tpushY = false;\n\t\t\tpushYvalue = 0.0f;\n\t\t\toffset_y = pos.Y - menu_pos.Y;\n\t\t}\n\t\tbool isHovered = MouseInZone(FVector2D{ pos.X, pos.Y }, FVector2D{ size, size });\n\n\t\tif (!sameLine)\n\t\t\toffset_y += size + padding.Y;\n\n\t\tif (active_picker == elements_count)\n\t\t{\n\t\t\thover_element = true;\n\n\t\t\tfloat sizePickerX = 250;\n\t\t\tfloat sizePickerY = 250;\n\t\t\tbool isHoveredPicker = MouseInZone(FVector2D{ pos.X, pos.Y }, FVector2D{ sizePickerX, sizePickerY - 60 });\n\n\t\t\t//Background\n\t\t\tPostRenderer::drawFilledRect(FVector2D{ pos.X, pos.Y }, sizePickerX, sizePickerY - 65, Colors::ColorPicker_Background);\n\n\t\t\t//float pixedSize = sizePickerY / pixels;\n\t\t\t//FLinearColor temp_color{1.0f, 1.0f, 1.0f, 1.0f};\n\t\t\t//float iterator = 0.0f;\n\t\t\t//\n\t\t\t//for (int y = 0; y < pixels; y++)\n\t\t\t//{\n\t\t\t//\tfor (int x = 0; x < pixels; x++)\n\t\t\t//\t{\n\t\t\t//\t\tColorPixel(FVector2D{ pos.X + pixedSize * x, pos.Y + pixedSize * y }, pixedSize, color, temp_color);\n\t\t\t//\t\ttemp_color.R -= (1.0f - saved_color.R) / pixels;\n\t\t\t//\t\ttemp_color.G -= (1.0f - saved_color.G) / pixels;\n\t\t\t//\t\ttemp_color.B -= (1.0f - saved_color.B) / pixels;\n\t\t\t//\t}\n\t\t\t//\t\n\t\t\t//\titerator += 1.0f / pixels;\n\t\t\t//\ttemp_color = FLinearColor{ 1.0f - iterator, 1.0f - iterator, 1.0f - iterator, 1.0f };\n\t\t\t//}\n\n\t\t\tFVector2D pixelSize = FVector2D{ sizePickerX / 12, sizePickerY / 12 };\n\n\t\t\t//0\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 174 / 255.f, 235 / 255.f, 253 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 136 / 255.f, 225 / 255.f, 251 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 108 / 255.f, 213 / 255.f, 250 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 89 / 255.f, 175 / 255.f, 213 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 76 / 255.f, 151 / 255.f, 177 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 60 / 255.f, 118 / 255.f, 140 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 43 / 255.f, 85 / 255.f, 100 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 32 / 255.f, 62 / 255.f, 74 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 0, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 255 / 255.f, 255 / 255.f, 255 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//1\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 175 / 255.f, 205 / 255.f, 252 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 132 / 255.f, 179 / 255.f, 252 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 90 / 255.f, 152 / 255.f, 250 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 55 / 255.f, 120 / 255.f, 250 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 49 / 255.f, 105 / 255.f, 209 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 38 / 255.f, 83 / 255.f, 165 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 28 / 255.f, 61 / 255.f, 120 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 20 / 255.f, 43 / 255.f, 86 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 1, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 247 / 255.f, 247 / 255.f, 247 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//2\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 153 / 255.f, 139 / 255.f, 250 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 101 / 255.f, 79 / 255.f, 249 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 64 / 255.f, 50 / 255.f, 230 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 54 / 255.f, 38 / 255.f, 175 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 39 / 255.f, 31 / 255.f, 144 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 32 / 255.f, 25 / 255.f, 116 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 21 / 255.f, 18 / 255.f, 82 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 16 / 255.f, 13 / 255.f, 61 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 2, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 228 / 255.f, 228 / 255.f, 228 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//3\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 194 / 255.f, 144 / 255.f, 251 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 165 / 255.f, 87 / 255.f, 249 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 142 / 255.f, 57 / 255.f, 239 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 116 / 255.f, 45 / 255.f, 184 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 92 / 255.f, 37 / 255.f, 154 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 73 / 255.f, 29 / 255.f, 121 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 53 / 255.f, 21 / 255.f, 88 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 37 / 255.f, 15 / 255.f, 63 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 3, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 203 / 255.f, 203 / 255.f, 203 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//4\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 224 / 255.f, 162 / 255.f, 197 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 210 / 255.f, 112 / 255.f, 166 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 199 / 255.f, 62 / 255.f, 135 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 159 / 255.f, 49 / 255.f, 105 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 132 / 255.f, 41 / 255.f, 89 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 104 / 255.f, 32 / 255.f, 71 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 75 / 255.f, 24 / 255.f, 51 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 54 / 255.f, 14 / 255.f, 36 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 4, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 175 / 255.f, 175 / 255.f, 175 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//5\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 235 / 255.f, 175 / 255.f, 176 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 227 / 255.f, 133 / 255.f, 135 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 219 / 255.f, 87 / 255.f, 88 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 215 / 255.f, 50 / 255.f, 36 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 187 / 255.f, 25 / 255.f, 7 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 149 / 255.f, 20 / 255.f, 6 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 107 / 255.f, 14 / 255.f, 4 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 77 / 255.f, 9 / 255.f, 3 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 5, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 144 / 255.f, 144 / 255.f, 144 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//6\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 241 / 255.f, 187 / 255.f, 171 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 234 / 255.f, 151 / 255.f, 126 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 229 / 255.f, 115 / 255.f, 76 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 227 / 255.f, 82 / 255.f, 24 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 190 / 255.f, 61 / 255.f, 15 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 150 / 255.f, 48 / 255.f, 12 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 107 / 255.f, 34 / 255.f, 8 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 79 / 255.f, 25 / 255.f, 6 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 6, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 113 / 255.f, 113 / 255.f, 113 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//7\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 245 / 255.f, 207 / 255.f, 169 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 240 / 255.f, 183 / 255.f, 122 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 236 / 255.f, 159 / 255.f, 74 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 234 / 255.f, 146 / 255.f, 37 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 193 / 255.f, 111 / 255.f, 28 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 152 / 255.f, 89 / 255.f, 22 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 110 / 255.f, 64 / 255.f, 16 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 80 / 255.f, 47 / 255.f, 12 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 7, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 82 / 255.f, 82 / 255.f, 82 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//8\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 247 / 255.f, 218 / 255.f, 170 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 244 / 255.f, 200 / 255.f, 124 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 241 / 255.f, 182 / 255.f, 77 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 239 / 255.f, 174 / 255.f, 44 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 196 / 255.f, 137 / 255.f, 34 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 154 / 255.f, 108 / 255.f, 27 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 111 / 255.f, 77 / 255.f, 19 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 80 / 255.f, 56 / 255.f, 14 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 8, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 54 / 255.f, 54 / 255.f, 54 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//9\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 254 / 255.f, 243 / 255.f, 187 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 253 / 255.f, 237 / 255.f, 153 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 253 / 255.f, 231 / 255.f, 117 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 254 / 255.f, 232 / 255.f, 85 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 242 / 255.f, 212 / 255.f, 53 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 192 / 255.f, 169 / 255.f, 42 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 138 / 255.f, 120 / 255.f, 30 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 101 / 255.f, 87 / 255.f, 22 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 9, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 29 / 255.f, 29 / 255.f, 29 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//10\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 247 / 255.f, 243 / 255.f, 185 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 243 / 255.f, 239 / 255.f, 148 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 239 / 255.f, 232 / 255.f, 111 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 235 / 255.f, 229 / 255.f, 76 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 208 / 255.f, 200 / 255.f, 55 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 164 / 255.f, 157 / 255.f, 43 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 118 / 255.f, 114 / 255.f, 31 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 86 / 255.f, 82 / 255.f, 21 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 10, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 9 / 255.f, 9 / 255.f, 9 / 255.f, 1.0f });\n\t\t\t}\n\t\t\t//11\n\t\t\t{\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 0 }, pixelSize, color, FLinearColor{ 218 / 255.f, 232 / 255.f, 182 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 1 }, pixelSize, color, FLinearColor{ 198 / 255.f, 221 / 255.f, 143 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 2 }, pixelSize, color, FLinearColor{ 181 / 255.f, 210 / 255.f, 103 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 3 }, pixelSize, color, FLinearColor{ 154 / 255.f, 186 / 255.f, 76 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 4 }, pixelSize, color, FLinearColor{ 130 / 255.f, 155 / 255.f, 64 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 5 }, pixelSize, color, FLinearColor{ 102 / 255.f, 121 / 255.f, 50 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 6 }, pixelSize, color, FLinearColor{ 74 / 255.f, 88 / 255.f, 36 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 7 }, pixelSize, color, FLinearColor{ 54 / 255.f, 64 / 255.f, 26 / 255.f, 1.0f });\n\t\t\t\tColorPixel(FVector2D{ pos.X + pixelSize.X * 11, pos.Y + pixelSize.Y * 8 }, pixelSize, color, FLinearColor{ 0 / 255.f, 0 / 255.f, 0 / 255.f, 1.0f });\n\t\t\t}\n\n\n\n\t\t\tif (isHoveredPicker)\n\t\t\t{\n\t\t\t\tif (Input::IsMouseClicked(0, elements_count, false))\n\t\t\t\t{\n\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (Input::IsMouseClicked(0, elements_count, false))\n\t\t\t\t{\n\t\t\t\t\tactive_picker = -1;\n\t\t\t\t\t//hover_element = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Bg\n\t\t\tif (isHovered)\n\t\t\t{\n\t\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size, size, Colors::Checkbox_Hovered);\n\t\t\t\thover_element = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdrawFilledRect(FVector2D{ pos.X, pos.Y }, size, size, Colors::Checkbox_Idle);\n\t\t\t}\n\n\t\t\t//Color\n\t\t\tdrawFilledRect(FVector2D{ pos.X + 4, pos.Y + 4 }, size - 8, size - 8, *color);\n\n\t\t\t//Text\n\t\t\tFVector2D textPos = FVector2D{ pos.X + size + 5.0f, pos.Y + size / 2 };\n\t\t\tTextLeft(name, textPos, FLinearColor{ 1.0f, 1.0f, 1.0f, 1.0f }, false);\n\n\t\t\tif (isHovered && Input::IsMouseClicked(0, elements_count, false))\n\t\t\t{\n\t\t\t\tsaved_color = *color;\n\t\t\t\tactive_picker = elements_count;\n\t\t\t}\n\t\t}\n\n\n\t\tsameLine = false;\n\t\tlast_element_pos = pos;\n\t\t//last_element_size = size;\n\t\tif (first_element_pos.X == 0.0f)\n\t\t\tfirst_element_pos = pos;\n\t}\n\n\n\tvoid Render()\n\t{\n\t\tfor (int i = 0; i < 128; i++)\n\t\t{\n\t\t\tif (PostRenderer::drawlist[i].type != -1)\n\t\t\t{\n\t\t\t\t//Filled Rect\n\t\t\t\tif (PostRenderer::drawlist[i].type == 1)\n\t\t\t\t{\n\t\t\t\t\tZeroGUI::drawFilledRect(PostRenderer::drawlist[i].pos, PostRenderer::drawlist[i].size.X, PostRenderer::drawlist[i].size.Y, PostRenderer::drawlist[i].color);\n\t\t\t\t}\n\t\t\t\t//TextLeft\n\t\t\t\telse if (PostRenderer::drawlist[i].type == 2)\n\t\t\t\t{\n\t\t\t\t\tZeroGUI::TextLeft(PostRenderer::drawlist[i].name, PostRenderer::drawlist[i].pos, PostRenderer::drawlist[i].color, PostRenderer::drawlist[i].outline);\n\t\t\t\t}\n\t\t\t\t//TextCenter\n\t\t\t\telse if (PostRenderer::drawlist[i].type == 3)\n\t\t\t\t{\n\t\t\t\t\tZeroGUI::TextCenter(PostRenderer::drawlist[i].name, PostRenderer::drawlist[i].pos, PostRenderer::drawlist[i].color, PostRenderer::drawlist[i].outline);\n\t\t\t\t}\n\t\t\t\t//Draw_Line\n\t\t\t\telse if (PostRenderer::drawlist[i].type == 4)\n\t\t\t\t{\n\t\t\t\t\tDraw_Line(PostRenderer::drawlist[i].from, PostRenderer::drawlist[i].to, PostRenderer::drawlist[i].thickness, PostRenderer::drawlist[i].color);\n\t\t\t\t}\n\n\t\t\t\tPostRenderer::drawlist[i].type = -1;\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "source/ZeroInput.h",
    "content": "#pragma once\n#include <Windows.h>\n\nnamespace ZeroGUI\n{\n\tnamespace Input\n\t{\n\t\tbool mouseDown[5];\n\t\tbool mouseDownAlready[256];\n\n\t\tbool keysDown[256];\n\t\tbool keysDownAlready[256];\n\n\t\tbool IsAnyMouseDown()\n\t\t{\n\t\t\tif (mouseDown[0]) return true;\n\t\t\tif (mouseDown[1]) return true;\n\t\t\tif (mouseDown[2]) return true;\n\t\t\tif (mouseDown[3]) return true;\n\t\t\tif (mouseDown[4]) return true;\n\n\t\t\treturn false;\n\t\t}\n\n\t\tbool IsMouseClicked(int button, int element_id, bool repeat)\n\t\t{\n\t\t\tif (mouseDown[button])\n\t\t\t{\n\t\t\t\tif (!mouseDownAlready[element_id])\n\t\t\t\t{\n\t\t\t\t\tmouseDownAlready[element_id] = true;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (repeat)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmouseDownAlready[element_id] = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tbool IsKeyPressed(int key, bool repeat)\n\t\t{\n\t\t\tif (keysDown[key])\n\t\t\t{\n\t\t\t\tif (!keysDownAlready[key])\n\t\t\t\t{\n\t\t\t\t\tkeysDownAlready[key] = true;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (repeat)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tkeysDownAlready[key] = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tvoid Handle()\n\t\t{\n\t\t\tif (GetAsyncKeyState(0x01))\n\t\t\t\tmouseDown[0] = true;\n\t\t\telse\n\t\t\t\tmouseDown[0] = false;\n\t\t}\n\t}\n}\n"
  }
]