Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/TextDialog.cpp

    r2ededc2 r5a7243  
    1010#include "UIElements/TextDialog.hpp"
    1111
     12#include "World.hpp"
     13#include "periodentafel.hpp"
    1214#include "atom.hpp"
    1315#include "molecule.hpp"
     
    4547void TextDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check) {
    4648  registerQuery(new VectorTextQuery(title,target,cellSize,check));
     49}
     50
     51void TextDialog::queryElement(const char* title, element **target){
     52  registerQuery(new ElementTextQuery(title,target));
    4753}
    4854
     
    113119
    114120bool TextDialog::VectorTextQuery::handle() {
     121 Log() << Verbose(0) << getTitle();
    115122 tmp->AskPosition(cellSize,check);
     123 return true;
    116124}
     125
     126
     127TextDialog::ElementTextQuery::ElementTextQuery(std::string title, element **target) :
     128    Dialog::ElementQuery(title,target)
     129{}
     130
     131TextDialog::ElementTextQuery::~ElementTextQuery()
     132{}
     133
     134bool TextDialog::ElementTextQuery::handle() {
     135  int Z;
     136  Log() << Verbose(0) << getTitle();
     137  cin >> Z;
     138  tmp = World::get()->getPeriode()->FindElement(Z);
     139  return tmp;
     140}
Note: See TracChangeset for help on using the changeset viewer.