Ghostbuck

Custom Text Box

14 posts in this topic

Hello All,

I am working on my first series of scripts for my server.  I am able to display messages via system chat, hint, and using structured text.  What I would like to do though is set a background color for my text boxes.  I tried the attribute "colorBackground" as well as html styling rules but never see the background color set.  I can change font, font color, insert images, etc...  I would like to mimic the DMS mission notifications and tried triggering the same events from the DMS scripts.  I am not sure if it is just because I am still working in the editor but cant seem to set Background color on any of my notifications.  I have been referencing this documentation:  Structured Text  What am I missing?

Share this post


Link to post
Share on other sites
["<t color='#ff0000' size = '.8'>Warning!<br />Stop doing what you are doing</t>",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;

that what your looking for?

Share this post


Link to post
Share on other sites
Advertisement

I cannot test the code at the moment but just looking at it, I do not see anything about specifying background color, am I missing it?  I see it setting the text color to red.  Not sure I know what the last set of parameters are doing though.

Share this post


Link to post
Share on other sites

Thanks for the quick replies metal man.  I actually did try hint.  You are correct, it does display a black background.  I guess I was hoping for a little more control.  I noticed on some servers that have the "invasion" missions, which I think is part of DMS, when an invasion happens, a white box appears on the bottom of the screen.  It shows an icon on the left plus the details of where the invasion happened.  Also, on other missions, it will display a box in the top left, similar to hint with the black background, but there will be a header bar that is blue or yellow.  It gave me the impression there was a way to customize the displayed text boxes.  Would love to mimic the "Invasion" one.  

 

I found DMS is referencing BIS_fnc_dynamicText, like in your original post, but I cannot get a background to display with it.

Share this post


Link to post
Share on other sites

Invasion missions are a part of VEMFr and IT07 has a lot of animations and stuff to make that notification look good. 

If you are wanting something with a background to display on screen, you will need to look into actual GUI for Arma. You would end up using RscTitles to display it on screen while the player is playing. For the actual GUI, you would end up using RscText for background, and probably RscStructuredText for the text. Then fade it in and out based on when the notification gets called. 

This might be helpful:
https://community.bistudio.com/wiki/Category:Command_Group:_GUI_Control

Sorry I couldn't give you much else, it would take me a long time to explain exactly how to do this but hopefully that will push you towards the right path.  

2 people like this

Share this post


Link to post
Share on other sites

Thanks for Wolf, that link looks very helpful.  Also, thanks for the clarification on where the invasions come from, did not realize it was a different mod.

Share this post


Link to post
Share on other sites

Just to confirm, I was able to get it to work.  Thanks for the link Wolf, that plus this tutorial helped me display text with backgrounds!

Share this post


Link to post
Share on other sites
23 hours ago, Ghostbuck said:

Thanks for the quick replies metal man.  I actually did try hint.  You are correct, it does display a black background.  I guess I was hoping for a little more control.  I noticed on some servers that have the "invasion" missions, which I think is part of DMS, when an invasion happens, a white box appears on the bottom of the screen.  It shows an icon on the left plus the details of where the invasion happened.  Also, on other missions, it will display a box in the top left, similar to hint with the black background, but there will be a header bar that is blue or yellow.  It gave me the impression there was a way to customize the displayed text boxes.  Would love to mimic the "Invasion" one.  

 

I found DMS is referencing BIS_fnc_dynamicText, like in your original post, but I cannot get a background to display with it.

yea he's right VEMFr uses a lot of custom displays and i don't think he would be happy if you stole it. I recommend you just learn from that tutorial and make something custom. Much better

Share this post


Link to post
Share on other sites

Oh, I own my own software company and would never steal someone else's work.  I have just been trying to reference other people's code to learn how to setup my own framework.  All my stuff is developed by me but definitely informed by other people's work.  In this case, I have not referenced VEMFr's code, I just assumed it was part of DMS the way it worked.  I saw the notifications on someone else's server.

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

  • Recently Browsing   0 members

    No registered users viewing this page.