# ๐Ÿ“‹ CENTRAL POPUP SYSTEM - Complete Guide **Date**: December 13, 2025, 01:09 --- ## โœ… WHAT IT DOES ### **Central Popups** - Appears in **CENTER** of screen - Always **in front** of player - Pauses game (optional) - Easy to read and interact - Beautiful animations ### **Types of Popups** 1. **Quest** - Quest dialogs (๐Ÿ“œ) 2. **Story** - Story moments (๐Ÿ“–) 3. **Info** - Information (โ„น๏ธ) 4. **Success** - Success messages (โœ…) 5. **Warning** - Warnings (โš ๏ธ) 6. **Error** - Errors (โŒ) --- ## ๐ŸŽฎ HOW TO USE ### **Show Quest:** ```javascript scene.centralPopup.showQuest( 'First Harvest', 'Plant and harvest your first crops!', ['Plant 5 seeds', 'Water them', 'Harvest when ready'] ); ``` ### **Show Story:** ```javascript scene.centralPopup.showStory( 'Welcome to NovaFarma', 'You arrive at an abandoned farm. Time to rebuild!', 'farm_image' // optional image ); ``` ### **Show Notification:** ```javascript scene.centralPopup.showNotification('Quest completed!', 'success'); scene.centralPopup.showNotification('Low health!', 'warning'); ``` ### **Custom Popup:** ```javascript scene.centralPopup.showPopup({ title: 'Custom Title', message: 'Your message here', type: 'info', icon: '๐ŸŽ‰', buttons: [ { text: 'Yes', callback: () => console.log('Yes!') }, { text: 'No', action: 'close' } ], autoClose: false }); ``` --- ## ๐ŸŽจ FEATURES ### **Automatic Positioning** - Always centered on screen - Responsive to screen size - Scrolls with camera ### **Beautiful Design** - Rounded corners - Colored borders (based on type) - Smooth animations - Dark overlay behind ### **Interactive** - Multiple buttons - Hover effects - Click handlers - Auto-close option ### **Game Integration** - Pauses game (optional) - Sound effects - Queue system (multiple popups) - Priority levels --- ## ๐Ÿ“Š POPUP TYPES & COLORS | Type | Color | Border | Icon | Use For | |------|-------|--------|------|---------| | Quest | Brown | Gold | ๐Ÿ“œ | Quests, missions | | Story | Dark Blue | Purple | ๐Ÿ“– | Story moments | | Info | Dark Gray | Gray | โ„น๏ธ | Information | | Success | Dark Green | Green | โœ… | Achievements | | Warning | Dark Red | Red | โš ๏ธ | Warnings | | Error | Dark Red | Red | โŒ | Errors | --- ## ๐Ÿ”ง SETTINGS ### **Enable/Disable:** ```javascript scene.centralPopup.settings.enabled = false; // Disable ``` ### **Auto-Close:** ```javascript scene.centralPopup.settings.autoClose = true; scene.centralPopup.settings.autoCloseDelay = 5000; // 5 seconds ``` ### **Pause Game:** ```javascript scene.centralPopup.settings.pauseGameOnPopup = true; ``` ### **Sound:** ```javascript scene.centralPopup.settings.soundOnPopup = true; ``` --- ## ๐Ÿ’ก EXAMPLES ### **Quest Accept/Decline:** ```javascript scene.centralPopup.showPopup({ title: 'New Quest Available', message: 'Help the farmer harvest crops!', type: 'quest', icon: '๐Ÿ“œ', buttons: [ { text: 'Accept', callback: () => { // Start quest scene.questSystem.startQuest('harvest_quest'); } }, { text: 'Decline', action: 'close' } ], autoClose: false }); ``` ### **Story Cutscene:** ```javascript scene.centralPopup.showStory( 'Day 1', 'The sun rises over your new farm. Time to get to work!', 'sunrise_image' ); ``` ### **Achievement:** ```javascript scene.centralPopup.showNotification( 'Achievement Unlocked: First Harvest!', 'success' ); ``` --- ## ๐ŸŽ‰ RESULT **Perfect for:** - โœ… Quest dialogs - โœ… Story moments - โœ… Important notifications - โœ… Achievements - โœ… Warnings - โœ… Any message that needs attention! **Always visible, always centered, always beautiful!** ๐Ÿ“‹โœจ --- **Osveลพi igro s F5 da vidiลก!** ๐Ÿ”„ *Created: December 13, 2025, 01:09*