diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp')
| -rw-r--r-- | Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp index 569cc8ba..0895cdff 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp @@ -21,7 +21,7 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void *_initData, UILayer *p InventoryScreenInput *initData = (InventoryScreenInput *)_initData; - shared_ptr<SimpleContainer> creativeContainer = shared_ptr<SimpleContainer>(new SimpleContainer( 0, TabSpec::MAX_SIZE )); + shared_ptr<SimpleContainer> creativeContainer = shared_ptr<SimpleContainer>(new SimpleContainer( 0, L"", false, TabSpec::MAX_SIZE )); itemPickerMenu = new ItemPickerMenu(creativeContainer, initData->player->inventory); Initialize( initData->iPad, itemPickerMenu, false, -1, eSectionInventoryCreativeUsing, eSectionInventoryCreativeMax, initData->bNavigateBack); @@ -158,26 +158,6 @@ void UIScene_CreativeMenu::handleOtherClicked(int iPad, ESceneSection eSection, } } -void UIScene_CreativeMenu::ScrollBar(UIVec2D pointerPos) -{ - float fPosition = ((float)pointerPos.y - (float)m_TouchInput[ETouchInput_TouchSlider].getYPos()) / (float)m_TouchInput[ETouchInput_TouchSlider].getHeight(); - - // clamp - if(fPosition > 1) - fPosition = 1.0f; - else if(fPosition < 0) - fPosition = 0.0f; - - // calculate page position according to page count - int iCurrentPage = Math::round(fPosition * (specs[m_curTab]->getPageCount() - 1)); - - // set tab page - m_tabPage[m_curTab] = iCurrentPage; - - // update tab - switchTab(m_curTab); -} - void UIScene_CreativeMenu::handleReload() { Initialize( m_iPad, m_menu, false, -1, eSectionInventoryCreativeUsing, eSectionInventoryCreativeMax, m_bNavigateBack ); @@ -191,6 +171,10 @@ void UIScene_CreativeMenu::handleReload() { m_slotListHotbar.addSlot(i); } + + ECreativeInventoryTabs lastTab = m_curTab; + m_curTab = eCreativeInventoryTab_COUNT; + switchTab(lastTab); } void UIScene_CreativeMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled) |
