Advertisement

Author Topic: Several Colors on Airplane Hud "Solved"  (Read 2036 times)

0 Members and 1 Guest are viewing this topic.

Offline nuxil

  • Members
  • *
Several Colors on Airplane Hud "Solved"
« on: 13 Sep 2008, 06:38:34 »
Hi all

is there a way to define diffrent colors for subclasses in class Draw?



i want the circle to be one color, "the aming of bomb" and the targetbox another,
is this possible?

inside class Draw
Code: [Select]
class Missile
{
alpha = 1;
color[] = {1, 0, 0};
condition = "missile";
class Circle
{
type = "line";
points[] = {LONGLINE};
};
class TargetA
{
type = "line";
points[] = {LONGLINE};
};
class TargetB
{
type = "line";
points[] = {LONGLINE};
};
};

i tried to put in color in each subclass. but it has no effect,

any ideas anyone?
« Last Edit: 19 Sep 2008, 02:24:23 by nuxil »

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: A Airplane Hud Question
« Reply #1 on: 13 Sep 2008, 12:54:13 »
Sorry nuxil, never experimented in this area. Maybe someone else has ....

Offline nuxil

  • Members
  • *
Re: A Airplane Hud Question
« Reply #2 on: 18 Sep 2008, 23:43:48 »
dang..
it doesnt seam to work having 2 colors on 1 subclass.
im gonna try definig a new subclass. i think that should work as long as i use condition="missile" in it.

i'll have it a try..

edit:
yay it works


« Last Edit: 19 Sep 2008, 00:54:49 by nuxil »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Several Colors on Airplane Hud "Solved"
« Reply #3 on: 19 Sep 2008, 09:45:30 »
Could you write up a little more specific step-by-step process (maybe copy-paste your config?) to this topic so that other people can profit from your findings too? :) Thanks!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline nuxil

  • Members
  • *
Re: Several Colors on Airplane Hud "Solved"
« Reply #4 on: 19 Sep 2008, 12:14:32 »
Sure thing.

its actualy verry simple.

Code: [Select]
class AV8_MyAv8B : AV8B
{
                ...
                ...
        class MFD
{
#include "hud.hpp"
};
};

you added that lets. go to the hud.hpp file

i'll not post the entire file. as its way to long..

so in the hud.hpp file you scroll down until you see something called.

class Draw this is the place we want to alter & add things to,

Code: [Select]
class Draw {
alpha = 1;
color[] = {1, 1, 0};
clipTL[] = {0.0, 0.05};
clipBR[] = {1.0, 0.9};
condition = "on";
                .....
                .....
class PlaneW
{
clipTL[] = {0.0, 0.1};
clipBR[] = {1.0, 0.9};
class LineHL
{
type = "line";
points[] = {};
};
};
class Flypath
{
alpha = 1;
color[] = {0, 1, 0};
class Velocity
{
type = "line";
points[] = {};
};
};

class Missile
{
alpha = 1;
color[] = {1, 0, 0};
condition = "missile";
class Circle
{
type = "line";
points[] = {};
};
};

class MissileTarget
{
alpha = 1;
color[] = {0, 0, 1};
condition = "missile";
class Target
{
type = "line";
points[] = {};
};
};
 ....
 ....
};

i did remove the points and unrelated classes in this example. dont worry about that tho..

Lets start with class Flypath in class Draw. this is a new class that has to be made is you want  to change colors for the flypath.. in this classs there is a class called class Velocity
this class was orginaly in class PlaneW. this is the little green box in my picture showing flypath,

Next lets move to class Missile

in this class you should see something called Target. so to change the color of your target "LOCKON"
cut out this class. so the only class in Missile is class Circle. this is the Red Circle you see in my picture,

paste class Target outside class Missile. in example class MissileTarget. as i did,
you see it still uses condition="missile"

now as it is outside class Missile you can change its color.

you still dont understand?
well sorry then.. i cant help you,
maybe you just need some more experimenting. that helps alot :)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Several Colors on Airplane Hud "Solved"
« Reply #5 on: 19 Sep 2008, 12:25:37 »
Marvellous stuff nuxil, this is what is needed to add to the knowledge base for the community, thanks.   :good:


Planck
I know a little about a lot, and a lot about a little.

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Several Colors on Airplane Hud "Solved"
« Reply #6 on: 19 Sep 2008, 12:31:06 »
Well done !

Offline Kremator

  • Members
  • *
Re: Several Colors on Airplane Hud "Solved"
« Reply #7 on: 14 Oct 2008, 18:38:35 »
nuxil,

Any chance of releasing a n00bs version of this (either as a replacement config or whatever) as this looks brilliant.  Just right for us flyboys !

[TAO] Kremator

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Several Colors on Airplane Hud "Solved"
« Reply #8 on: 23 Oct 2008, 21:34:47 »
great  :good:

---

Edit:

Do you intend to release some work based on this?

A "simple" fix to have the standard UI more visible alone would be VERY welcome.  :good:
« Last Edit: 09 Feb 2009, 20:02:27 by kju »