$ underrow $
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
u have to do that with igameevent for work
Код:
void menu :: initialize () {
create ();
/ * positions * /
static vec2_t old_position;
static vec2_t mouse_position;
/ * dick * /
static int drag_x = 0;
static int drag_y = 0;
static int width = 700;
static int height = 370;
static bool dragging = false;
bool click = false;
if (GetAsyncKeyState (VK_LBUTTON))
click = true;
/ * get mouse pos * /
renderer :: pos mouse_pos;
ui :: render.mouse_pos (mouse_pos);
static decltype (position) dragging_pos {0, 0};
if (dragging &&! click)
{
dragging = false;
}
if (dragging && click)
{
position.x = mouse_pos.x - dragging_pos.x;
position.y = mouse_pos.y - dragging_pos.y;
}
/ * if we're 'dragging' * /
if (ui :: render.mouse_in_region (position.x, position.y, width, 30)) {
dragging = true;
dragging_pos.x = mouse_pos.x - position.x;
dragging_pos.y = mouse_pos.y - position.y;
}
/ * created by dutu * /
ui :: render.filled_rect (position.x, position.y, 155, 145, color (20, 20, 20));
ui :: render.filled_rect (position.x, position.y, 155, 20, color (30, 30, 30));
/ * starting * /
/ * head * / {
ui :: render.rect (position.x + 155/2 - 10, position.y + 30, 20, 20, color (120, 120, 120));
}
/ * gatu in pula mea * / {
ui :: render.rect (position.x + 155/2 - 3, position.y + 51.5, 5, 8, color (120, 120, 120));
}
/ * acolo la burta mortii ei * / {
ui :: render.rect (position.x + 155/2 - 10, position.y + 59.5, 20, 30, color (120, 120, 120));
}
/ * left arm * / {
ui :: render.rect (position.x + 155/2 - 17, position.y + 59.7, 5, 17, color (120, 120, 120));
}
/ * right arm * / {
ui :: render.rect (position.x + 155/2 + 12, position.y + 59.7, 5, 17, color (120, 120, 120));
}
/ * left mana cu degete mortii ei * / {
ui :: render.rect (position.x + 155/2 - 17, position.y + 78, 5, 5, color (120, 120, 120));
}
/ * right mana cu degete mortii ei * / {
ui :: render.rect (position.x + 155/2 + 12, position.y + 78, 5, 5, color (120, 120, 120));
}
/ * left leg * / {
ui :: render.rect (position.x + 155/2 - 10/2 - 2, position.y + 92, 20/2 - 3, 20, color (120, 120, 120));
}
/ * right leg * / {
ui :: render.rect (position.x + 155/2 + 2, position.y + 92, 20/2 - 3, 20, color (120, 120, 120));
}
/ * left leg cu degete pula mea * / {
ui :: render.rect (position.x + 155/2 - 10/2 - 2, position.y + 115, 20/2 - 3, 5, color (120, 120, 120));
}
/ * right leg cu degete mortii lui * / {
ui :: render.rect (position.x + 155/2 + 2, position.y + 115, 20/2 - 3, 5, color (120, 120, 120));
}
} [/ CODE]
A.[ATTACH type="full"]81432[/ATTACH]
Вложения
-
2.5 KB Просмотры: 321