Created
March 21, 2021 01:12
-
-
Save Azaezel/0b9ab6bcdfaeef34835e7318840f5dcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new guiAnimBitmapCtrl(ChargeBarCtrl) { | |
animTexTiling = "16 8"; | |
animTexFrames = "0-121"; | |
Loop = "0"; | |
play = "0"; | |
reverse = "0"; | |
fps = "60"; | |
curFrame = "0"; | |
bitmap = "data/Cogflicts/art/gui/chargebar.png"; | |
color = "206 182 182 255"; | |
position = "448 320"; | |
extent = "128 128"; | |
minExtent = "8 2"; | |
horizSizing = "center"; | |
vertSizing = "center"; | |
profile = "GuiDefaultProfile"; | |
visible = "1"; | |
active = "1"; | |
tooltipProfile = "GuiToolTipProfile"; | |
hovertime = "1000"; | |
isContainer = "1"; | |
canSave = "1"; | |
canSaveDynamicFields = "0"; | |
function clientCmdsetChargeBar(%playerClass,%maximumWeaponCharge) | |
{ | |
$maximumWeaponCharge = %maximumWeaponCharge; | |
%color1 = $hudColor[%playerClass,1]; | |
%color2 = $hudColor[%playerClass,2]; | |
ChargeBarCtrl.color = %color1; | |
chargeback.color = %color2; | |
playerHealth.textColor = %color1.x/256 SPC %color1.y/256 SPC %color1.z/256 SPC 1.0; //textcolor is a colorF, so 0-1 range | |
PlayerInfoBG.color = %color2; | |
playerICO.bitmap = "data/Cogflicts/art/gui/charIcons/ico"@ %playerClass; | |
playerICOBG.bitmap = "data/Cogflicts/art/gui/charIcons/ico"@ %playerClass @"BGBig"; | |
} | |
function clientCmdstartChargeBar() | |
{ | |
ChargeBarCtrl.fps = 60/(60*$maximumWeaponCharge/ChargeBarCtrl.getNumFrames()); | |
ChargeBarCtrl.curFrame = "0"; | |
ChargeBarCtrl.play = true; | |
} | |
function clientCmdstopChargeBar(%maximumCharge) | |
{ | |
ChargeBarCtrl.play = false; | |
schedule(500,0,"clearChargeBar"); | |
} | |
function clearChargeBar() | |
{ | |
ChargeBarCtrl.curFrame = "0"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment