Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2007, 7:16:00 PM (18 years ago)
Author:
muellmic
Message:

interface changes

Location:
branches/playability/src/world_entities/elements
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc

    r10200 r10230  
    3030  GLGuiEnergyWidgetVertical::GLGuiEnergyWidgetVertical ()
    3131  {
    32     //   this->setClassID(CL_PROTO_ID, "GLGuiEnergyWidget");
    33 
    34     //this->_bar.setSize2D(100, 30);
    35     //this->_bar.setRelCoor2D(-10,0);
    36     //this->_name.setRelCoor2D(20,0);
    37     //this->_valueText.setRelCoor2D(,0);
    38     this->setAbsDir2D(270);
    39     //std::cout << "absAngle: " << int(this->getAbsDir2D()) << ", relAngle: " << int(this->getRelDir2D()) << '\n';
    40     //this->setOrientation(OrxGui::Vertical);
    41 
    42     //this->pack(&this->_name);
    43     //this->pack(&this->_valueText);
    44 
    45     this->_image.setParent2D(this);
    46     this->_image.setBorderTop(0);
    47     this->_image.setBorderLeft(0);
    48     this->_image.setBorderRight(0);
    49     this->_image.setBorderBottom(0);
    50     this->_image.setWidgetSize(30,30);
    51     this->_image.setForegroundColor(Color(1,1,1,0.6));
    52     this->_image.setBackgroundColor(Color(1,1,1,0));
    53     this->_image.setBackgroundTexture(Texture());
    54     this->_image.loadImageFromFile("maps/evil-flower.png");
    55     //this->_image.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D());
    56     this->_image.setRelCoor2D(0,0);
    57     this->_image.setRelDir2D(90);
    58     this->_image.setVisibility(true);
    59 
    60     this->_valueText.setParent2D(this);
    61     this->_valueText.setWidgetSize(100,20);
    62     //this->_valueText.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D());
    63     this->_valueText.setRelCoor2D(0,0);
    64     this->_valueText.setChangedTextColor(Color::white);
    65 
    66     this->setBackgroundTexture(Texture());
    67     this->setBackgroundColor(Color(1,1,1,0.5));
    68     this->setBorderTop(10);
    69     this->setBorderLeft(10);
    70     this->setBorderRight(10);
    71     this->setBorderBottom(10);
    72     this->setWidgetSize(120,50);
    73     this->setVisibility(true);
    74    
    75 
    76     //this->_name.setBackgroundTexture(Texture());
    77     //this->_valueText.setBackgroundTexture("maps/gui_element_background_2.png");
    78 
    79     this->_bar.setParent2D(&this->_valueText);
    80     this->_bar.setBackgroundTexture(Texture());
    81     this->_bar.setBackgroundColor(Color(0,0,0,0));
    82     this->_bar.setForegroundTexture("maps/gui_element_background_faded.png");
    83     this->_bar.setForegroundColor(Color(.5, .5, .5, 1));
    84     this->_bar.setChangedValueColor(Color::black);
    85     this->_bar.setBorderTop(0);
    86     this->_bar.setBorderLeft(0);
    87     this->_bar.setBorderRight(0);
    88     this->_bar.setBorderBottom(0);
    89     this->_bar.setWidgetSize(100,30);
    90     //this->_bar.setRelCoor2D(borderLeft(), 0);
    91     this->_bar.setRelCoor2D(0,0);
    9232  }
    9333
     
    13272  void GLGuiEnergyWidgetVertical::showing()
    13373  {
     74    this->setAbsDir2D(270);
     75    this->setBackgroundTexture(Texture());
     76    this->setBackgroundColor(Color(1,1,1,0));
     77    this->setBorderTop(10);
     78    this->setBorderLeft(10);
     79    this->setBorderRight(10);
     80    this->setBorderBottom(10);
     81    this->setWidgetSize(120,50);
     82
     83    this->_bar.setParent2D(&this->_valueText);
     84    this->_bar.setBackgroundTexture(Texture());
     85    this->_bar.setBackgroundColor(Color(0,0,0,0));
     86    this->_bar.setForegroundTexture("maps/gui_element_background_faded.png");
     87    this->_bar.setForegroundColor(Color::green);
     88    this->_bar.setChangedValueColor(Color(1,0,0,0.2));
     89    this->_bar.setBorderTop(0);
     90    this->_bar.setBorderLeft(0);
     91    this->_bar.setBorderRight(0);
     92    this->_bar.setBorderBottom(0);
     93    this->_bar.setWidgetSize(100,30);
     94    //this->_bar.setRelCoor2D(borderLeft(), 0);
     95    this->_bar.setRelCoor2D(0,0);
     96    this->_bar.show();
     97 
     98    this->_image.setParent2D(this);
     99    this->_image.setBorderTop(0);
     100    this->_image.setBorderLeft(0);
     101    this->_image.setBorderRight(0);
     102    this->_image.setBorderBottom(0);
     103    this->_image.setWidgetSize(30,30);
     104    this->_image.setForegroundColor(Color(1,1,1,0.6));
     105    this->_image.setBackgroundColor(Color(1,1,1,0));
     106    this->_image.setBackgroundTexture(Texture());
     107    this->_image.loadImageFromFile("maps/evil-flower.png");
     108    //this->_image.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D());
     109    this->_image.setRelCoor2D(0,0);
     110    this->_image.setRelDir2D(90);
     111    this->_image.setVisibility(true);
    134112    this->_image.show();
     113
     114    this->_valueText.setParent2D(this);
     115    this->_valueText.setWidgetSize(100,20);
     116    //this->_valueText.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D());
     117    this->_valueText.setRelCoor2D(0,0);
     118    this->_valueText.setChangedTextColor(Color::black);
    135119    this->_valueText.show();
    136     this->_bar.show();
    137     //this->show();
    138120  }
    139121
  • branches/playability/src/world_entities/elements/glgui_energywidgetvertical.h

    r10200 r10230  
    2727    void setDisplayedImage(const std::string& imageName);
    2828
    29     inline GLGuiWidget* getImageWidget() {return &this->_image;};
    30     inline GLGuiWidget* getValueWidget() {return &this->_valueText;};
    31     inline GLGuiWidget* getBarWidget() {return &this->_bar;};
     29    inline GLGuiImage* getImageWidget() {return &this->_image;};
     30    inline GLGuiText* getValueWidget() {return &this->_valueText;};
     31    inline GLGuiBar* getBarWidget() {return &this->_bar;};
    3232
    3333  protected:
  • branches/playability/src/world_entities/elements/glgui_radar.cc

    r9019 r10230  
    122122          this->_dotLists[i].positions.push_back(Vector2D(((*it)->getAbsCoor().x - _centerNode->getAbsCoor().x) * this->getSizeX2D() ,
    123123                                                 ((*it)->getAbsCoor().z - _centerNode->getAbsCoor().z) * this->getSizeY2D()  )
    124                                                  / (2.0f * _range));
     124                                                 / (3.0f * _range));
    125125        }
    126126
Note: See TracChangeset for help on using the changeset viewer.