@@ -71,6 +71,10 @@ craftingMenuIndex[6] = "Opravit předmět";
7171craftingTitleHelper = "";
7272activeComponent = false;
7373tempComponent = false;
74+ tempSpr = 0;
75+ drawTip = -1;
76+ drawTipAlpha = 0;
77+ drawTipTempIndex = -1;
7478
7579drawCraftingMenu = 1;
7680craftingSelectedIndex = -1;
@@ -204,6 +208,11 @@ hotslot[i, 3] = 0;
204208}
205209
206210
211+ for (i = 0; i < 10; i++)
212+ {
213+ spellAlpha[i] = 0;
214+ }
215+
207216</string >
208217 </argument >
209218 </arguments >
@@ -313,13 +322,18 @@ temp = false;
313322
314323for (z = 0; z < 9; z++)
315324 {
325+ clr(c_black, hudAlpha);
316326 draw_sprite(sSpellsUI, 4, qx, qy);
317327
318328 // Adjust slot alpha effect
319- if (hotslot[z, 3] == 1 || hotslot[z, 3] == 2) {hotslot[z, 2] = lerp(hotslot[z, 2], 1, 0.1);}
329+ if (hotslot[z, 3] == 1 || hotslot[z, 3] == 2 || hotslot[z, 1] == 2 ) {hotslot[z, 2] = lerp(hotslot[z, 2], 1, 0.1);}
320330 else {hotslot[z, 2] = lerp(hotslot[z, 2], 0, 0.1); if (hotslot[z, 2] < 0.05) {hotslot[z, 1] = 0;}}
321331
322- if (hotslot[z, 2] > 0) {if (hotslot[z, 1] == 1) {clr(-1, hotslot[z, 2]); draw_sprite(sSpellsUI, 2, qx, qy); clr();}}
332+ if (hotslot[z, 2] > 0 || hotslot[z, 1] == 2)
333+ {
334+ if (hotslot[z, 1] == 1) {clr(-1, min(hotslot[z, 2],hudAlpha)); draw_sprite(sSpellsUI, 2, qx, qy); clr();}
335+ if (hotslot[z, 1] == 2) {clr(-1, min(hotslot[z, 2],hudAlpha)); draw_sprite(hotslot[z, 3], 0, qx, qy); draw_sprite(sSpellsUI, 1, qx, qy); clr();}
336+ }
323337
324338 if (mouse_in(qx, qx + 48, qy, qy + 48) && canBind)
325339 {
@@ -341,11 +355,21 @@ for (z = 0; z < 9; z++)
341355 hotslot[z, 3] = 1;
342356 temp = true;
343357 }
344- else if (mouse_check_button_pressed(mb_left))
358+ else
359+ {
360+ if (mouse_check_button_pressed(mb_left))
345361 {
346362 hotslot[z, 0] = 0;
347363 hotslot[z, 3] = 0;
348- }
364+ if (hotslot[z, 1] == 2) {hotslot[z, 1] = 0;}
365+ }
366+ if (mouse_check_button_pressed(mb_right))
367+ {
368+ drawTip = z;
369+ drawTipTempIndex = z;
370+ }
371+
372+ }
349373 }
350374
351375 if (hotslot[z, 0] != 0)
@@ -354,9 +378,9 @@ for (z = 0; z < 9; z++)
354378 }
355379
356380 // Check if item still exists in the inventory && draw it's count
357- clr();
381+ clr(-1, hudAlpha );
358382 var number = -1;
359- if (hotslot[z, 3] != 0 && !temp)
383+ if (hotslot[z, 3] != 0 && !temp && hotslot[z, 1] != 2 )
360384 {
361385
362386 number = inventoryNumber(hotslot[z, 0]);
@@ -378,6 +402,50 @@ for (z = 0; z < 9; z++)
378402
379403 qx += 48;
380404 }
405+ qx = 184 + view_xview + 4;
406+ qy = 548 + view_yview - 36;
407+
408+ if (drawTip != -1) {if (mouse_check_button_released(mb_right)) {drawTip = -1;}}
409+
410+ if (drawTip != -1) {drawTipAlpha = lerp(drawTipAlpha, 1, 0.1);}
411+ else {drawTipAlpha = lerp(drawTipAlpha, 0, 0.1);}
412+
413+ if (drawTipAlpha > 0.02)
414+ {
415+ spells = array_length_1d(oSpellMenu.spellUnlocked);
416+ tx = 0;
417+
418+ for (i = 0; i < spells; i++)
419+ {
420+ if (!oSpellMenu.spellUnlocked[i]) {continue;}
421+
422+ clr(c_black, drawTipAlpha / 2 + spellAlpha[i]);
423+ draw_sprite_stretched(sSpells, oSpellMenu.spellDetails[i,2], qx + (tx * 48), qy, 32, 32);
424+ clr(c_black, drawTipAlpha);
425+ draw_circle(qx + (tx * 48) + 15, qy + 15, 16, true);
426+
427+
428+ if (mouse_in(qx + (tx * 48), qx + (tx * 48) + 32, qy, qy + 32))
429+ {
430+ if (drawTip != -1)
431+ {
432+ spellAlpha[i] = lerp(spellAlpha[i], 0.5, 0.1);
433+ }
434+ else {spellAlpha[i] = lerp(spellAlpha[i], 0, 0.1);}
435+
436+ if (mouse_check_button_released(mb_right))
437+ {
438+ hotslot[drawTipTempIndex, 1] = 2;
439+
440+ if (tx == SpellEnum.spellFlash) {hotslot[drawTipTempIndex, 3] = sSpellFlash;}
441+ }
442+
443+ }
444+ else {spellAlpha[i] = lerp(spellAlpha[i], 0, 0.1);}
445+ tx++;
446+ }
447+ }
448+
381449/*
382450// Draw binded spells
383451alg("default", fntPixelHuge);
0 commit comments