Показать сообщение отдельно

  #3  
Старый 25.03.2019, 17:27
atizoff
Познавший АНТИЧАТ
Регистрация: 02.08.2018
Сообщений: 1,295
С нами: 4095395

Репутация: 183


По умолчанию

Цитата:
Сообщение от 4el0ve4ik  

как то так:

C++:





Код:
ImGuiStyle
&
style
=
ImGui
::
GetStyle
(
)
;
style
.
Colors
[
ImGuiCol_Text
]
=
ImVec4
(
0.90f
,
0.90f
,
0.90f
,
0.93f
)
;
style
.
Colors
[
ImGuiCol_TextDisabled
]
=
ImVec4
(
0.60f
,
0.60f
,
0.60f
,
0.68f
)
;
style
.
Colors
[
ImGuiCol_WindowBg
]
=
ImVec4
(
0.16f
,
0.16f
,
0.16f
,
0.96f
)
;
style
.
Colors
[
ImGuiCol_PopupBg
]
=
ImVec4
(
0.10f
,
0.10f
,
0.10f
,
0.94f
)
;
style
.
Colors
[
ImGuiCol_Border
]
=
ImVec4
(
0.34f
,
0.33f
,
0.34f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_FrameBg
]
=
ImVec4
(
0.80f
,
0.80f
,
0.80f
,
0.33f
)
;
style
.
Colors
[
ImGuiCol_FrameBgHovered
]
=
ImVec4
(
0.80f
,
0.80f
,
1.00f
,
0.40f
)
;
style
.
Colors
[
ImGuiCol_FrameBgActive
]
=
ImVec4
(
0.50f
,
0.58f
,
0.85f
,
0.65f
)
;
style
.
Colors
[
ImGuiCol_TitleBg
]
=
ImVec4
(
0.40f
,
0.40f
,
0.39f
,
0.80f
)
;
style
.
Colors
[
ImGuiCol_TitleBgCollapsed
]
=
ImVec4
(
0.22f
,
0.39f
,
0.73f
,
0.52f
)
;
style
.
Colors
[
ImGuiCol_TitleBgActive
]
=
ImVec4
(
0.13f
,
0.41f
,
0.71f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_MenuBarBg
]
=
ImVec4
(
0.30f
,
0.31f
,
0.31f
,
0.80f
)
;
style
.
Colors
[
ImGuiCol_ScrollbarBg
]
=
ImVec4
(
0.20f
,
0.25f
,
0.30f
,
0.00f
)
;
style
.
Colors
[
ImGuiCol_ScrollbarGrab
]
=
ImVec4
(
0.40f
,
0.40f
,
0.40f
,
0.39f
)
;
style
.
Colors
[
ImGuiCol_ScrollbarGrabHovered
]
=
ImVec4
(
0.40f
,
0.40f
,
0.40f
,
0.59f
)
;
style
.
Colors
[
ImGuiCol_ScrollbarGrabActive
]
=
ImVec4
(
0.50f
,
0.50f
,
0.50f
,
0.72f
)
;
style
.
Colors
[
ImGuiCol_CheckMark
]
=
ImVec4
(
0.27f
,
0.58f
,
1.00f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_SliderGrabActive
]
=
ImVec4
(
0.20f
,
0.57f
,
1.00f
,
0.84f
)
;
style
.
Colors
[
ImGuiCol_Button
]
=
ImVec4
(
0.27f
,
0.58f
,
1.00f
,
0.78f
)
;
style
.
Colors
[
ImGuiCol_ButtonHovered
]
=
ImVec4
(
0.37f
,
0.64f
,
1.00f
,
0.94f
)
;
style
.
Colors
[
ImGuiCol_ButtonActive
]
=
ImVec4
(
0.27f
,
0.44f
,
1.00f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_Header
]
=
ImVec4
(
0.49f
,
0.49f
,
0.49f
,
0.46f
)
;
style
.
Colors
[
ImGuiCol_HeaderHovered
]
=
ImVec4
(
0.45f
,
0.45f
,
0.50f
,
0.49f
)
;
style
.
Colors
[
ImGuiCol_HeaderActive
]
=
ImVec4
(
0.53f
,
0.53f
,
0.57f
,
0.75f
)
;
style
.
Colors
[
ImGuiCol_ColumnHovered
]
=
ImVec4
(
0.60f
,
0.60f
,
0.70f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_ColumnActive
]
=
ImVec4
(
0.70f
,
0.70f
,
0.90f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_ResizeGrip
]
=
ImVec4
(
1.00f
,
1.00f
,
1.00f
,
0.47f
)
;
style
.
Colors
[
ImGuiCol_ResizeGripActive
]
=
ImVec4
(
0.78f
,
0.76f
,
1.00f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_CloseButton
]
=
ImVec4
(
0.50f
,
0.50f
,
0.50f
,
0.89f
)
;
style
.
Colors
[
ImGuiCol_CloseButtonHovered
]
=
ImVec4
(
0.70f
,
0.70f
,
0.71f
,
0.60f
)
;
style
.
Colors
[
ImGuiCol_PlotLinesHovered
]
=
ImVec4
(
0.27f
,
0.54f
,
1.00f
,
0.47f
)
;
style
.
Colors
[
ImGuiCol_PlotHistogram
]
=
ImVec4
(
0.24f
,
0.58f
,
1.00f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_PlotHistogramHovered
]
=
ImVec4
(
0.23f
,
0.47f
,
1.00f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_TextSelectedBg
]
=
ImVec4
(
0.16f
,
0.37f
,
0.98f
,
0.75f
)
;

сделал также, но чёт ничего

Цитата:
Сообщение от Спойлер  


C++:





[CODE]
#include
#include
#include "imgui/imgui.h"
#include "GUI.h"
#include "Config.h"
#include "Hacks/Misc.h"
#include "Hacks/Visuals.h"
constexpr
auto
windowFlags
=
ImGuiWindowFlags_NoCollapse
|
ImGuiWindowFlags_NoResize
|
ImGuiWindowFlags_NoScrollbar
|
ImGuiWindowFlags_NoScrollWithMouse
;
void
GUI
::
style
(
)
noexcept
{
#define HI(v) ImVec4(0.502f, 0.075f, 0.256f, v)
#define MED(v) ImVec4(0.455f, 0.198f, 0.301f, v)
#define LOW(v) ImVec4(0.232f, 0.201f, 0.271f, v)
// backgrounds (@todo: complete with BG_MED, BG_LOW)
#define BG(v) ImVec4(0.200f, 0.220f, 0.270f, v)
// text
#define TEXT(v) ImVec4(0.860f, 0.930f, 0.890f, v)
auto
&
style
=
ImGui
::
GetStyle
(
)
;
style
.
Colors
[
ImGuiCol_Text
]
=
TEXT
(
0.78f
)
;
style
.
Colors
[
ImGuiCol_TextDisabled
]
=
TEXT
(
0.28f
)
;
style
.
Colors
[
ImGuiCol_WindowBg
]
=
ImVec4
(
0.13f
,
0.14f
,
0.17f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_PopupBg
]
=
BG
(
0.9f
)
;
style
.
Colors
[
ImGuiCol_Border
]
=
ImVec4
(
0.31f
,
0.31f
,
1.00f
,
0.00f
)
;
style
.
Colors
[
ImGuiCol_BorderShadow
]
=
ImVec4
(
0.00f
,
0.00f
,
0.00f
,
0.00f
)
;
style
.
Colors
[
ImGuiCol_FrameBg
]
=
BG
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_FrameBgHovered
]
=
MED
(
0.78f
)
;
style
.
Colors
[
ImGuiCol_FrameBgActive
]
=
MED
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_TitleBg
]
=
LOW
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_TitleBgActive
]
=
HI
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_TitleBgCollapsed
]
=
BG
(
0.75f
)
;
style
.
Colors
[
ImGuiCol_MenuBarBg
]
=
BG
(
0.47f
)
;
style
.
Colors
[
ImGuiCol_ScrollbarBg
]
=
BG
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_ScrollbarGrab
]
=
ImVec4
(
0.09f
,
0.15f
,
0.16f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_ScrollbarGrabHovered
]
=
MED
(
0.78f
)
;
style
.
Colors
[
ImGuiCol_ScrollbarGrabActive
]
=
MED
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_CheckMark
]
=
ImVec4
(
0.71f
,
0.22f
,
0.27f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_SliderGrab
]
=
ImVec4
(
0.47f
,
0.77f
,
0.83f
,
0.14f
)
;
style
.
Colors
[
ImGuiCol_SliderGrabActive
]
=
ImVec4
(
0.71f
,
0.22f
,
0.27f
,
1.00f
)
;
style
.
Colors
[
ImGuiCol_Button
]
=
ImVec4
(
0.47f
,
0.77f
,
0.83f
,
0.14f
)
;
style
.
Colors
[
ImGuiCol_ButtonHovered
]
=
MED
(
0.86f
)
;
style
.
Colors
[
ImGuiCol_ButtonActive
]
=
MED
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_Header
]
=
MED
(
0.76f
)
;
style
.
Colors
[
ImGuiCol_HeaderHovered
]
=
MED
(
0.86f
)
;
style
.
Colors
[
ImGuiCol_HeaderActive
]
=
HI
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_ResizeGrip
]
=
ImVec4
(
0.47f
,
0.77f
,
0.83f
,
0.04f
)
;
style
.
Colors
[
ImGuiCol_ResizeGripHovered
]
=
MED
(
0.78f
)
;
style
.
Colors
[
ImGuiCol_ResizeGripActive
]
=
MED
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_PlotLines
]
=
TEXT
(
0.63f
)
;
style
.
Colors
[
ImGuiCol_PlotLinesHovered
]
=
MED
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_PlotHistogram
]
=
TEXT
(
0.63f
)
;
style
.
Colors
[
ImGuiCol_PlotHistogramHovered
]
=
MED
(
1.00f
)
;
style
.
Colors
[
ImGuiCol_TextSelectedBg
]
=
MED
(
0.43f
)
;
// [...]
style
.
WindowPadding
=
ImVec2
(
6
,
4
)
;
style
.
WindowRounding
=
0.0f
;
style
.
FramePadding
=
ImVec2
(
5
,
2
)
;
style
.
FrameRounding
=
3.0f
;
style
.
ItemSpacing
=
ImVec2
(
7
,
1
)
;
style
.
ItemInnerSpacing
=
ImVec2
(
1
,
1
)
;
style
.
TouchExtraPadding
=
ImVec2
(
0
,
0
)
;
style
.
IndentSpacing
=
6.0f
;
style
.
ScrollbarSize
=
12.0f
;
style
.
ScrollbarRounding
=
16.0f
;
style
.
GrabMinSize
=
20.0f
;
style
.
GrabRounding
=
2.0f
;
style
.
WindowTitleAlign
.
x
=
0.50f
;
style
.
Colors
[
ImGuiCol_Border
]
=
ImVec4
(
0.539f
,
0.479f
,
0.255f
,
0.162f
)
;
style
.
FrameBorderSize
=
0.0f
;
style
.
WindowBorderSize
=
1.0f
;
}
void
GUI
::
render
(
)
noexcept
{
renderMenuBar
(
)
;
renderGlowWindow
(
)
;
renderVisualsWindow
(
)
;
renderMiscWindow
(
)
;
}
void
GUI
::
checkBoxAndColorPicker
(
const
std
::
string
&
name
,
bool
*
enable
,
float
*
color
)
noexcept
{
ImGui
::
Checkbox
(
(
"##"
+
name
)
.
c_str
(
)
,
enable
)
;
ImGui
::
SameLine
(
0.0f
,
5.0f
)
;
bool
openPopup
=
ImGui
::
ColorButton
(
(
"##"
+
name
+
"ColorButton"
)
.
c_str
(
)
,
ImColor
{
color
[
0
]
,
color
[
1
]
,
color
[
2
]
}
,
ImGuiColorEditFlags_NoTooltip
)
;
ImGui
::
SameLine
(
0.0f
,
5.0f
)
;
ImGui
::
Text
(
name
.
c_str
(
)
)
;
if
(
openPopup
)
ImGui
::
OpenPopup
(
(
"##"
+
name
+
"Popup"
)
.
c_str
(
)
)
;
if
(
ImGui
::
BeginPopup
(
(
"##"
+
name
+
"Popup"
)
.
c_str
(
)
)
)
{
ImGui
::
ColorPicker3
(
(
"##"
+
name
+
"Picker"
)
.
c_str
(
)
,
color
,
ImGuiColorEditFlags_DisplayRGB
|
ImGuiColorEditFlags_NoSidePreview
)
;
ImGui
::
EndPopup
(
)
;
}
}
void
GUI
::
hotkey
(
int
&
key
)
noexcept
{
ImGui
::
Text
(
(
std
::
ostringstream
{
}



 
Ответить с цитированием