[siberişlerboşiler] Questiondialog Bilgi sistemi EKLEME

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 33

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Selamun Aleyküm
TURKMMO
Sakinleri Forumdada paylaşılmış bazı fileslerde görmüşsünüzdür


uiciprit den py belirle diniz py lerin en altına ekliceniz kod bulogunu

Screenshot_2.png





Metin2 Sunucularında QuestionDialog Kullanımı ve Bilgi Sistemi Ekleme Rehberi

Metin2 özel sunucu geliştirme sürecinde kullanıcı deneyimini artırmak için QuestionDialog yapısı oldukça önemli bir rol oynar. Bu yapı sayesinde oyunculara bilgi mesajları göstermek, onay almak veya özel durumlarda seçim yaptırmak mümkün hale gelir.

QuestionDialog Nedir?

QuestionDialog, Metin2 özel sunucularında Python tabanlı arayüz sistemleri üzerinden çalışan bir pencere türüdür. Genellikle oyuncudan bir işlemi onaylamasını istemek veya bir soruya cevap vermesini sağlamak için kullanılır. Bu yapı, kullanıcıya iki seçenek sunar: Evet veya Hayır. Bu sayede sunucu tarafında tetiklenen işlemler oyuncunun kararına göre yönlendirilebilir.

Bilgi Sistemi Nedir?

Metin2 özel sunucularda bilgi sistemleri, oyunculara oyun içinde çeşitli verileri aktarmak amacıyla geliştirilen modüllerdir. Bu sistemler genellikle kullanıcıya özel görevler, envanter bilgileri, sunucu duyuruları veya PvP puan durumları gibi içerikleri sunar. Bilgi sistemleri genellikle Python GUI ile entegre edilerek uygulanır.

QuestionDialog ile Bilgi Sistemi Entegrasyonu

Bilgi sistemi içinde bir işlem yapılırken, oyuncudan onay alınması gereken durumlar oluşabilir. Örneğin, bir item silinecekse veya bir görev iptal edilecekse, QuestionDialog kullanarak oyuncuya 'Silmek istediğinizden emin misiniz?' gibi bir uyarı mesajı gösterebiliriz. Bu sayede kullanıcı hatalarını önleriz.

Kurulum Adımları

1. Py Root ve UIscript klasörlerine erişim sağlayın.
2. Yeni bir .py dosyası oluşturarak QuestionDialog sınıfını tanımlayın.
3. Bilgi sisteminizde bir buton veya menüye tıklanınca QuestionDialog penceresi açılsın.
4. Pencerede evet/hayır seçeneği sunularak, evet seçilirse bilgi sisteminde işlem yapılsın.

Python Kodu Örneği

class InfoQuestionDialog(ui.ThinBoard):
def __init__(self):
ui.ThinBoard.__init__(self)
self.__CreateDialog()

def __CreateDialog(self):
self.SetSize(300, 100)
self.SetCenterPosition()
self.SetAlwaysRender(True)

btnYes = ui.Button()
btnYes.SetParent(self)
btnYes.SetText('Evet')
btnYes.SetEvent(lambda: self.__OnYesClick())

btnNo = ui.Button()
btnNo.SetParent(self)
btnNo.SetText('Hayır')
btnNo.SetEvent(lambda: self.Hide())


Avantajlar

Oyuncu güvenliği artar.
Hatalı işlem riski azalır.
Oyun içi kullanıcı etkileşimi gelişir.

Sonuç

QuestionDialog yapısı, Metin2 özel sunucularında kullanıcı dostu sistemler geliştirmek için güçlü bir araçtır. Bilgi sistemleriyle birleştirildiğinde hem güvenlik hem de kullanıcı deneyimi ciddi anlamda artırılır.


Using QuestionDialog and Adding Information Systems in Metin2 Servers

In the process of developing Metin2 private servers, the QuestionDialog structure plays an important role in enhancing the user experience. This structure allows displaying information messages to players, obtaining confirmations, or prompting selections in special cases.

What is QuestionDialog?

QuestionDialog is a type of window used in Metin2 private servers through Python-based interface systems. It is typically used to request player confirmation or responses by presenting two options: Yes or No. This enables server-side operations to be directed according to the player's decision.

What is an Information System?

Information systems in Metin2 private servers are modules developed to provide various data to players within the game. These systems often display custom quests, inventory details, server announcements, or PvP scores. They are usually implemented integrated with Python GUI.

Integration of QuestionDialog with Information Systems

While performing actions within the information system, there may be situations where player approval is required. For example, if an item needs to be deleted or a quest canceled, you can use QuestionDialog to show a warning like 'Are you sure you want to delete this?'. This helps prevent user errors.

Installation Steps

1. Access your Py Root and UIscript folders.
2. Create a new .py file and define the QuestionDialog class.
3. When a button or menu in your information system is clicked, open the QuestionDialog window.
4. Provide Yes/No options in the dialog, and execute the action in the system if Yes is selected.

Sample Python Code

class InfoQuestionDialog(ui.ThinBoard):
def __init__(self):
ui.ThinBoard.__init__(self)
self.__CreateDialog()

def __CreateDialog(self):
self.SetSize(300, 100)
self.SetCenterPosition()
self.SetAlwaysRender(True)

btnYes = ui.Button()
btnYes.SetParent(self)
btnYes.SetText('Yes')
btnYes.SetEvent(lambda: self.__OnYesClick())

btnNo = ui.Button()
btnNo.SetParent(self)
btnNo.SetText('No')
btnNo.SetEvent(lambda: self.Hide())


Benefits

Increases player security.
Reduces chance of incorrect operations.
Improves in-game user interaction.

Conclusion

The QuestionDialog structure is a powerful tool for developing user-friendly systems in Metin2 private servers. Combined with information systems, it significantly improves both security and user experience.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Geri
Üst Alt