Book & Quill - Initial Commit

Implement Book & Quill:
- IUIScene_WritingBookMenu and UIScene_BookAndQuillMenu for UI
- Edited UIControl_Label to add direct editing (quite hardcoded to my needs right now)
- Reimplement scrapped custom payload packets for books and signing
- Other misc changes

TODO:
- Coloured and scambled text
- Book copying
- Clean up code
This commit is contained in:
SevenToaster509
2026-04-05 15:05:03 +01:00
parent 973c71ffde
commit 546a279cc9
49 changed files with 1800 additions and 115 deletions

View File

@@ -1528,12 +1528,15 @@ void Minecraft::run_middle()
}
}
for (int slot = 0; slot < 9; slot++)
{
if (g_KBMInput.IsKeyPressed('1' + slot))
//Prevent hotbar switching in menu
if (!ui.GetMenuDisplayed(0)) {
for (int slot = 0; slot < 9; slot++)
{
if (localplayers[i]->inventory)
localplayers[i]->inventory->selected = slot;
if (g_KBMInput.IsKeyPressed('1' + slot))
{
if (localplayers[i]->inventory)
localplayers[i]->inventory->selected = slot;
}
}
}
}
@@ -2637,6 +2640,12 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
case Item::expBottle_Id:
if (bUseItem) *piUse=IDS_TOOLTIPS_THROW;
break;
case Item::writingBook_Id:
*piUse = IDS_TOOLTIPS_OPEN;
break;
case Item::writtenBook_Id:
*piUse = IDS_TOOLTIPS_READ;
break;
}
}