mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
refacto: remove get_gui_env & draw_load_screen from RenderingEngine singleton
This commit is contained in:
parent
a93712458b
commit
48d5abd5be
11 changed files with 38 additions and 46 deletions
|
@ -2047,8 +2047,8 @@ void Game::openInventory()
|
|||
|| !client->getScript()->on_inventory_open(fs_src->m_client->getInventory(inventoryloc))) {
|
||||
TextDest *txt_dst = new TextDestPlayerInventory(client);
|
||||
auto *&formspec = m_game_ui->updateFormspec("");
|
||||
GUIFormSpecMenu::create(formspec, client, &input->joystick, fs_src,
|
||||
txt_dst, client->getFormspecPrepend(), sound);
|
||||
GUIFormSpecMenu::create(formspec, client, m_rendering_engine->get_gui_env(),
|
||||
&input->joystick, fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
|
||||
formspec->setFormSpec(fs_src->getForm(), inventoryloc);
|
||||
}
|
||||
|
@ -2626,8 +2626,8 @@ void Game::handleClientEvent_ShowFormSpec(ClientEvent *event, CameraOrientation
|
|||
new TextDestPlayerInventory(client, *(event->show_formspec.formname));
|
||||
|
||||
auto *&formspec = m_game_ui->updateFormspec(*(event->show_formspec.formname));
|
||||
GUIFormSpecMenu::create(formspec, client, &input->joystick,
|
||||
fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
GUIFormSpecMenu::create(formspec, client, m_rendering_engine->get_gui_env(),
|
||||
&input->joystick, fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
}
|
||||
|
||||
delete event->show_formspec.formspec;
|
||||
|
@ -2639,8 +2639,8 @@ void Game::handleClientEvent_ShowLocalFormSpec(ClientEvent *event, CameraOrienta
|
|||
FormspecFormSource *fs_src = new FormspecFormSource(*event->show_formspec.formspec);
|
||||
LocalFormspecHandler *txt_dst =
|
||||
new LocalFormspecHandler(*event->show_formspec.formname, client);
|
||||
GUIFormSpecMenu::create(m_game_ui->getFormspecGUI(), client, &input->joystick,
|
||||
fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
GUIFormSpecMenu::create(m_game_ui->getFormspecGUI(), client, m_rendering_engine->get_gui_env(),
|
||||
&input->joystick, fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
|
||||
delete event->show_formspec.formspec;
|
||||
delete event->show_formspec.formname;
|
||||
|
@ -3332,8 +3332,8 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
|
|||
TextDest *txt_dst = new TextDestNodeMetadata(nodepos, client);
|
||||
|
||||
auto *&formspec = m_game_ui->updateFormspec("");
|
||||
GUIFormSpecMenu::create(formspec, client, &input->joystick, fs_src,
|
||||
txt_dst, client->getFormspecPrepend(), sound);
|
||||
GUIFormSpecMenu::create(formspec, client, m_rendering_engine->get_gui_env(),
|
||||
&input->joystick, fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
|
||||
formspec->setFormSpec(meta->getString("formspec"), inventoryloc);
|
||||
return false;
|
||||
|
@ -4082,8 +4082,8 @@ void Game::showDeathFormspec()
|
|||
LocalFormspecHandler *txt_dst = new LocalFormspecHandler("MT_DEATH_SCREEN", client);
|
||||
|
||||
auto *&formspec = m_game_ui->getFormspecGUI();
|
||||
GUIFormSpecMenu::create(formspec, client, &input->joystick,
|
||||
fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
GUIFormSpecMenu::create(formspec, client, m_rendering_engine->get_gui_env(),
|
||||
&input->joystick, fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
formspec->setFocus("btn_respawn");
|
||||
}
|
||||
|
||||
|
@ -4216,8 +4216,8 @@ void Game::showPauseMenu()
|
|||
LocalFormspecHandler *txt_dst = new LocalFormspecHandler("MT_PAUSE_MENU");
|
||||
|
||||
auto *&formspec = m_game_ui->getFormspecGUI();
|
||||
GUIFormSpecMenu::create(formspec, client, &input->joystick,
|
||||
fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
GUIFormSpecMenu::create(formspec, client, m_rendering_engine->get_gui_env(),
|
||||
&input->joystick, fs_src, txt_dst, client->getFormspecPrepend(), sound);
|
||||
formspec->setFocus("btn_continue");
|
||||
formspec->doPause = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue