Sign in to follow this  
Followers 0
Lunchbox

[Release] [UI Edit] Unit conversion: Celsius to Fahrenheit temperature conversion.

4 posts in this topic

Posted (edited)

!!! READ ALL DIRECTIONS THOROUGHLY  !!!!

I figured I would provide this so American servers could display Fahrenheit instead of Celsius.

1. Download: Download here (mega.co.nz link). ( Make sure you click the gray "Download through your browser". Don't install that MegaSync crap. )
2. Copy downloaded file into the mission file.
3. Edit config.cpp under CfgExileCustomCode:

ExileClient_gui_hud_renderStatsPanel = "ExileClient_gui_hud_renderStatsPanel.sqf";

4. Done.

That was easy, wasn't it?

Edit: Forgot to place the newly created variables into the private array.

Edited by Lunchbox
2 people like this

Share this post


Link to post
Share on other sites

Posted (edited)

Oh yea that's WAY better.... makes WAYYYYYYY more sense than......... Celsius.... I'd be scared to go into some of these Euro's homes probably find beakers and lab coats everywhere (jk around don't ban me)...  Hey for the final touch do you know how I can get rid of the decimal numbers? Just have  a good ol' American ROUND WHOLE NUMBER?? Edit: I guess it might be in the format but not sure exactly how to change it, well I'll just try some stuff...

Edited by Emton

Share this post


Link to post
Share on other sites
Advertisement

Posted (edited)

16 hours ago, Emton said:

Oh yea that's WAY better.... makes WAYYYYYYY more sense than......... Celsius.... I'd be scared to go into some of these Euro's homes probably find beakers and lab coats everywhere (jk around don't ban me)...  Hey for the final touch do you know how I can get rid of the decimal numbers? Just have  a good ol' American ROUND WHOLE NUMBER?? Edit: I guess it might be in the format but not sure exactly how to change it, well I'll just try some stuff...

Yeah, it's pretty easy. 

Note: I know I spelled environment wrong, I did it on purpose so I could differentiate from my code and the code that was unchanged. Don't judge me. :P

Under this:

_FbodyTemperature = _bodyTemperature * 1.8 + 32;

add:

_FbodyTemperatureRound = round (_FbodyTemperature);

Change:

_bodyTemperatureValueControl ctrlSetText format ["%1%2", _FbodyTemperature, "°F"];

to:

_bodyTemperatureValueControl ctrlSetText format ["%1%2", _FbodyTemperatureRound, "°F"];


Then under this:

_Fenvironmantvalue = _Cenvironmantvalue * 1.8 + 32;

add:

_FenvironmantvalueRound = round (_Fenvironmantvalue);

Change: 

_environmentTemperatureValueControl ctrlSetText format ["%1%2", _Fenvironmantvalue, "°F"];

To:

_environmentTemperatureValueControl ctrlSetText format ["%1%2", _FenvironmantvalueRound, "°F"];

That should round it up to whole numbers for you. There are shorter ways of doing what I did, but I am lazy. 

Changing

_FbodyTemperature = _bodyTemperature * 1.8 + 32;

to 

_FbodyTemperature = round (_bodyTemperature * 1.8 + 32);

Might work, but I am too tired to test at the moment. :P If the changes I suggested don't work, let me know.

Edited by Lunchbox

Share this post


Link to post
Share on other sites

I tried just adding the

_FbodyTemperature = round (_bodyTemperature * 1.8 + 32);

for both the body and environment and it works! This looks a lot better although I still have a bug where my body temp doesn't change (already had it before this script) hope I can fix that...

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.