SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def __ModelPreview(self, Vnum):
  2.         RENDER_TARGET_INDEX = 1
  3.  
  4.         self.ModelPreviewBoard = ui.ThinBoard()
  5.         self.ModelPreviewBoard.SetParent(self)
  6.         self.ModelPreviewBoard.SetSize(190+10, 210+30-12)
  7.         self.ModelPreviewBoard.SetPosition(-202, 0)
  8.         self.ModelPreviewBoard.Show()
  9.  
  10.         self.ModelPreview = ui.RenderTarget()
  11.         self.ModelPreview.SetParent(self.ModelPreviewBoard)
  12.         self.ModelPreview.SetSize(190, 210)
  13.         self.ModelPreview.SetPosition(5, 22-12)
  14.         self.ModelPreview.SetRenderTarget(RENDER_TARGET_INDEX)
  15.         self.ModelPreview.Show()
  16.  
  17.         self.ModelPreviewText = ui.TextLine()
  18.         self.ModelPreviewText.SetParent(self.ModelPreviewBoard)
  19.         self.ModelPreviewText.SetFontName(self.defFontName)
  20.         self.ModelPreviewText.SetPackedFontColor(grp.GenerateColor(0.8824, 0.9804, 0.8824, 1.0))
  21.         self.ModelPreviewText.SetPosition(0, 5)
  22.         self.ModelPreviewText.SetText("")
  23.         self.ModelPreviewText.SetOutline()
  24.         self.ModelPreviewText.SetFeather(False)
  25.         self.ModelPreviewText.SetWindowHorizontalAlignCenter()
  26.         self.ModelPreviewText.SetHorizontalAlignCenter()
  27.         self.ModelPreviewText.Show()
  28.  
  29.         renderTarget.SetBackground(RENDER_TARGET_INDEX, "d:/ymir work/ui/game/myshop_deco/model_view_bg.sub")
  30.         renderTarget.SetVisibility(RENDER_TARGET_INDEX, True)
  31.         renderTarget.SelectModel(RENDER_TARGET_INDEX, Vnum)
  32.  
  33.     def __ModelPreviewClose(self):
  34.         RENDER_TARGET_INDEX = 1
  35.  
  36.         if self.ModelPreviewBoard:
  37.             self.ModelPreviewBoard.Hide()
  38.             self.ModelPreview.Hide()
  39.  
  40.             self.ModelPreviewBoard = None
  41.             self.ModelPreview = None
  42.  
  43.             renderTarget.SetVisibility(RENDER_TARGET_INDEX, False)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top