WhatsApp Discord
Source Inicial - MU Sapphire Launcher - Red Dragon Edition - Source Mu - Mu Server Files
 

Source Inicial - MU Sapphire Launcher - Red Dragon Edition

Publicado por Dakosmu, Abr 04, 2026, 11:18 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Keywords Launcher

Dakosmu

Source Inicial - MU Sapphire Launcher - Red Dragon Edition

Regístrate para ver el enlace

Llevamos el diseño de launchers a un nivel más agresivo con la nueva edición MU Sapphire. Inspirado en el legendario Red Dragon, este launcher integra un sistema de doble verificación de archivos y una interfaz optimizada para resoluciones panorámicas.

imagen png
Regístrate para ver el enlace



Características Técnicas:
  • Dual Progress System: Monitoreo independiente para el archivo actual y el peso total de la actualización.
  • Sidebar Interactiva: 5 botones de acceso rápido integrados al diseño de cuero y metal.
  • Engine: Desarrollado íntegramente en Python 3.9+ con el framework PyQt6.
  • Recorte Alpha: Soporte nativo para el ala del dragón sobresaliendo del marco de la ventana.


import sys
import os
from PyQt6.QtWidgets import (QApplication, QMainWindow, QWidget, QPushButton,
                             QLabel, QProgressBar)
from PyQt6.QtCore import Qt, QPoint, QTimer
from PyQt6.QtGui import QPixmap

class MUSapphireLauncher(QMainWindow):
    def __init__(self):
        super().__init__()

        # Ventana sin bordes y transparente
        self.setWindowFlags(Qt.WindowType.FramelessWindowHint)
        self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)

        # Cargar imagen de MU Sapphire
        # Nota: Asegúrate de que el archivo se llame sapphire.png en tu carpeta
        image_path = "sapphire.png"
       
        self.pixmap = QPixmap(image_path)
        if self.pixmap.isNull():
            print("Error: No se encontró sapphire.png")
            sys.exit()
           
        self.setFixedSize(self.pixmap.size())

        self.container = QWidget(self)
        self.container.setFixedSize(self.pixmap.size())

        # Fondo del Launcher
        self.bg_label = QLabel(self.container)
        self.bg_label.setPixmap(self.pixmap)
        self.bg_label.setGeometry(0, 0, self.pixmap.width(), self.pixmap.height())

        # --- BARRAS DE PROGRESO (Estilo Sapphire) ---
       
        # Barra 1: Current Download
        self.current_bar = self.crear_barra(360, 715, 480, 5)
       
        # Barra 2: Total Progress
        self.total_bar = self.crear_barra(360, 775, 480, 8)

        # --- BOTONES LATERALES (Invisibles sobre el diseño) ---
       
        self.btn_website = self.crear_btn_invisible(845, 345, 120, 35)
        self.btn_forum = self.crear_btn_invisible(845, 395, 120, 35)
        self.btn_ranking = self.crear_btn_invisible(845, 445, 120, 35)
        self.btn_stats = self.crear_btn_invisible(845, 495, 120, 35)
        self.btn_news = self.crear_btn_invisible(845, 545, 120, 35)

        # Botón START (Central abajo)
        self.btn_start = QPushButton("", self.container)
        self.btn_start.setGeometry(505, 850, 200, 50)
        self.btn_start.setStyleSheet("background: transparent; border: none;")
        self.btn_start.clicked.connect(self.iniciar_juego)

        # Botón Cerrar (Esquina superior derecha del panel)
        self.btn_close = self.crear_btn_invisible(945, 160, 25, 25)
        self.btn_close.clicked.connect(self.close)

        # Animación de prueba
        self.timer = QTimer()
        self.timer.timeout.connect(self.update_progress)
        self.progreso = 0
        self.timer.start(50)

        self.old_pos = None

    def crear_barra(self, x, y, w, h):
        bar = QProgressBar(self.container)
        bar.setGeometry(x, y, w, h)
        bar.setTextVisible(False)
        bar.setStyleSheet(f"""
            QProgressBar {{
                background-color: rgba(50, 0, 0, 150);
                border: 1px solid #8b0000;
                border-radius: {h//2}px;
            }}
            QProgressBar::chunk {{
                background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0,
                                    stop:0 #ff4500, stop:1 #ff0000);
                border-radius: {h//2}px;
            }}
        """)
        return bar

    def crear_btn_invisible(self, x, y, w, h):
        btn = QPushButton("", self.container)
        btn.setGeometry(x, y, w, h)
        btn.setStyleSheet("background: transparent; border: none;")
        return btn

    def update_progress(self):
        if self.progreso < 100:
            self.progreso += 1
            self.current_bar.setValue(self.progreso)
            self.total_bar.setValue(self.progreso // 2)
        else:
            self.timer.stop()

    def iniciar_juego(self):
        print("Iniciando MU Sapphire...")

    def mousePressEvent(self, event):
        if event.button() == Qt.MouseButton.LeftButton:
            self.old_pos = event.globalPosition().toPoint()

    def mouseMoveEvent(self, event):
        if self.old_pos is not None:
            delta = QPoint(event.globalPosition().toPoint() - self.old_pos)
            self.move(self.x() + delta.x(), self.y() + delta.y())
            self.old_pos = event.globalPosition().toPoint()

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MUSapphireLauncher()
    window.show()
    sys.exit(app.exec())


Este diseño requiere que la imagen sapphire.png mantenga su canal alfa para que las garras y alas del dragón no muestren bordes blancos.

Asegúrate de ajustar los offsets de las barras si decides cambiar el tamaño de la imagen original.

Totalmente compatible con Windows 10/11 y sistemas de escalado de pantalla.

Keywords: MU Sapphire, Red Dragon Launcher, Python PyQt6, Mu Online Update, Game UI Design, Dakosmu Dev.

Recordatorio importante
Para evitar que se vea en negro como los anteriores:

Toma tu imagen de Sapphire y guárdala como sapphire.png (con transparencia).

Ponla en la misma carpeta que el código.

Usa el código que te acabo de dar, que ya tiene las rutas y coordenadas ajustadas para este diseño específico.
Bon Dia

Dakosmu

Bon Dia

🡱 🡳
Real Time Web Analytics