Commit 55bc0034 authored by Thibault Soucarre's avatar Thibault Soucarre
Browse files

fusionned draw_container and draw_container_text

parent 6a4e83d5
...@@ -155,7 +155,7 @@ public: ...@@ -155,7 +155,7 @@ public:
* \param w the width of the container * \param w the width of the container
* \param h the height of the container * \param h the height of the container
*/ */
inline void draw_container(const Element_pos x, const Element_pos y, const Element_pos w, const Element_pos h){ inline void draw_container(const Element_pos x, const Element_pos y, const Element_pos w, const Element_pos h, const std::string &value){
Container_ buf; Container_ buf;
...@@ -166,6 +166,13 @@ public: ...@@ -166,6 +166,13 @@ public:
_containers.push_back(buf); _containers.push_back(buf);
Container_text_ buft;
buft.x = x;
buft.y = y + h/2;
buft.value = value;
_container_texts.push_back(buft);
if ((x+w)>Info::Container::x_max) if ((x+w)>Info::Container::x_max)
Info::Container::x_max = x+w; Info::Container::x_max = x+w;
...@@ -197,12 +204,12 @@ public: ...@@ -197,12 +204,12 @@ public:
*/ */
inline void draw_container_text(const Element_pos x, const Element_pos y, const std::string value){ inline void draw_container_text(const Element_pos x, const Element_pos y, const std::string value){
Container_text_ buf; /*Container_text_ buf;
buf.x = x; buf.x = x;
buf.y = y; buf.y = y;
buf.value = value; buf.value = value;
_container_texts.push_back(buf); _container_texts.push_back(buf);*/
} }
/*! /*!
...@@ -534,13 +541,13 @@ public: ...@@ -534,13 +541,13 @@ public:
} }
// position += browse_container(draw_object, *i, position, 0,container); // position += browse_container(draw_object, *i, position, 0,container);
......
...@@ -369,8 +369,8 @@ public: ...@@ -369,8 +369,8 @@ public:
//Element_pos x = depth *(_container_width +_container_h_space) + _container_h_space/2; //Element_pos x = depth *(_container_width +_container_h_space) + _container_h_space/2;
//Element_pos y = position*(_container_height+_container_v_space) + _container_v_space/2; //Element_pos y = position*(_container_height+_container_v_space) + _container_v_space/2;
//Element_pos height = size *(_container_height+_container_v_space) - _container_v_space; //Element_pos height = size *(_container_height+_container_v_space) - _container_v_space;
draw_object->draw_container(x, y+_container_v_space/2, w, h); draw_object->draw_container(x, y+_container_v_space/2, w, h, text);
draw_object->draw_container_text(x, y+h/2, text); //draw_object->draw_container_text(x, y+h/2, text);
} }
/*! /*!
......
whites/* /*
** This file is part of the ViTE project. ** This file is part of the ViTE project.
** **
** This software is governed by the CeCILL-A license under French law ** This software is governed by the CeCILL-A license under French law
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment