Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10111 in orxonox.OLD for branches/playability/src


Ignore:
Timestamp:
Dec 19, 2006, 11:32:32 PM (18 years ago)
Author:
muellmic
Message:

placed container for ship values into hud

Location:
branches/playability/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/util/hud.cc

    r10092 r10111  
    2323#include "world_entities/weapons/weapon_manager.h"
    2424#include "glgui_widget.h"
     25#include "glgui_box.h"
    2526
    2627#include "glgui_inputline.h"
     
    6364  this->subscribeEvent(ES_ALL, SDLK_TAB);
    6465
    65 
     66  this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
     67  this->shipValuesBox->setBackgroundTexture("maps/gui_container_background.png");
    6668}
    6769
     
    105107  {
    106108    this->energyWidget->show();
    107     //this->energyWidget->setBackgroundTexture( "hud_energy_background.png");
    108109    this->energyWidget->shiftDir2D(270);
     110    //this->energyWidget->setDisplayedName("Electronics")
     111    this->shipValuesBox->pack(this->energyWidget);
    109112    /*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
    110113        this->energyWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
     
    229232  }
    230233
    231 
    232   if (this->energyWidget != NULL)
    233   {
    234     this->energyWidget->setAbsCoor2D(0.2 * this->resX, 0.85 * this->resY);
    235     this->energyWidget->setWidgetSize(.25 * this->resX, 0.1 * this->resY);
     234 
     235  if (this->shipValuesBox != NULL)
     236  {
     237    this->shipValuesBox->setAbsCoor2D(0.2 * this->resX, 0.85 * this->resY);
     238    this->shipValuesBox->setWidgetSize(.4 * this->resX, 0.1 * this->resY);
    236239  }
    237240
  • branches/playability/src/util/hud.h

    r9965 r10111  
    99#include "element_2d.h"
    1010#include "event_listener.h"
     11#include "glgui_box.h"
    1112
    1213
     
    6263  OrxGui::GLGuiWidget*     shieldWidget;
    6364  OrxGui::GLGuiWidget*     armorWidget;
     65  OrxGui::GLGuiBox*        shipValuesBox;
    6466
    6567  OrxGui::GLGuiNotifier*   notifier;
  • branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc

    r10107 r10111  
    3232
    3333    this->_bar.setSize2D(100, 30);
     34    this->_name.setRelCoor2D(20,0);
     35    this->_valueText.setRelCoor2D(22,0);
     36
    3437    this->pack(&this->_name);
    3538    this->pack(&this->_valueText);
     
    3841    this->_name.setForegroundColor(Color(1,1,1,.8));
    3942    this->_valueText.setChangedTextColor(Color::white);
     43    this->_bar.setBackgroundTexture(Texture());
    4044
    41     //this->setBackgroundTexture("maps/gui_element_background_2.png");
    42     this->setBackgroundColor(Color(.5,.5,.5,1));
     45    this->setBackgroundTexture(Texture());
     46    this->setBackgroundColor(Color(.5,.5,.5,0));
    4347
    4448    //this->_name.setBackgroundTexture(Texture());
Note: See TracChangeset for help on using the changeset viewer.