mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 22:56:44 +00:00 
			
		
		
		
	Hide inventory window pin button in container, companion and barter mode. Restore the pinned inventory window position when exiting these modes. Allow toggling windows visibility in inventory mode only.
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			563 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			563 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef MWGUI_WINDOW_PINNABLE_BASE_H
 | |
| #define MWGUI_WINDOW_PINNABLE_BASE_H
 | |
| 
 | |
| #include "windowbase.hpp"
 | |
| 
 | |
| namespace MWGui
 | |
| {
 | |
|     class WindowManager;
 | |
| 
 | |
|     class WindowPinnableBase: public WindowBase
 | |
|     {
 | |
|     public:
 | |
|         WindowPinnableBase(const std::string& parLayout);
 | |
|         bool pinned() { return mPinned; }
 | |
|         void setPinButtonVisible(bool visible);
 | |
| 
 | |
|     private:
 | |
|         void onPinButtonClicked(MyGUI::Widget* _sender);
 | |
| 
 | |
|     protected:
 | |
|         virtual void onPinToggled() = 0;
 | |
| 
 | |
|         MyGUI::Widget* mPinButton;
 | |
|         bool mPinned;
 | |
|     };
 | |
| }
 | |
| 
 | |
| #endif
 |