예제 #1
0
	def MakeEachButton(self, i):
		if self.skin == 3:
			button = BarButton("TOP_MOST",0x50000000, 0x50404040, 0x50606060)
			button.SetParent(self.board)
			button.SetSize(106,26)
			button.SetPosition(self.sx + self.board.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(self.board)
			button.SetSize(200,26)
			button.SetPosition(self.sx + self.board.GetWidth()/2-100,self.sy+(event.GetLineCount(self.descIndex)+i*2)*16+20+5)
			button.SetText("a")
			button.SetTextColor(0xffffffff)
		return button
예제 #2
0
 def OnScroll(self):
     import math
     pos = self.scrollBar.GetPos()
     self.scrollPos = math.floor(
         float(pos) /
         float(float(1) / float(event.GetLineCount(self.descIndex) - 18)) +
         0.001)
     event.SetVisibleStartLine(self.descIndex, int(self.scrollPos))
     event.Skip(self.descIndex)