Answer the question
In order to leave comments, you need to log in
How to switch different screen modes in an application, C++?
I really need help. I hope the problem is more or less clearly described:
There is an application, openframeworks, C ++.
Now draws both a list of links ( drawlist() ) and a graph ( drawscene () ).
It is necessary that at first only a list is displayed, and when you press tabulation, it changes to a graph. and so on, so that, in short, with tabulation each time either a list or a graph. Roughly speaking - two interface modes.
In theory, you need to do something with bool (false / true) .
part of code:
Dock.h:
List list;
List listFilter;
bool listFilterMode;
Dock.ccp:
void Dock::draw(){
.........
............
if(listFilterMode) listFilter.drawlist();
else list.drawlist();
drawScene();
}
void Dock::keyPress(int key){
if (key == OF_KEY_TAB)
}
Answer the question
In order to leave comments, you need to log in
void Dock::draw()
{
...
if(listFilterMode)
{
listFilter.drawlist();
listFilterMode = false;
}
else
{
list.drawList();
listFilterMode = true;
}
drawScene();
}
void Dock::keyPress(int key)
{
if(key == OF_KEY_TAB)
{
draw();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question