Add motorcycle club, too. (#3013)
* Refactor add_callback_for_labels to take an initializer_list.
This commit is contained in:
parent
17a7ad65b9
commit
d1d72e54b9
@ -7,7 +7,7 @@ namespace big
|
||||
custom_text_service::custom_text_service()
|
||||
{
|
||||
add_callback_for_labels({"RESPAWN_W"_J, "RESPAWN_W_MP"_J}, respawn_label_callback);
|
||||
add_callback_for_labels({"FMMC_KEY_TIP15"_J}, do_ceo_name_resize);
|
||||
add_callback_for_labels({"FMMC_KEY_TIP15"_J, "FMMC_MCK_TIP15"_J}, do_ceo_name_resize);
|
||||
add_label_overwrite("GC_OTR_TMR"_J, "HIDING FROM CLOWNS");
|
||||
// add_label_overwrite("TICK_LEFTCHEAT"_J, "~a~~HUD_COLOUR_WHITE~ has been swatted by Rockstar.");
|
||||
|
||||
@ -24,7 +24,7 @@ namespace big
|
||||
return m_callbacks.insert({hash, cb}).second;
|
||||
}
|
||||
|
||||
bool custom_text_service::add_callback_for_labels(std::list<rage::joaat_t> hashes, custom_label_callback&& cb)
|
||||
bool custom_text_service::add_callback_for_labels(std::initializer_list<rage::joaat_t> hashes, custom_label_callback&& cb)
|
||||
{
|
||||
bool result = true;
|
||||
for (const auto& hash : hashes)
|
||||
|
@ -19,7 +19,7 @@ namespace big
|
||||
custom_text_service& operator=(custom_text_service&&) noexcept = delete;
|
||||
|
||||
bool add_callback_for_label(rage::joaat_t hash, custom_label_callback&& cb);
|
||||
bool add_callback_for_labels(std::list<rage::joaat_t> hashes, custom_label_callback&& cb);
|
||||
bool add_callback_for_labels(std::initializer_list<rage::joaat_t> hashes, custom_label_callback&& cb);
|
||||
bool add_label_overwrite(rage::joaat_t hash, std::string_view overwrite);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user