當前位置: 首頁>>代碼示例>>Python>>正文


Python BGL.glRectf方法代碼示例

本文整理匯總了Python中Blender.BGL.glRectf方法的典型用法代碼示例。如果您正苦於以下問題:Python BGL.glRectf方法的具體用法?Python BGL.glRectf怎麽用?Python BGL.glRectf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Blender.BGL的用法示例。


在下文中一共展示了BGL.glRectf方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: draw

# 需要導入模塊: from Blender import BGL [as 別名]
# 或者: from Blender.BGL import glRectf [as 別名]
	def draw(self):
		area = Window.GetAreaSize()
		w = area[0]; wPad = int(w*0.03)
		h = area[1]; hPad = int(h*0.03)
		BGL.glColor3f(0.3, 0.3, 0.3)
		BGL.glRectf(wPad-5, h-60, w-wPad+5, h-85)
		BGL.glColor3f(1.0,1.0,1.0)
		BGL.glRasterPos2i(wPad, h-75)
		Draw.Text('Chicken Configuration script', 'large')
		BGL.glRasterPos2i(wPad, h-100)
		Draw.Text('This script is launched the first time you run Chicken, or when a configuration error has been detected')

		BGL.glColor3f(0.5, 0.5, 0.5)
		BGL.glRectf(wPad, h-205, w-wPad, h-225)
		BGL.glColor3f(1.0,1.0,1.0)
		BGL.glRasterPos2i(wPad, h-220)
		Draw.Text('Binary Utilities - ')
		Draw.Text('if executables such as "pview" are on your PATH, you can leave this on Auto. Otherwise enter the folder manually')
		self.bBinPathAuto.update([wPad+5, h-250, w/2-wPad-5, 20])
		self.bBinPathManual.update([w/2, h-250, w/2-wPad-5, 20])

		if self.bBinPathManual.val:
			self.bBinPath.update([wPad+5, h-272, w-2*wPad-90, 20])
			self.bBinPathSel.update([w-wPad-85, h-272, 80, 20])
		self.bLaunch.update([wPad+5, h-330, 100, 20])
		self.bCheck.update([w-wPad-85, h-330, 80, 20])
		if self.error is not None:
			if self.error is True:
				BGL.glColor3f(1.0,0.0,0.0)
				BGL.glRasterPos2i(w-wPad-150, h-365)
				Draw.Text('Configuration error detected')
			else:
				BGL.glColor3f(0.0,0.0,0.0)
				BGL.glRasterPos2i(w-wPad-200, h-365)
				Draw.Text('Configuration checked and saved')
開發者ID:kralf,項目名稱:panda3d,代碼行數:37,代碼來源:chicken_config.py


注:本文中的Blender.BGL.glRectf方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。