TysonDMG 6 Posted May 20, 2018 Share Posted May 20, 2018 (edited) Stie cineva cum pot sa fac bara de anunt asa de mare..? Does anyone know how to do that? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Mali 41921 Posted May 20, 2018 Honorable Member Share Posted May 20, 2018 You mean:https://paste2.org/HpgxeWtP Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19685 Posted May 20, 2018 Honorable Member Share Posted May 20, 2018 No, that is the multiline version of the bigboard for ox-quiz, he is looking for this: Spoiler if app.ENABLE_12ZI: class MissionBoard(ui.Bar): FONT_HEIGHT = 15 LINE_HEIGHT = FONT_HEIGHT + 5 STEP_HEIGHT = LINE_HEIGHT + 5 LONG_TEXT_START_X = 300 SCREEN_WIDTH = wndMgr.GetScreenWidth() def __init__(self): ui.Bar.__init__(self) self.AddFlag("not_pick") self.missionText = None self.missionFullText = None self.curPos = 0 self.dstPos = -5 self.nextScrollTime = 0 self.flowMode = False self.ScrollStartTime = 0.0 self.SetPosition(0, 100) self.SetSize(self.SCREEN_WIDTH, 35) self.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.5)) self.SetWindowHorizontalAlignCenter() self.__CreateTextBar() def __del__(self): ui.Bar.__del__(self) def __CreateTextBar(self): x, y = self.GetGlobalPosition() self.textBar = BigTextBar(self.SCREEN_WIDTH*2, 300, self.FONT_HEIGHT) self.textBar.SetParent(self) self.textBar.SetPosition(6, 8) self.textBar.SetTextColor(242, 231, 193) self.textBar.SetClipRect(0, y, self.SCREEN_WIDTH, y+8+self.STEP_HEIGHT) self.textBar.Show() def CleanMission(self): self.missionText = None self.missionFullText = None self.textBar.ClearBar() self.Hide() def __RefreshBoard(self): self.textBar.ClearBar() if self.missionFullText: (text_width, text_height) = self.textBar.GetTextExtent(self.missionFullText) if text_width>self.SCREEN_WIDTH: self.textBar.TextOut(0, (self.STEP_HEIGHT-8-text_height)/2, self.missionFullText) self.flowMode = True else: self.textBar.TextOut((wndMgr.GetScreenWidth()-text_width)/2, (self.STEP_HEIGHT-8-text_height)/2, self.missionFullText) self.flowMode = False def SetMission(self, text): self.__AppendText(text) self.__RefreshBoard() if self.flowMode: self.dstPos = -text_width self.curPos = self.LONG_TEXT_START_X self.textBar.SetPosition(3 + self.curPos, 8) else: self.dstPos = 0 self.curPos = self.STEP_HEIGHT self.textBar.SetPosition(3, 8 + self.curPos) if not self.IsShow(): self.Show() def SetSubMission(self, text): self.missionFullText = self.missionText + text preflowMode = self.flowMode self.__RefreshBoard() if preflowMode != self.flowMode: if self.flowMode: self.dstPos = -text_width self.curPos = self.LONG_TEXT_START_X self.textBar.SetPosition(3 + self.curPos, 8) else: self.dstPos = 0 self.curPos = self.STEP_HEIGHT self.textBar.SetPosition(3, 8 + self.curPos) def __AppendText(self, text): if text == "": self.CleanMission() return self.missionText = text self.missionFullText = text def OnUpdate(self): if self.missionFullText == None: self.Hide() return if self.dstPos < self.curPos: self.curPos -= 1 if self.flowMode: self.textBar.SetPosition(3 + self.curPos, 8) else: self.textBar.SetPosition(3, 8 + self.curPos) else: if self.flowMode: self.curPos = self.SCREEN_WIDTH This is the part of the game.py: if app.ENABLE_12ZI: def BINARY_SetMissionMessage(self, message): self.interface.missionBoard.SetMission(message) def BINARY_SetSubMissionMessage(self, message): self.interface.missionBoard.SetSubMission(message) def BINARY_CleanMissionMessage(self): self.interface.missionBoard.CleanMission() And some declarations in the interfaceModule.py like the rest of the tipboards. The rest is c++. Link to comment Share on other sites More sharing options...
TysonDMG 6 Posted May 21, 2018 Author Share Posted May 21, 2018 (edited) Acum 7 ore, xP3NG3Rx a spus: No, that is the multiline version of the bigboard for ox-quiz, he is looking for this: Ascunde conținuturi if app.ENABLE_12ZI: class MissionBoard(ui.Bar): FONT_HEIGHT = 15 LINE_HEIGHT = FONT_HEIGHT + 5 STEP_HEIGHT = LINE_HEIGHT + 5 LONG_TEXT_START_X = 300 SCREEN_WIDTH = wndMgr.GetScreenWidth() def __init__(self): ui.Bar.__init__(self) self.AddFlag("not_pick") self.missionText = None self.missionFullText = None self.curPos = 0 self.dstPos = -5 self.nextScrollTime = 0 self.flowMode = False self.ScrollStartTime = 0.0 self.SetPosition(0, 100) self.SetSize(self.SCREEN_WIDTH, 35) self.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.5)) self.SetWindowHorizontalAlignCenter() self.__CreateTextBar() def __del__(self): ui.Bar.__del__(self) def __CreateTextBar(self): x, y = self.GetGlobalPosition() self.textBar = BigTextBar(self.SCREEN_WIDTH*2, 300, self.FONT_HEIGHT) self.textBar.SetParent(self) self.textBar.SetPosition(6, 8) self.textBar.SetTextColor(242, 231, 193) self.textBar.SetClipRect(0, y, self.SCREEN_WIDTH, y+8+self.STEP_HEIGHT) self.textBar.Show() def CleanMission(self): self.missionText = None self.missionFullText = None self.textBar.ClearBar() self.Hide() def __RefreshBoard(self): self.textBar.ClearBar() if self.missionFullText: (text_width, text_height) = self.textBar.GetTextExtent(self.missionFullText) if text_width>self.SCREEN_WIDTH: self.textBar.TextOut(0, (self.STEP_HEIGHT-8-text_height)/2, self.missionFullText) self.flowMode = True else: self.textBar.TextOut((wndMgr.GetScreenWidth()-text_width)/2, (self.STEP_HEIGHT-8-text_height)/2, self.missionFullText) self.flowMode = False def SetMission(self, text): self.__AppendText(text) self.__RefreshBoard() if self.flowMode: self.dstPos = -text_width self.curPos = self.LONG_TEXT_START_X self.textBar.SetPosition(3 + self.curPos, 8) else: self.dstPos = 0 self.curPos = self.STEP_HEIGHT self.textBar.SetPosition(3, 8 + self.curPos) if not self.IsShow(): self.Show() def SetSubMission(self, text): self.missionFullText = self.missionText + text preflowMode = self.flowMode self.__RefreshBoard() if preflowMode != self.flowMode: if self.flowMode: self.dstPos = -text_width self.curPos = self.LONG_TEXT_START_X self.textBar.SetPosition(3 + self.curPos, 8) else: self.dstPos = 0 self.curPos = self.STEP_HEIGHT self.textBar.SetPosition(3, 8 + self.curPos) def __AppendText(self, text): if text == "": self.CleanMission() return self.missionText = text self.missionFullText = text def OnUpdate(self): if self.missionFullText == None: self.Hide() return if self.dstPos < self.curPos: self.curPos -= 1 if self.flowMode: self.textBar.SetPosition(3 + self.curPos, 8) else: self.textBar.SetPosition(3, 8 + self.curPos) else: if self.flowMode: self.curPos = self.SCREEN_WIDTH This is the part of the game.py: if app.ENABLE_12ZI: def BINARY_SetMissionMessage(self, message): self.interface.missionBoard.SetMission(message) def BINARY_SetSubMissionMessage(self, message): self.interface.missionBoard.SetSubMission(message) def BINARY_CleanMissionMessage(self): self.interface.missionBoard.CleanMission() And some declarations in the interfaceModule.py like the rest of the tipboards. The rest is c++. i don't need for mission's exemple: /n Hello Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted May 21, 2018 Premium Share Posted May 21, 2018 This is from zodiac dungeon. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now