Ana Sayfa / Kod ve Scriptler / Toast Notifications And Achievement System

Toast Notifications And Achievement System

Başarım Açıldı ve Sistem Uyarısı Açılır Pencereleri - Tamamen özelleştirilebilir CSS, üst üste yığılabilen mesajlar ve mobil uyumlu animasyonlar.

  • Yayın tarihi10 Şubat 2026
  • Paket içeriği.css, .html, JavaScript .js
  • Son güncelleme10 Şubat 2026
Toast Notifications And Achievement System

Overview

Give Your Game Immediate Visual Polish.

Players need feedback. When they click save, buy an item, or unlock a new level, they expect a visual confirmation. The Toast Notification System handles all of this UI logic for you.

Why use this system?

  • Stackable Logic: If a player unlocks 3 achievements at once, this system queues them up so they slide in one by one (or stack nicely), rather than overlapping messily.
  • CSS Animations: Smooth hardware-accelerated slide-in and fade-out effects.
  • 4 Built-in Types: Success (Green), Error (Red), Info (Blue), and Warning (Orange).
  • Zero Dependencies: No jQuery, no Bootstrap. Just pure lightweight JavaScript.

Features

  • Auto-Dismiss: Messages fade away automatically after 3 seconds (configurable).
  • Sound Support: Easily attach a .play() sound effect to specific notification types.
  • HTML Support: You can put icons (<i>) or bold text inside the notifications.
  • Mobile Responsive: Scales perfectly for phone screens.

Requirements

  • Basic understanding of HTML and JavaScript.
  • A code editor (VS Code, Sublime Text, Notepad++, etc.).
  • A modern web browser (Chrome, Firefox, Safari, Edge).
  • NO external libraries required (No jQuery, No Bootstrap).
  • Works with any HTML5 game engine (Construct 3, Phaser, Godot HTML5 export, or custom code).