Guest User

Untitled

a guest
Oct 28th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.55 KB | None | 0 0
  1. /// @function drawCardName(card,grey);
  2. /// @param {index} card The card who's text to draw (objCardParent)
  3. /// @param {boolean} grey If the card being drawn should be in grayscale or not
  4. /// @param {real} opac opacity to draw the name scrolls, name and text at. Should only be used if the card being drawn fades in and out
  5. /// @param {struct} params If this struct is provided, it will use the details in it instead of the calling objects/_card's parameters {x,y,scaleX,scaleY,rot,name,text,cOwner,textPeek,strength}
  6. function drawCardName(_card,_grey = false,_opac = 1,_params = undefined)
  7. {
  8. if (live_call(_card,_grey,_opac,_params)) return live_result;
  9.  
  10. var _x,_y,_strength,_scaleX,_scaleY,_rotation,_name,_text,_cOwner,_textPeek;
  11. var cardTextModified;
  12.  
  13. if(_params != undefined)
  14. {
  15. _x = _params.x;
  16. _y = _params.y;
  17. _strength = _params.strength;
  18. _scaleX = _params.scaleX;
  19. _scaleY = _params.scaleY;
  20. _rotation = _params.rot;
  21. _name = _params.name;
  22. _text = _params.text;
  23. _cOwner = _params.cOwner;
  24. _textPeek = _params.textPeek;
  25. }
  26. else
  27. {
  28. _x = x;
  29. _y = y;
  30. _scaleX = image_xscale;
  31. _scaleY = image_yscale;
  32. _strength = _card.strength;
  33. _rotation = cardRot;
  34. _name = _card.name;
  35. _text = _card.text;
  36. _cOwner = _card.cardOwner;
  37. //if the card is a card selector, and that selector belongs to a card foil display that is locked, do not show the text even if the enable text visible option is enabled
  38. if(object_get_parent(_card.object_index) == objSelectorCardsParent)
  39. {
  40. if(_card.belongsToCardFoilDisplay != undefined)
  41. {
  42. if(_card.belongsToCardFoilDisplay.foilOption == cardFoilOptions.locked)
  43. _textPeek = 0;
  44. else
  45. {
  46. if(getListValue(global.optionsSettingsGameOptions,mainMenuListType.enable_text_visible))
  47. _textPeek = textPeekMax;
  48. else
  49. _textPeek = textPeek;
  50. }
  51. }
  52. else
  53. {
  54. if(getListValue(global.optionsSettingsGameOptions,mainMenuListType.enable_text_visible))
  55. _textPeek = textPeekMax;
  56. else
  57. _textPeek = textPeek;
  58. }
  59. }
  60. else
  61. {
  62. if(getListValue(global.optionsSettingsGameOptions,mainMenuListType.enable_text_visible))
  63. _textPeek = textPeekMax;
  64. else
  65. _textPeek = textPeek;
  66. }
  67. }
  68.  
  69. //give the credits screen a bit more leeway when drawing cards
  70. if(global.gameMode == gameMode.credits)
  71. var extraDist = 1.5;
  72. else
  73. var extraDist = 1;
  74.  
  75. if(!(_x >= 0-room_width*(extraDist-1) and _x <= room_width*extraDist and _y >= 0-room_height*(extraDist-1) and _y <= room_height*extraDist))
  76. {
  77. return;
  78. }
  79.  
  80. var scaleRatio = sprite_get_height(sprCardFrontGeneric)/sprite_get_height(sprCardFrontGenericDisplay);
  81.  
  82. //if card has left the board but is waiting to have it's on flip effect activate (it's drawing the grey sprite)
  83. //draw a second paper, scroll, and name at the old location
  84. if(_params == undefined)
  85. {
  86. if(object_get_parent(_card.object_index) == objCardParent)
  87. {
  88. if(_card.shadowActivateEffect == 1)
  89. {
  90. if(_card.nullZoneID != undefined or (_card.inDeck == true and _card.fightBoardID == undefined))
  91. {
  92. var rotatedGreyedRolledX = xStart + lengthdir_x(((sprite_get_height(sprCardFrontGeneric)-80)*normalScaleX*scaleRatio),0-90)
  93. var rotatedGreyedRolledY = yStart + lengthdir_y(((sprite_get_height(sprCardFrontGeneric)-80)*normalScaleY*scaleRatio),0-90)
  94. var rotatedGreyedPaperX = xStart + lengthdir_x(((sprite_get_height(sprCardFrontGeneric))*normalScaleX*scaleRatio),0-90) + lengthdir_x(246*scaleRatio*normalScaleX,0-180)
  95. var rotatedGreyedPaperY = yStart + lengthdir_y(((sprite_get_height(sprCardFrontGeneric))*normalScaleY*scaleRatio),0-90) + lengthdir_y(246*scaleRatio*normalScaleY,0-180)
  96. shader_set(sh_greyscale)
  97. //draw the name scroll and the text paper (based on _card.textPeek (if the options setting is set of course!))
  98. //draw the paper
  99. draw_sprite_general(sprCardFrontGenericScrollPaperDisplay,0,0,sprite_get_height(sprCardFrontGenericScrollPaperDisplay)-((sprite_get_height(sprCardFrontGenericScrollPaperDisplay)+80)*0.9),
  100. sprite_get_width(sprCardFrontGenericDisplay),(sprite_get_height(sprCardFrontGenericScrollPaperDisplay)+80)*(max(_textPeek+0.08,0.155)),
  101. rotatedGreyedPaperX,rotatedGreyedPaperY,
  102. scaleRatio*normalScaleX,-scaleRatio*normalScaleY,
  103. 0,c_white,c_white,c_white,c_white,0.5);
  104.  
  105. //draw the scroll roll
  106. draw_sprite_ext(sprCardFrontGenericScrollRolledDisplay,0,rotatedGreyedRolledX,rotatedGreyedRolledY-(_textPeek * sprite_get_height(sprCardFrontGenericScrollPaperDisplay)*normalScaleY*scaleRatio),normalScaleX*scaleRatio,normalScaleY*scaleRatio,0,c_white,1)
  107.  
  108. //draw the strength
  109. var _radOfSpace = 120, _spaceX = 90, _spaceY = 130;
  110. if(getListValue(global.optionsSettingsAccessibility,mainMenuListType.enable_dyslexic_font))
  111. var msdfFontScaleStrength = 2;
  112. else
  113. var msdfFontScaleStrength = 3;
  114. var rotatedGreyedStrengthX = xStart + lengthdir_x(((sprite_get_height(sprCardFrontGeneric))*normalScaleX*scaleRatio),0+90) + lengthdir_x(-(sprite_get_width(sprCardFrontGenericDisplay)/2-_spaceX)*normalScaleX*scaleRatio,0) + lengthdir_x((-_spaceY)*normalScaleX*scaleRatio,0+90);
  115. var rotatedGreyedStrengthY = yStart + lengthdir_y(((sprite_get_height(sprCardFrontGeneric))*normalScaleY*scaleRatio),0+90) + lengthdir_y(-(sprite_get_width(sprCardFrontGenericDisplay)/2-_spaceX)*normalScaleY*scaleRatio,0) + lengthdir_y((-_spaceY)*normalScaleY*scaleRatio,0+90);
  116. var scribStrength = scribble(global.optionsCurrentStrengthTextFont+"[c_white][fa_center][scaleStack,"+string(msdfFontScaleStrength)+"]"+string(_strength)).transform(1,1,0).scale_to_box(_radOfSpace*normalScaleX*scaleRatio,_radOfSpace*normalScaleY*scaleRatio,false)
  117. scribStrength.blend(c_white,0.5)
  118. scribStrength.origin(0,scribStrength.get_height()/2)
  119. scribStrength.msdf_border(c_black,1.4)
  120. scribStrength.draw(rotatedGreyedStrengthX,rotatedGreyedStrengthY)
  121.  
  122. //draw the text, but only if the option is set to
  123. if(getListValue(global.optionsSettingsGameOptions,mainMenuListType.enable_text_visible))
  124. {
  125. //we're by default drawing it greyed out here, so alter it so
  126. //cardTextModified = string_replace_all(_text,"[/c]","[/c][c_black]")
  127. cardTextModified = string_replace_all(_text,"sprCardTextOnFlip,0","sprCardTextOnFlip,2")
  128. cardTextModified = string_replace_all(cardTextModified,"sprCardTextStrength,0","sprCardTextStrength,2")
  129. cardTextModified = string_replace_all(cardTextModified,"sprCardTextGameStart,0","sprCardTextGameStart,2")
  130. cardTextModified = string_replace_all(cardTextModified,"sprCardTextNullZone,0","sprCardTextNullZone,2")
  131.  
  132. if(getListValue(global.optionsSettingsAccessibility,mainMenuListType.enable_dyslexic_font))
  133. {
  134. //remove the underline font (underlining is bad for dyslexia!)
  135. cardTextModified = string_replace_all(cardTextModified,"[/f][fntCardTextDisplayUnderlined]","");
  136. cardTextModified = string_replace_all(cardTextModified,"[/f][sprMSDFFontCardText]","");
  137. cardTextModified = string_replace_all(cardTextModified,"_"," ");
  138. cardTextModified = string_replace_all(cardTextModified,"c black","c_black");
  139. }
  140.  
  141. var scrib = scribble(global.optionsCurrentCardTextFont+"[c_black][fa_left]"+cardTextModified).line_height(22*2,22*2).fit_to_box(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)-44,sprite_get_height(sprCardFrontGenericScrollPaperDisplay)-44)
  142. scrib.origin(0,scrib.get_height())
  143. scrib.transform(scaleRatio*normalScaleX,scaleRatio*normalScaleY,0)
  144. scrib.blend(c_white,map_value(_textPeek,textPeekStart,textPeekMax,-2,0.5))
  145.  
  146. scrib.draw(rotatedGreyedRolledX-(scrib.get_width()*scaleRatio*normalScaleX)/2,rotatedGreyedRolledY+46*scaleRatio*normalScaleY)
  147. }
  148.  
  149. //draw the name
  150. if(getListValue(global.optionsSettingsAccessibility,mainMenuListType.enable_dyslexic_font))
  151. var msdfFontScaleName = 1.5;
  152. else
  153. var msdfFontScaleName = 2;
  154. var scribNameGrey = scribble(global.optionsCurrentCardHeadingFont+"[c_white][fa_center][scaleStack,"+string(msdfFontScaleName)+"]"+_name).scale_to_box(210*normalScaleX,45*normalScaleY,false)
  155. scribNameGrey.origin(0,scribNameGrey.get_height()/2-6)
  156. scribNameGrey.blend(c_white,0.5)
  157. scribNameGrey.msdf_border(c_black,0.8)
  158. scribNameGrey.draw(
  159. rotatedGreyedRolledX + lengthdir_x((_textPeek * sprite_get_height(sprCardFrontGenericScrollPaperDisplay)*normalScaleX*scaleRatio),0+90) + lengthdir_x((1*normalScaleX*scaleRatio),0-90),
  160. rotatedGreyedRolledY + lengthdir_y((_textPeek * sprite_get_height(sprCardFrontGenericScrollPaperDisplay)*normalScaleY*scaleRatio),0+90) + lengthdir_y((1*normalScaleY*scaleRatio),0-90))
  161.  
  162. shader_reset();
  163. }
  164. }
  165. }
  166. }
  167.  
  168. //all of the following checks need to pass to draw the name and text
  169. var earlyEndCheck = false;
  170.  
  171. if(_params == undefined)
  172. {
  173. if(object_get_parent(_card.object_index) == objCardParent)
  174. {
  175. earlyEndCheck = true;
  176. if(objSelectionController.objectFollowingMouse == _card)
  177. {
  178. earlyEndCheck = false;
  179. }
  180. //if the card is in a deck //during selection
  181. //if(!instance_exists(objFightController))
  182. //{
  183. if(_card.deckID != undefined)
  184. {
  185. if(_card.inDeck == true)
  186. {
  187. if(_card.faceDown == false)
  188. {
  189. var _numCardsToDraw = 1;
  190. if(ds_list_size(_card.deckID.cards) >= _numCardsToDraw)
  191. {
  192. if(objSelectionController.thisIsExpanded != _card.deckID)
  193. {
  194. if(ds_list_find_index(_card.deckID.cards,_card) < _numCardsToDraw)
  195. earlyEndCheck = false;
  196.  
  197. //the last card in the deck will be drawn
  198. //if(_card.deckID.cards[| ds_list_size(_card.deckID.cards)-1] == _card)
  199. //{
  200. // earlyEndCheck = false;
  201. //}
  202.  
  203. }
  204. else
  205. {
  206. earlyEndCheck = false;
  207. }
  208. }
  209. else
  210. {
  211. earlyEndCheck = false;
  212. }
  213. }
  214. else
  215. {
  216. earlyEndCheck = false;
  217. }
  218.  
  219. if(_card.deckID.timesToShuffle > 0) //draw the name if the card is being shuffled (stops a graphical glitch)
  220. {
  221. earlyEndCheck = false;
  222. }
  223. }
  224.  
  225. }
  226. //else
  227. //{
  228. // earlyEndCheck = false;
  229. //}
  230. //}
  231.  
  232. //if the card is on a board
  233. if(_card.fightBoardID != undefined)
  234. {
  235. if(ds_list_size(_card.fightBoardID.cards) > 9)
  236. {
  237. if(objSelectionController.thisIsExpanded != _card.fightBoardID)
  238. {
  239.  
  240. if(ds_list_find_index(_card.fightBoardID.cards,_card) >= ds_list_size(_card.fightBoardID.cards)-10)
  241. earlyEndCheck = false;
  242. }
  243. else
  244. {
  245. earlyEndCheck = false;
  246. }
  247. }
  248. else
  249. {
  250. earlyEndCheck = false;
  251. }
  252. }
  253.  
  254. //if the card is in a null zone
  255. if(_card.nullZoneID != undefined)
  256. {
  257. if(objSelectionController.thisIsExpanded != _card.nullZoneID)
  258. {
  259. if(image_xscale <= 0.05)
  260. {
  261. earlyEndCheck = true;
  262. }
  263. else
  264. {
  265. earlyEndCheck = false;
  266. }
  267. }
  268. else
  269. {
  270. earlyEndCheck = false;
  271. }
  272. }
  273. }
  274. if(_card.dissolveDest == 0)
  275. {
  276. earlyEndCheck = true;
  277. }
  278. }
  279.  
  280. if(earlyEndCheck == true)
  281. {
  282. return;
  283. }
  284.  
  285. var rotatedRolledX = _x + lengthdir_x(((sprite_get_height(sprCardFrontGeneric)-80)*_scaleX*scaleRatio),_rotation-90)
  286. var rotatedRolledY = _y + lengthdir_y(((sprite_get_height(sprCardFrontGeneric)-80)*_scaleY*scaleRatio),_rotation-90)
  287. var rotatedPaperX = _x + lengthdir_x(((sprite_get_height(sprCardFrontGeneric))*_scaleX*scaleRatio),_rotation-90) + lengthdir_x(246*scaleRatio*_scaleX,_rotation-180)
  288. var rotatedPaperY = _y + lengthdir_y(((sprite_get_height(sprCardFrontGeneric))*_scaleY*scaleRatio),_rotation-90) + lengthdir_y(246*scaleRatio*_scaleY,_rotation-180)
  289.  
  290. if(_grey == true)
  291. {
  292. shader_set(sh_greyscale)
  293. }
  294.  
  295. //determine the colour to draw the scroll based on the card's owner
  296. if(_cOwner == owner.player)
  297. var ownerBlend = c_white;
  298. else
  299. var ownerBlend = make_color_rgb(252, 227, 225)
  300.  
  301. //draw the name scroll and the text paper (based on _card.textPeek)
  302. //draw the paper
  303. draw_sprite_general(sprCardFrontGenericScrollPaperDisplay,0,0,sprite_get_height(sprCardFrontGenericScrollPaperDisplay)-((sprite_get_height(sprCardFrontGenericScrollPaperDisplay)+80)*(max(_textPeek,0.9))),
  304. sprite_get_width(sprCardFrontGenericDisplay),(sprite_get_height(sprCardFrontGenericScrollPaperDisplay)+80)*(max(_textPeek+0.056,0.155)),
  305. rotatedPaperX,rotatedPaperY,
  306. scaleRatio*_scaleX,-scaleRatio*_scaleY,
  307. _rotation,ownerBlend,ownerBlend,ownerBlend,ownerBlend,_opac);
  308.  
  309. //draw the scroll roll
  310. draw_sprite_ext(sprCardFrontGenericScrollRolledDisplay,0,
  311. rotatedRolledX + lengthdir_x((_textPeek * sprite_get_height(sprCardFrontGenericScrollPaperDisplay)*_scaleX*scaleRatio),_rotation+90),
  312. rotatedRolledY + lengthdir_y((_textPeek * sprite_get_height(sprCardFrontGenericScrollPaperDisplay)*_scaleY*scaleRatio),_rotation+90),
  313. _scaleX*scaleRatio,_scaleY*scaleRatio,_rotation,ownerBlend,_opac)
  314.  
  315. //draws the strength
  316. var _radOfSpace = 120, _spaceX = 90, _spaceY = 130;
  317. if(getListValue(global.optionsSettingsAccessibility,mainMenuListType.enable_dyslexic_font))
  318. var msdfFontScaleStrength = 2;
  319. else
  320. var msdfFontScaleStrength = 3;
  321. var rotatedStrengthX = _x + lengthdir_x(((sprite_get_height(sprCardFrontGeneric))*_scaleX*scaleRatio),_rotation+90) + lengthdir_x(-(sprite_get_width(sprCardFrontGenericDisplay)/2-_spaceX)*_scaleX*scaleRatio,_rotation) + lengthdir_x((-_spaceY)*_scaleX*scaleRatio,_rotation+90);
  322. var rotatedStrengthY = _y + lengthdir_y(((sprite_get_height(sprCardFrontGeneric))*_scaleY*scaleRatio),_rotation+90) + lengthdir_y(-(sprite_get_width(sprCardFrontGenericDisplay)/2-_spaceX)*_scaleY*scaleRatio,_rotation) + lengthdir_y((-_spaceY)*_scaleY*scaleRatio,_rotation+90);
  323. var scribStrengthColour;
  324. if(_params == undefined)
  325. {
  326. switch(sign(_strength-_card.printedStrength))
  327. {
  328. case -1:
  329. scribStrengthColour = "[c_red]"
  330. break;
  331.  
  332. case 0:
  333. scribStrengthColour = "[c_white]"
  334. break;
  335.  
  336. case 1:
  337. scribStrengthColour = "[c_brightgreen]"
  338. break;
  339. }
  340. }
  341. else
  342. {
  343. scribStrengthColour = "[c_white]"
  344. }
  345. var scribStrength = scribble(global.optionsCurrentStrengthTextFont+scribStrengthColour+"[fa_center]"+"[scaleStack,"+string(msdfFontScaleStrength*_scaleX*scaleRatio)+"]"+string(_strength)).transform(1,1,_rotation).scale_to_box(_radOfSpace*_scaleX*scaleRatio,_radOfSpace*_scaleY*scaleRatio,false)
  346. scribStrength.blend(c_white,_opac)
  347. scribStrength.origin(0,scribStrength.get_height()/2)
  348. scribStrength.msdf_border(c_black,1.4)
  349. scribStrength.draw(rotatedStrengthX,rotatedStrengthY)
  350.  
  351. //draws the cards text
  352. if(_grey == true) //grey out the inline sprites if any
  353. {
  354. //cardTextModified = string_replace_all(_text,"[/c]","[/c][c_black]")
  355. cardTextModified = string_replace_all(_text,"sprCardTextOnFlip,0","sprCardTextOnFlip,2")
  356. cardTextModified = string_replace_all(cardTextModified,"sprCardTextStrength,0","sprCardTextStrength,2")
  357. cardTextModified = string_replace_all(cardTextModified,"sprCardTextGameStart,0","sprCardTextGameStart,2")
  358. cardTextModified = string_replace_all(cardTextModified,"sprCardTextNullZone,0","sprCardTextNullZone,2")
  359. }
  360. else
  361. {
  362. cardTextModified = _text;
  363. }
  364.  
  365. if(getListValue(global.optionsSettingsAccessibility,mainMenuListType.enable_dyslexic_font))
  366. {
  367. //remove the italicised font (italics is bad for dyslexia!)
  368. cardTextModified = string_replace_all(cardTextModified,"[slant]","");
  369. cardTextModified = string_replace_all(cardTextModified,"[/slant]","");
  370. }
  371.  
  372. if(_params == undefined)
  373. {
  374. if(hoveredOver or getListValue(global.optionsSettingsGameOptions,mainMenuListType.enable_text_visible) == true)
  375. {
  376. if(object_get_parent(_card.object_index) == objCardParent)
  377. {
  378. if(objSelectionController.thisIsExpanded == _card.deckID or objSelectionController.thisIsExpanded == _card.fightBoardID or objSelectionController.thisIsExpanded == _card.nullZoneID or getListValue(global.optionsSettingsGameOptions,mainMenuListType.enable_text_visible) == true)
  379. {
  380. var scrib = scribble(global.optionsCurrentCardTextFont+"[c_black][fa_left]"+cardTextModified).line_height(22*2,22*2).fit_to_box(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)-44,sprite_get_height(sprCardFrontGenericScrollPaperDisplay)-44)
  381. scrib.origin(scrib.get_width()/2,scrib.get_height())
  382. scrib.transform(scaleRatio*image_xscale,scaleRatio*image_yscale,cardRot)
  383. scrib.blend(c_white,map_value(_textPeek,textPeekStart,textPeekMax,-2,1))
  384.  
  385. scrib.draw(rotatedPaperX + lengthdir_x(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)/2*scaleRatio*image_xscale,cardRot) + lengthdir_x(35*scaleRatio*image_xscale,cardRot+90),
  386. rotatedPaperY + lengthdir_y(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)/2*scaleRatio*image_yscale,cardRot) + lengthdir_y(35*scaleRatio*image_yscale,cardRot+90))
  387. }
  388. }
  389. if(object_get_parent(_card.object_index) == objSelectorCardsParent)
  390. {
  391. var scrib = scribble(global.optionsCurrentCardTextFont+"[c_black][fa_left]"+cardTextModified).line_height(22*2,22*2).fit_to_box(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)-44,sprite_get_height(sprCardFrontGenericScrollPaperDisplay)-44)
  392. scrib.origin(scrib.get_width()/2,scrib.get_height())
  393. scrib.transform(scaleRatio*image_xscale,scaleRatio*image_yscale,cardRot)
  394. scrib.blend(c_white,map_value(_textPeek,textPeekStart,textPeekMax,-2,1))
  395.  
  396. scrib.draw(rotatedPaperX + lengthdir_x(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)/2*scaleRatio*image_xscale,cardRot) + lengthdir_x(35*scaleRatio*image_xscale,cardRot+90),
  397. rotatedPaperY + lengthdir_y(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)/2*scaleRatio*image_yscale,cardRot) + lengthdir_y(35*scaleRatio*image_yscale,cardRot+90))
  398. }
  399. }
  400. }
  401. else
  402. {
  403. var scrib = scribble(global.optionsCurrentCardTextFont+"[c_black][fa_left]"+cardTextModified).line_height(22*2,22*2).fit_to_box(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)-44,sprite_get_height(sprCardFrontGenericScrollPaperDisplay)-44)
  404. scrib.origin(scrib.get_width()/2,scrib.get_height())
  405. scrib.transform(scaleRatio*_scaleX,scaleRatio*_scaleY,_rotation)
  406. scrib.blend(c_white,_opac)
  407. scrib.draw(rotatedPaperX + lengthdir_x(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)/2*scaleRatio*_scaleX,_rotation) + lengthdir_x(35*scaleRatio*_scaleX,_rotation+90),
  408. rotatedPaperY + lengthdir_y(sprite_get_width(sprCardFrontGenericScrollPaperDisplay)/2*scaleRatio*_scaleY,_rotation) + lengthdir_y(35*scaleRatio*_scaleY,_rotation+90))
  409. }
  410.  
  411. //draw the name
  412. if(getListValue(global.optionsSettingsAccessibility,mainMenuListType.enable_dyslexic_font))
  413. var msdfFontScaleName = 1.5;
  414. else
  415. var msdfFontScaleName = 2;
  416. if(_scaleX > 0 and _scaleY > 0)
  417. {
  418. var scribName = scribble(global.optionsCurrentCardHeadingFont+"[c_white][fa_center][fa_top]"+"[scaleStack,"+string(msdfFontScaleName)+"]"+_name).transform(1,1,_rotation).scale_to_box(210*_scaleX,45*_scaleY,false)
  419. scribName.origin(0,scribName.get_height()/2-6)
  420. scribName.blend(c_white,_opac)
  421. scribName.msdf_border(c_black,0.8)
  422. scribName.draw(rotatedRolledX + lengthdir_x((_textPeek * sprite_get_height(sprCardFrontGenericScrollPaperDisplay)*_scaleX*scaleRatio),_rotation+90) + lengthdir_x((1*_scaleX*scaleRatio),_rotation-90),
  423. rotatedRolledY + lengthdir_y((_textPeek * sprite_get_height(sprCardFrontGenericScrollPaperDisplay)*_scaleY*scaleRatio),_rotation+90) + lengthdir_y((1*_scaleY*scaleRatio),_rotation-90))
  424. }
  425.  
  426. if(_grey == true)
  427. {
  428. shader_reset();
  429. }
  430. }
Advertisement
Add Comment
Please, Sign In to add comment