Client Systems & Python UI
Metin2 inventory sidebar: optional action buttons and lifecycle fixes
M2City Client · Editorial · Published 2026-11-05 · Branch-specific details should be checked against your own source.
Three sets of sidebar button icons for shop search, switchbot and special inventory, with a reviewed legacy Python 2.7 helper. This is a shortcut interface for systems you already have. It does not implement any of those server/client subsystems or authorize their use.
M2City r1 fixes
The original shows all three buttons but only wires one; assumes an optional app.ENABLE_SWITCHBOT attribute; binds the interface before guaranteed creation; and relies on an extra ui.py InvisibleBoard plus incomplete teardown. The replacement uses ordinary Window/Button objects, creates one reusable sidebar independently of belt inventory and shows only explicitly mapped callable actions. It retains weak inventory/interface references and clears button callbacks and owned references on logout. Repeated opening does not create new buttons. Positioning clamps to the supplied screen size and tries the inventory's right side when the left edge has no room.
Integration
Copy the nine original TGA icons to ymir work/ui/game/windows in the client pack and copy reviewed/uiinventorysidebar.py into root. Do not install the original ui.py or inventory_sidebar.py patches alongside this version. Create one sidebar in InventoryWindow after its native initialization, then bind the real Interface after creation. The supplied mapping example uses ToggleSwitchbotWindow; shop and special inventory require the exact existing public no-argument method names in your own fork. Unmapped/missing methods produce no button, rather than a dead control. Remove mappings when disabling a subsystem.
Merge Open into InventoryWindow.Show, Close into Hide/Close, and Destroy into logout cleanup. Pass your current screen dimensions on opening, inventory movement and resolution changes. Keep Interface.HideAllWindows and any native hide-window collection consistent so the sidebar cannot remain visible by itself. The integration checklist covers initialization order, translations, z-order and lifecycle. Existing backend permission checks must remain in the mapped methods. No protocol, database or native API change is required.
Validation and provenance
All three supplied text files were reviewed and all nine 36x37 TGA images decoded and visually inspected. Fake-widget tests cover three callbacks, missing actions, weak owner expiry, hidden inventory, screen edges, undersized screens, 100 repeated opens without replacement and 100 teardown cycles. These tests do not prove compatibility with your renderer; no real Metin2 login/logout or subsystem integration was tested. Verify those steps in staging before releasing to players.
The archive name refers to Aeldra-style buttons; an exact upstream author/release was not established. A related discussion about inventory button integration is linked below, without asserting it is this identical archive. Original archive/notices retained. Redistribution confirmed by the supplying owner; no blanket open-source licence is asserted.
Related inventory-button integration discussion
Editorial resource — M2City
Version: Owner-supplied legacy integration; M2City r1 (2026-11-04); exact fork unspecified
Rights: Owner explicitly confirmed public redistribution. Preserve original notices; no open-source relicensing.
Validation: All three text files reviewed and nine 36x37 TGA icons decoded. Fake-widget tests cover missing mappings/methods, three callbacks, weak owner expiry, hidden inventory, screen bounds, 100 reopen cycles without replacement and 100 teardown cycles. No actual Metin2 renderer, login/logout or subsystem integration test.
Source: Owner-supplied archive, reviewed files and retained notices; exact upstream release not established
SHA-256: 8d78f8df5c5a446c1828aaae4ac07c5b90df66a139494de4b7b8b60ae01503ff
Download package
3 download options · Sign in to download
metin2-inventory-sidebar-buttons-m2city-r1.zipM2City downloadmetin2-inventory-sidebar-buttons-m2city-r1.zipGoogle Drive mirrormetin2-inventory-sidebar-buttons-m2city-r1.zipMEGA mirrorMAKE THE NEXT ANSWER BETTER
What happened on your build?
Share a small example, the exact error and how you verified your fix. The discussion is open on the forum.
Need a scoped quest, UI or proto fix? · Explore more development guides · Check your proto files free