./game_ui_globals.lua

  1. -- Constants 
  2. INVALID_THREAD_HANDLE = -1 
  3.  
  4. INVALID_WEAPON_UNIQUE_ID = -1 
  5. INVALID_WEAPON_INVENTORY_SLOT = 0		-- This is 0 because we're starting from 1 for Lua 
  6.  
  7. INVALID_NANO_INVENTORY_SLOT = 0			-- This is 0 because we're starting from 1 for Lua 
  8.  
  9. INVALID_VDO_HANDLE	= -1 
  10.  
  11. TYPE_BUTTON = 0 
  12. TYPE_TOGGLE = 1 
  13. TYPE_SLIDER = 2 
  14. TYPE_ROW		= 3	 
  15. TYPE_REMAP	= 4		--PC-only shortcut remapping 
  16. TYPE_TOGGLE_COLOR	= 5		--Color 
  17.  
  18. SCALE_STD_RES = 0.67 
  19.  
  20. ALIGN_DEFAULT 	= 0 
  21. ALIGN_LEFT 		= 1 
  22. ALIGN_CENTER 	= 2 
  23. ALIGN_RIGHT 	= 3 
  24.  
  25. LIST_BUTTON_SPACE 		= 3 
  26. LIST_BUTTON_SPACING 		= 35 
  27. LIST_BUTTON_HEIGHT 		= 32 
  28. LIST_HIGHLIGHT_HEIGHT 	= 10 
  29. LIST_BUTTON_TEXT_X 		= 48 
  30. LIST_TOGGLE_OFFSET 		= 0.75 
  31. LIST_SLIDER_OFFSET 		= 0.25 
  32.  
  33. SCROLLBAR_WIDTH = 10 
  34.  
  35. DEG_TO_RAD = 0.01745329252		-- PI/180 
  36.  
  37. --setup global colors 
  38.  
  39. --Pause Menu Colors 
  40. COLOR_PM_BAR = {R = 208/255, G = 74/255; B = 146/255} 
  41.  
  42. --Depreciated 
  43. COLOR_HIGHLIGHT_TEXT = {R=180,G=36,B=18} 
  44. COLOR_HIGHLIGHT_BG = {R=0,G=133,B=192} 
  45.  
  46. COLOR_UNHIGHLIGHT_TEXT = {R=160,G=160,B=160} 
  47. COLOR_UNHIGHLIGHT_BG = {R=40,G=40,B=40} 
  48.  
  49. COLOR_DISABLED_TEXT = {R=50,G=50,B=50} 
  50. COLOR_DISABLED_BG = {R=20,G=20,B=20} 
  51.  
  52. COLOR_RED = {R=182, G=36, B=18} 
  53. COLOR_RED_MEDIUM = {R=102, G=20, B=10} 
  54. COLOR_RED_DARK = {R=48, G=9, B=5} 
  55.  
  56. COLOR_SAINTS_PURPLE = {R=148/255, G=0/255, B=197/255} 
  57.  
  58. COLOR_STORE_WEAPON_PRIMARY = {R=184/255, G=73/255, B=48/255} 
  59. COLOR_STORE_WEAPON_SECONDARY = {R=170/255, G=170/255, B=170/255} 
  60. COLOR_STORE_WEAPON_TERTIARY = {R=97/255, G=100/255, B=102/255} 
  61.  
  62. COLOR_STORE_VEHICLE_PRIMARY = {R=204/255, G=204/255, B=204/255} 
  63. COLOR_STORE_VEHICLE_SECONDARY = {R=170/255, G=170/255, B=170/255} 
  64. COLOR_STORE_VEHICLE_TERTIARY = {R=97/255, G=100/255, B=102/255} 
  65.  
  66. COLOR_PLAYER_CREATION_PRIMARY = {R=177/255, G=118/255, B=10/255} 
  67. COLOR_PLAYER_CREATION_SECONDARY = {R=170/255, G=170/255, B=170/255} 
  68. COLOR_PLAYER_CREATION_TERTIARY = {R=97/255, G=100/255, B=102/255} 
  69.  
  70. COLOR_STORE_CHARACTER_PRIMARY = {R=72/255, G=165/255, B=206/255} 
  71. COLOR_STORE_CHARACTER_SECONDARY = {R=170/255, G=170/255, B=170/255} 
  72. COLOR_STORE_CHARACTER_TERTIARY = {R=97/255, G=100/255, B=102/255} 
  73.  
  74. COLOR_CELL_MENU_HIGHLIGHT_TEXT = {R=220/255,G=220/255,B=220/255} 
  75. COLOR_CELL_MENU_HIGHLIGHT_BTN = {R=146/255, G=143/255, B=225/255} 
  76. --COLOR_CELL_MENU_HIGHLIGHT_BTN_SHADOW = {R=31/255, G=32/255, B=71/255} 
  77.  
  78. COLOR_CELL_MENU_UNHIGHLIGHT_TEXT = {R=120/255,G=120/255,B=120/255} 
  79. COLOR_CELL_MENU_UNHIGHLIGHT_BTN = {R=54/255, G=52/255, B=123/255} 
  80. COLOR_CELL_MENU_UNHIGHLIGHT_BTN_SHADOW = {R=31/255, G=32/255, B=71/255} 
  81.  
  82. COLOR_CHEATS_PRIMARY = {R=148/255, G=0/255, B=197/255} 
  83. COLOR_CHEATS_SECONDARY = {R=170/255, G=170/255, B=170/255} 
  84.  
  85. COLOR_STORE_REWARDS_PRIMARY = {R=148/255, G=0/255, B=197/255} 
  86. COLOR_STORE_REWARDS_SECONDARY = {R=170/255, G=170/255, B=170/255} 
  87. COLOR_STORE_REWARDS_TERTIARY = {R=90/255, G=90/255, B=90/255} 
  88. COLOR_STORE_REWARDS_UNHIGHLIGHTED = {R=120/255, G=120/255, B=120/255} 
  89.  
  90. COLOR_STORE_CLOTHING_SECONDARY = {R=170/255, G=170/255, B=170/255} 
  91. COLOR_STORE_CLOTHING_TERTIARY = {R=97/255, G=100/255, B=102/255} 
  92.  
  93. COLOR_STORE_LETS_PRETEND_PRIMARY = {R=64/255, G=184/255, B=33/255} 
  94. COLOR_STORE_LETS_PRETEND_SECONDARY = {R=170/255, G=170/255, B=170/255} 
  95. COLOR_STORE_LETS_PRETEND_TERTIARY = {R=97/255, G=100/255, B=102/255} 
  96. COLOR_STORE_LETS_PRETEND_PINK = {R=208/255, G=74/255, B=146/255} 
  97.  
  98. COLOR_STORE_LACE_PRIMARY = {R=208/255, G=75/255, B=146/255} 
  99.  
  100. COLOR_STORE_NOBODY_PRIMARY = {R=22/255, G=136/255, B=198/255} 
  101.  
  102. COLOR_STORE_PLANET_PRIMARY = {R=148/255, G=0/255, B=197/255} 
  103.  
  104. COLOR_STORE_IMPRESSIONS_PRIMARY = {R=153/255, G=128/255, B=77/255} 
  105.  
  106.  
  107. COLOR_RESPECT_METER = {R=148/255, g=0/255, B=197/255} 
  108. COLOR_RESPECT_METER_HIGHLIGHT = {R=165/255, g=0/255, B=219/255} 
  109.  
  110. COLOR_TARGET_KILL = {R=204/255, G=34/255, B=0} 
  111. COLOR_TARGET_DEFEND = {R=101/255, G=178/255, B=76/255} 
  112. COLOR_TARGET_USE = {R=246/255, G=187/255, B=79/255} 
  113. COLOR_TARGET_REVIVE = {R=104/255, G=100/255, B=238/255} 
  114. COLOR_TARGET_LOCATION = {R=25/255, G=157/255, B=229/255} 
  115. COLOR_TARGET_COOP = {R=148/255, g=0/255, B=197/255} 
  116. COLOR_TARGET_HITMAN = {R=255/255, G=255/255, B=255/255} 
  117. COLOR_TARGET_CHOPSHOP = {R=255/255, G=255/255, B=255/255} 
  118. COLOR_TARGET_SYNDICATE = {R=208/255, G=74/255, B=146/255} 
  119. COLOR_TARGET_SAINTS = {R=148/255, G=0/255, B=197/255} 
  120. COLOR_TARGET_GRENADE = {R=220/255, G=220/255, B=220/255} 
  121.  
  122. COLOR_CMP_FAIL = {R=156/255, G=35/255, B=32/255} 
  123.  
  124. TWEEN_STATE_IDLE	= 0 
  125. TWEEN_STATE_RUNNING	= 1 
  126. TWEEN_STATE_PAUSED	= 2 
  127. TWEEN_STATE_DISABLED	= 3 
  128. TWEEN_STATE_FINISHED	= 4 
  129.  
  130. HUD_DISPOSITION_FRIENDLY	= 0 
  131. HUD_DISPOSITION_ENEMY		= 1 
  132. HUD_DISPOSITION_NEUTRAL		= 2 
  133.  
  134. HUMAN_TEAM_NONE = -1 
  135. HUMAN_TEAM_GUERILLA = 0 
  136. HUMAN_TEAM_EDF = 1 
  137. HUMAN_TEAM_CIVILIAN = 2 
  138. HUMAN_TEAM_MP_NEUTRAL = 2 
  139. HUMAN_TEAM_MARAUDER = 3 
  140. HUMAN_TEAM_MP_SPECTATOR = 3 
  141.  
  142. COLOR_CONTROL = {R=0.58,G=0.05,B=0} 
  143. COLOR_MORALE = {R=0.943,G=0.78,B=0.20} 
  144.  
  145. COLOR_PING_RED		= {R=171/255, G=47/255, B=15/255}	 
  146. COLOR_PING_YELLOW	= {R=218/255, G=199/255, B=17/255} 
  147. COLOR_PING_GREEN	= {R=113/255, G=175/255, B=21/255} 
  148. COLOR_PING_GREY	= {R=190/255, G=190/255, B=190/255} 
  149.  
  150. INVENTORY_DPAD_THRESHOLD = .25	--The dpad is analog on PS3 so we can set the threshold with this. 
  151.  
  152. -- Sound IDS. Use these with "play_ui_sound" gameside Lua function to play any sounds. 
  153. -- If you want to add to these, you need to update the UIS_ enums in gameaudio.cpp, as well as the gameside 
  154. -- functions that map the UIS_ enum values to sound IDs and the code that loads these IDs, as well as possibly 
  155. -- the table file that the event names are loaded from (game_audio.xtbl) and the global cue IDs list. 
  156. SOUND_SLIDER_ADD = "" 
  157. SOUND_SLIDER_SUBTRACT = "" 
  158. SOUND_INPUT_CONFIRM = "INT_SELECT" 
  159. SOUND_INPUT_A = SOUND_INPUT_CONFIRM -- Confirm 
  160. SOUND_INPUT_CANCEL = "INT_BACK" 
  161. SOUND_INPUT_B = SOUND_INPUT_CANCEL -- Cancel/Back 
  162. SOUND_INPUT_MISC = "" 
  163. SOUND_INPUT_X = SOUND_INPUT_MISC 
  164. SOUND_INPUT_OTHER = "" 
  165. SOUND_INPUT_Y = SOUND_INPUT_OTHER 
  166. SOUND_SCROLL_UP = "INT_TOGGLE_UD" -- Dpad stuff 
  167. SOUND_SCROLL_DOWN = "INT_TOGGLE_UD" -- Dpad stuff 
  168. SOUND_SCROLL_LEFT = "INT_TOGGLE_UD" -- Dpad stuff 
  169. SOUND_SCROLL_RIGHT = "INT_TOGGLE_UD" -- Dpad stuff 
  170. SOUND_BUMPER_RIGHT = "INT_TRIGGER" -- Use these 
  171. SOUND_BUMPER_LEFT = "INT_TRIGGER" -- Use these 
  172. SOUND_TRIGGER_RIGHT = "INT_TRIGGER" -- Use these 
  173. SOUND_TRIGGER_LEFT = "INT_TRIGGER" -- Use these 
  174. SOUND_INPUT_INVALID = "INT_ERROR" -- Option does not exist 
  175. SOUND_LEFT_STICK_PRESS = "" 
  176. SOUND_RIGHT_STICK_PRESS = "" 
  177. SOUND_DPAD_UP = "INT_TOGGLE_UD" 
  178. SOUND_DPAD_DOWN = "INT_TOGGLE_UD" 
  179. SOUND_DPAD_RIGHT = "INT_TOGGLE_UD" 
  180. SOUND_DPAD_LEFT = "INT_TOGGLE_UD" 
  181.  
  182. SOUND_AMBIENT_ADJUST = "" 
  183. SOUND_MUSIC_VOLUME_ADJUST = "" 
  184. SOUND_SFX_VOLUME_ADJUST = "" 
  185. SOUND_VOICE_VOLUME_ADJUST = "" 
  186. SOUND_OVERALL_VOLUME_ADJUST = "" 
  187.  
  188. SOUND_WEAPON_RADIAL_OPEN = 26 -- Open weapons 
  189. SOUND_WEAPON_RADIAL_CLOSE = 27 -- Close weapons 
  190. SOUND_WEAPON_RADIAL_HIGHLIGHT_NEW_WEAPON = 28 -- Move the cursor on the weapon 
  191. SOUND_WEAPON_RADIAL_SELECT_WEAPON = 29 -- Pick weapon on radial 
  192. SOUND_NANOFORGE_RADIAL_OPEN = 30 -- Open nano 
  193. SOUND_NANOFORGE_RADIAL_CLOSE = 31 -- Close nano 
  194. SOUND_NANOFORGE_RADIAL_HIGHLIGHT_NEW_ABILITY = 32 -- Move cursor on nano 
  195.  
  196. SOUND_WEAPON_UPGRADE_SCROLL_UP = 33 
  197. SOUND_WEAPON_UPGRADE_SCROLL_DOWN = 34 
  198. SOUND_WEAPON_UPGRADE_SELECT_UPGRADE = 35 
  199. SOUND_WEAPON_UPGRADE_HIGHLIGHT_NEW_UPGRADE = 36 
  200. SOUND_WEAPON_UPGRADE_PURCHASE_STANDARD_UPGRADE = 37 
  201. SOUND_WEAPON_UPGRADE_PURCHASE_SUPER_UPGRADE = 38 
  202. SOUND_WEAPON_UPGRADE_SCREEN_OPEN = 39 
  203. SOUND_WEAPON_UPGRADE_SCREEN_CLOSE = 40 
  204.  
  205. SOUND_PAUSE_MENU_OPEN = 43 
  206. -- next unused number: 44 
  207.  
  208. -- Global Return Screen Values 
  209. Global_last_tier = 1 
  210. Global_last_option = 1 
  211.  
  212. Global_last_pause_tier = 1 
  213. Global_last_pause_option = 1 
  214.  
  215. Global_last_lobby_tier = 1 
  216. Global_last_lobby_option = 1 
  217. Global_matchmaking_level_id = 0 
  218. Global_matchmaking_difficulty_id = -1 
  219.  
  220. function multi_player_lobby_reset() 
  221. 	Global_last_lobby_tier = 1 
  222. 	Global_last_lobby_option = 1 
  223. 	Global_matchmaking_level_id = 0 
  224. 	Global_matchmaking_difficulty_id = -1 
  225. end 
  226.  
  227. --[[ 
  228. Removing all references to this (JMH 6/17/2010) 
  229. function vint_set_child_tween_target_handle() 
  230. 	-- 
  231. end 
  232. ]] 
  233.  
  234. --[[ 
  235. Removing all references to this (JMH 6/17/2010) 
  236. function vint_set_child_tween_state() 
  237. 	-- 
  238. end 
  239.  
  240. ]] 
  241.  
  242. function play_ui_sound() 
  243. end 
  244.  
  245. local UI_test_sound_h = nil 
  246.  
  247. -- sound == nil means to stop 
  248. function ui_test_rtpc(sound, rtpc, value) 
  249. 	if UI_test_sound_h then 
  250. 		game_audio_stop(UI_test_sound_h) 
  251. 		UI_test_sound_h = nil 
  252. 	end 
  253. 	 
  254. 	if sound then 
  255. 		UI_test_sound_h = game_UI_audio_play(sound) 
  256. 		game_audio_set_rtpc(UI_test_sound_h, rtpc, value) 
  257. 	end 
  258. end 
  259.