
25.03.2019, 17:18
|
|
Познавший АНТИЧАТ
Регистрация: 02.08.2018
Сообщений: 1,295
С нами:
4095395
Репутация:
183
|
|
как применить стиль в имгуи?
|
|
|

25.03.2019, 17:21
|
|
Познавший АНТИЧАТ
Регистрация: 12.11.2015
Сообщений: 1,560
С нами:
5526867
Репутация:
183
|
|
Сообщение от social enemy
как применить стиль в имгуи?
как то так:
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
)
;
|
|
|

25.03.2019, 17:27
|
|
Познавший АНТИЧАТ
Регистрация: 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
{
}
|
|
|

27.03.2019, 19:03
|
|
Познающий
Регистрация: 16.03.2018
Сообщений: 88
С нами:
4295643
Репутация:
8
|
|
Посоветуйте простенькую не тяжеловесную IDE
|
|
|

27.03.2019, 19:22
|
|
Постоянный
Регистрация: 14.11.2017
Сообщений: 319
С нами:
4472205
Репутация:
163
|
|
Сообщение от CyberSuslik
Посоветуйте простенькую не тяжеловесную IDE
блокнот
|
|
|

28.03.2019, 14:56
|
|
Новичок
Регистрация: 25.03.2019
Сообщений: 1
С нами:
3756638
Репутация:
0
|
|
void *obj = *(void **)((DWORD)samp + 0x95CD0);
((void(__thiscall *) (void *, int, bool)) ((DWORD)samp + 0x95CD0))(obj, iToggle ? 3 : 0, !iToggle);
За что отвечают эти два адреса ?
|
|
|

28.03.2019, 16:46
|
|
Флудер
Регистрация: 17.06.2013
Сообщений: 3,635
С нами:
6791977
Репутация:
183
|
|
Сообщение от Sarutobi1
void *obj = *(void **)((DWORD)samp + 0x95CD0);
((void(__thiscall *) (void *, int, bool)) ((DWORD)samp + 0x95CD0))(obj, iToggle ? 3 : 0, !iToggle);
За что отвечают эти два адреса ?
Включение/Отключение показа курсора мышки.
|
|
|

28.03.2019, 19:59
|
|
Постоянный
Регистрация: 24.01.2016
Сообщений: 566
С нами:
5421300
Репутация:
83
|
|
Как занопать определенные фрагменты памяти? Пример, я знаю что врайтпроцессмемори, но как занопать несколько сразу
|
|
|

29.03.2019, 00:43
|
|
Участник форума
Регистрация: 04.04.2017
Сообщений: 263
С нами:
4793630
Репутация:
133
|
|
Как воспроизвести аудио файл вSAMPFUNCS? Можно пример?
|
|
|

06.04.2019, 20:09
|
|
Участник форума
Регистрация: 28.07.2015
Сообщений: 191
С нами:
5680844
Репутация:
68
|
|
Здравствуйте, товарищи, возникла проблема. Использую moonloader, необходимо отправить сообщение через sendmessage (или postmessage) окну имея его PID. Использую для этого библиотеку ffi, которая способна выполнять win api функции через луа. Однако эта библиотека использует синтаксис СИ обычного (я так понял это C, просто я в C++ C# и С не разбираюсь, они вроде бы одно и тоже, но почему тогда разные названия  ?). Все мое движение уперлось в написании кода на СИ, который потом можно будет выполнить через луа. Приведу то, что я нарыл в гугле и попытался использовать:
Код:
Код:
ffi.cdef[[
int SendMessage(int hWnd, int Msg, int wParam, int lParam);
]]
ffi.C.SendMessage(9576, 0x1002, 0xFF, 0xFFF)
Все что внутри ffi.cdef между [[ ]] это код на СИ, я так понял нужно записать этот код так, как будто он выполнялся бы на СИ, а аргументы получит через луа, который переделает параметры под стандарты СИ. Или это экспорт функции SendMessage... UPD: погуглил, это похоже сигнатура функции... Этот код вызывает следующую ошибку:
Код:
Код:
[19:54:12.474688] (error) test.lua: C:\Games\GTA San Andreas\moonloader\test.lua:33: cannot resolve symbol 'SendMessage': Не найдена указанная процедура.
Возможно это поможет вам понять, что я сделал не так. Помогите пожалуйста записать СИшный код правильно, я конечно спросил в разделе луа, но все таки то раздел луа, а тут проблема в коде написанном на СИ, потому шансов получить помощь у меня больше здесь, я полагаю.
Прошу отнестись ко мне снисходительно, я никогда не изучал СИ и дай Бог если это мой единственный раз, когда я столкнусь с этим языком. Рассчитываю на вашу поддержку.
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|