ALEXANDER2020 Publicado 14 de Octubre del 2018 Reportar Compartir Publicado 14 de Octubre del 2018 Debes iniciar sesión para ver el contenido del enlace en esta publicación. NORMAL_COLOR = 0xffa08784 OVER_COLOR = 0xffe6d0a2 DOWN_COLOR = 0xffefe4cd def __init__(self): Window.__init__(self) self.eventFunc = None self.eventArgs = None self.text = TextLine() self.text.SetParent(self) self.text.SetPackedFontColor(self.NORMAL_COLOR) self.text.Show() self.underline = TextLine() self.underline.SetParent(self) self.underline.SetPackedFontColor(self.NORMAL_COLOR) self.underline.Hide() def __del__(self): Window.__del__(self) def SetText(self, text): self.text.SetText(text) self.SetSize(self.text.GetTextSize()[0], self.text.GetTextSize()[1]) self.underline.SetPosition(-20, self.text.GetTextSize()[1]) self.underline.SetWindowHorizontalAlignCenter() self.underline.SetSize(self.text.GetTextSize()[0], 0) def OnMouseOverIn(self): self.text.SetPackedFontColor(self.OVER_COLOR) self.underline.Show() def OnMouseOverOut(self): self.text.SetPackedFontColor(self.NORMAL_COLOR) self.underline.Hide() def OnMouseLeftButtonDown(self): self.text.SetPackedFontColor(self.DOWN_COLOR) self.underline.SetPackedFontColor(self.DOWN_COLOR) self.underline.Show() def OnMouseLeftButtonUp(self): if self.eventFunc: apply(self.eventFunc, self.eventArgs) self.OnMouseOverOut() def SetEvent(self, event, *args): self.eventFunc = event self.eventArgs = args kirito31, Ahmed Hosny, issam2004 y 3 mas reacciono a esto 6 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
TTV_RANDARON Publicado 15 de Octubre del 2018 Reportar Compartir Publicado 15 de Octubre del 2018 Yo la tenia en ingles pero no se donde la tengo y es elegante para el illumina Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Mensajes recomendados
Unirse a la conversación
Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.