我正在寻找一种方法来更改“名称”按钮上显示的文本的颜色,但是我对此一无所知。我想使其绿色,表示赞赏或帮助:D
// Name
ImGui::InputText("Name", selected_entry.name, 32);
// Item to change
ImGui::Combo("Item", &selected_entry.definition_vector_index, [](void* data, int idx, const char** out_text)
{
*out_text = game_data::weapon_names[idx].name;
return true;
}, nullptr, game_data::weapon_names.size(), 5);
// Enabled
ImGui::Checkbox("Enabled", &selected_entry.enabled);
我认为它完全依赖于编译器,没有c ++。请尝试在ide的视图选项卡中对其进行检查。
使用向导为按钮添加变量(例如button):
CMFCButton button;
使用以下方法更改面部和文字颜色:
button.SetFaceColor(RGB(255,0,0),true);
button.SetTextColor(RGB(0,0,255));