MCPcopy Create free account
hub / github.com/davemoore22/sorcery / _draw_map_tile

Method _draw_map_tile

src/core/ui.cpp:4195–4271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4193 return Flags{std::ref(modal_inspect->show)};
4194
4195 if (name == "stay_menu")
4196 return Flags{std::ref(modal_stay->show)};
4197
4198 if (name == "help_menu")
4199 return Flags{std::ref(modal_help->show)};
4200
4201 if (name == "tithe_menu")
4202 return Flags{std::ref(modal_tithe->show), std::ref(input_donate->show)};
4203
4204 if (name == "identify_menu")
4205 return Flags{std::ref(modal_identify->show)};
4206
4207 if (name == "equip_menu")
4208 return Flags{std::ref(modal_equip->show)};
4209
4210 if (name == "remove_item_menu")
4211 return Flags{std::ref(modal_remove->show)};
4212
4213 if (name == "spell_menu")
4214 return Flags{std::ref(modal_spell->show)};
4215
4216 if (name == "drop_menu")
4217 return Flags{std::ref(modal_drop->show)};
4218
4219 if (name == "use_menu")
4220 return Flags{std::ref(modal_use->show)};
4221
4222 if (name == "invoke_menu")
4223 return Flags{std::ref(modal_invoke->show)};
4224
4225 if (name == "trade_menu")
4226 return Flags{std::ref(modal_trade->show), std::ref(modal_give->show)};
4227
4228 if (name == "give_menu")
4229 return Flags{std::ref(modal_give->show)};
4230
4231 return {};
4232}
4233
4234auto Sorcery::UI::_handle_menu_reordering(const std::string_view name,
4235 std::vector<std::string> &items,
4236 std::vector<int> &data,
4237 const std::size_t index,
4238 const int data_item) -> void {
4239
4240 if (name != "reorder_menu" || data_item == -1)
4241 return;
4242
4243 const auto source_index{static_cast<int>(index)};
4244
4245 with_DragDropSource(ImGuiDragDropFlags_None) {
4246 ImGui::SetDragDropPayload("REORDER_CELL", &source_index,
4247 sizeof(source_index));
4248 }
4249
4250 with_DragDropTarget {
4251 const auto payload{ImGui::AcceptDragDropPayload("REORDER_CELL")};
4252

Callers

nothing calls this directly

Calls 3

unenumFunction · 0.85
isMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected