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

  #3203  
Старый 30.12.2018, 16:20
_=Gigant=_
Участник форума
Регистрация: 19.01.2017
Сообщений: 130
С нами: 4901705

Репутация: 98
По умолчанию

Цитата:
Сообщение от beento  

есть ли редактор цветов imgui?
ImVec4(0.50f, 0.50f, 1.00f, 0.45f);
что означают аргументы?
current color ImVec4(0.50f, 0.50f, 1.00f, 0.45f);

here example

ImVec4 custom_color = ImVec4(0.50f, 0.50f, 1.00f, 0.45f);

ImGui::ColorEdit3("Custom Color", (float*)&custom_color, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_RGB);

// use this for color D3DCOLOR_ARGB(254, (BYTE)(custom_color.z * 255), (BYTE)(custom_color.y * 255), (BYTE)(custom_color.x * 255))

example

_snprintf_s(pos, sizeof(pos) - 1, "Pos X %0.02f Y %0.02f Z %0.02f", player_pos.x, player_pos.y, player_pos.z);

pD3DFont_Arial->PrintShadow(screenposs.x, screenposs.y, D3DCOLOR_ARGB(255, (BYTE)round(custom_color.x * 255.f), (BYTE)round(custom_color.y * 255.f), (BYTE)round(custom_color.z * 255.f)), pos);
 
Ответить с цитированием