Honorable Member Tatsumaru 5266 Posted April 26, 2018 Honorable Member Share Posted April 26, 2018 (edited) Hello How to lower these buttons? I suspect that in the uiquest.py file, but where exactly? Or maybe somewhere else? Edited August 21, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
MindShift 0 Posted April 26, 2018 Share Posted April 26, 2018 (edited) 4 hours ago, Tatsumaru said: Hello How to lower these buttons? I suspect that in the uiquest.py file, but where exactly? Or maybe somewhere else? I think is at class BarButton, you need to edit it Try to use this: class BarButton(ui.Button): ColorUp = 0x40999999 ColorDown = 0x40aaaacc ColorOver = 0x40ddddff UP=0 DOWN=1 OVER=2 def __init__(self, layer = "UI", aColorUp = ColorUp, aColorDown = ColorDown, aColorOver = ColorOver): ui.Button.__init__(self,layer) self.state = self.UP self.colortable = aColorUp, aColorDown, aColorOver def OnRender(self): x,y = self.GetGlobalPosition() grp.SetColor(self.colortable[self.state]) grp.RenderBar(x,y,self.GetWidth(),self.GetHeight()) def CallEvent(self): self.state = self.UP ui.Button.CallEvent(self) def DownEvent(self): self.state = self.DOWN def ShowToolTip(self): self.state = self.OVER def HideToolTip(self): self.state = self.UP Edited August 21, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Tatsumaru 5266 Posted May 4, 2018 Author Honorable Member Share Posted May 4, 2018 (edited) I've done it, but now I have a problem with the icon. Will someone say something? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Tatsumaru 5266 Posted May 4, 2018 Author Honorable Member Share Posted May 4, 2018 up Link to comment Share on other sites More sharing options...
[RaffaeL] 28 Posted May 5, 2018 Share Posted May 5, 2018 (edited) La 26.04.2018 la 5:56, Tatsumaru a spus: Hello How to lower these buttons? I suspect that in the uiquest.py file, but where exactly? Or maybe somewhere else? Change the "MakeEachButton" as I have below, or add more "say ("")" before that dialog in quest. def MakeEachButton(i): if self.skin == 3: button = BarButton("TOP_MOST",0x50000000, 0x50404040, 0x50606060) button.SetParent(c) button.SetSize(106,26) button.SetPosition(self.sx+c.GetWidth()/2+((i*2)-1)*56-56, self.sy+(event.GetLineCount(self.descIndex))*16+20+5) button.SetText("a") button.SetTextColor(0xff000000) else: i = i % 8 button = BarButton("TOP_MOST") button.SetParent(c) button.SetSize(200,26) button.SetPosition(self.sx+c.GetWidth()/2-100,self.sy+(event.GetLineCount(self.descIndex)+i*2)*16+20+5) button.SetText("a") button.SetTextColor(0xffffffff) return button Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 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