Jump to content

fratello

Inactive Member
  • Posts

    4
  • Joined

  • Last visited

  • Feedback

    0%

About fratello

Informations

  • Gender
    Male
  • Country
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

fratello's Achievements

Explorer

Explorer (4/16)

  • First Post
  • Conversation Starter
  • Dedicated
  • One Month Later
  • Reacting Well

Recent Badges

88

Reputation

  1. Download Alternative download links → MediaFire Happy Easter, everyone! A little gift from me to you <3] Title says
  2. Window Mode Centered on Screen I saw a lot of posts about the wrong window position (7-pixel offset and similar bugs), but none of them actually fixed it for me. So I wrote a quick and clean solution — simple but works 100%. Code is wrapped in #ifdef ENABLE_WINDOW_START_CENTER_FRATELLO so you can toggle it easily. Windowed mode: starts centered on the screen Fullscreen: starts at (0, 0) Without define: keeps the default behavior (bAnotherWindow bottom-right) Nothing fancy, just practical saved me some time, maybe it’ll save yours too. Step 1: defines.h / locale_inc.h #define ENABLE_WINDOW_START_CENTER_FRATELLO Step 2: SEARCH Userinterface/Pythonapplication.cpp if (Windowed) { m_isWindowed = true; if (bAnotherWindow) { RECT rc; GetClientRect(&rc); int windowWidth = rc.right - rc.left; int windowHeight = (rc.bottom - rc.top); CMSApplication::SetPosition(GetScreenWidth() - windowWidth, GetScreenHeight() - 60 - windowHeight); } } else { m_isWindowed = false; SetPosition(0, 0); } Step 3: replace #ifdef ENABLE_WINDOW_START_CENTER_FRATELLO if (Windowed) { m_isWindowed = true; RECT rcScreen; ::GetWindowRect(GetDesktopWindow(), &rcScreen); int screenW = rcScreen.right - rcScreen.left; int screenH = rcScreen.bottom - rcScreen.top; RECT rcWindow; ::GetWindowRect(GetWindowHandle(), &rcWindow); int windowW = rcWindow.right - rcWindow.left; int windowH = rcWindow.bottom - rcWindow.top; int posX = (screenW - windowW) / 2; int posY = (screenH - windowH) / 2; SetPosition(posX, posY); } else { m_isWindowed = false; SetPosition(0, 0); } #else if (Windowed) { m_isWindowed = true; if (bAnotherWindow) { RECT rc; GetClientRect(&rc); int windowWidth = rc.right - rc.left; int windowHeight = (rc.bottom - rc.top); CMSApplication::SetPosition(GetScreenWidth() - windowWidth, GetScreenHeight() - 60 - windowHeight); } } else { m_isWindowed = false; SetPosition(0, 0); } #endif FINISH
      • 2
      • Metin2 Dev
      • Love
  3. I got tired of pressing F1 or logging in manually every time I started the client. So I built my own solution. This system enables direct login from the LoginWindow using a predefined account. It is designed for developers who frequently restart the client, repack/unpack, and test, without wasting time on repetitive login steps. An optional auto-login mode is available: Once the EXE is launched, the login is executed automatically without any hotkey. Alternatively, login can be triggered manually via a hotkey, depending on the configuration. Configuration: DEV_AUTO_LOGIN = 1 Automatic login on startup, no hotkey required DEV_AUTO_LOGIN = 0 Manual login via hotkey (e.g. F1) Suitable for developers who want to streamline their workflow. # intrologin.py # 1.) Add at the very top, directly after the imports: DEV_AUTO_LOGIN = 1 # 1 = no hotkey required | 0 = hotkey required # 2.) In LoginWindow.Open() directly AFTER app.ShowCursor() insert: if DEV_AUTO_LOGIN: self.DEV_QuickLogin() # 3.) Add this at the very end of the file: def DEV_QuickLogin(self): DEV_ID = "USERNAME" # enter username DEV_PW = "PASSWORD" # enter password if self.serverBoard.IsShow(): self.__OnClickSelectServerButton() self.Connect(DEV_ID, DEV_PW) def OnKeyDown(self, key): if key == app.DIK_F1: # DIK_F1 #F2 #F3 can be changed self.DEV_QuickLogin() return True return False # Optional: (Automatic Enter in Character Select) # introselect.py # 1.) Add at the very top, directly after the imports: DEV_AUTO_ENTER_CHAR = 1 # 1 = auto enter | 0 = disabled # 2.) Search: app.ShowCursor() # 3.) Insert below: if DEV_AUTO_ENTER_CHAR: if self.slot >= 0: self.SelectSlot(self.slot) self.StartGame()
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.