Advertisement
Scriv07

ExampleMod

Apr 19th, 2016
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. ScriptName ExampleMod Extends SKI_WidgetBase
  2.  
  3.  
  4. ; @override SKI_WidgetBase
  5. Event OnWidgetInit()
  6. RegisterForMenu("RaceSex Menu")
  7. RegisterForMenu("Loading Menu")
  8. EndEvent
  9.  
  10.  
  11. Event OnMenuClose(string menuName)
  12. If(menuName == "Loading Menu")
  13. Utility.Wait(1.0)
  14. EndIf
  15.  
  16. SetPlayerName(Game.GetPlayer().GetDisplayName())
  17. EndEvent
  18.  
  19.  
  20. ; @overrides SKI_WidgetBase
  21. string Function GetWidgetSource()
  22. ;../Skyrim/Data/Interface/exported/widgets/
  23. return "ExampleWidget.swf"
  24. EndFunction
  25.  
  26.  
  27. ; @overrides SKI_WidgetBase
  28. string Function GetWidgetType()
  29. return "ExampleMod"
  30. EndFunction
  31.  
  32.  
  33.  
  34. Function SetVisible(bool aValue)
  35. If(Ready)
  36. UI.InvokeBool(HUD_MENU, WidgetRoot + ".setVisible", aValue)
  37. EndIf
  38. EndFunction
  39.  
  40.  
  41.  
  42. Function SetPlayerName(string asText)
  43. If(Ready)
  44. UI.InvokeString(HUD_MENU, WidgetRoot + ".setPlayerName", asText)
  45. EndIf
  46. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement