mouse pointer shows multi click command state
This commit is contained in:
parent
42b289fe1e
commit
8c6dde365b
|
@ -1568,8 +1568,8 @@ void Renderer::renderMouse2d(int x, int y, int anim, float fade) {
|
|||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
|
||||
return;
|
||||
}
|
||||
float blue=0.0f;
|
||||
float green=0.4f;
|
||||
// float blue=0.0f;
|
||||
// float green=0.4f;
|
||||
if(game!=NULL && game->getGui()!=NULL){
|
||||
const Gui *gui=game->getGui();
|
||||
const Display *display=gui->getDisplay();
|
||||
|
@ -1579,21 +1579,21 @@ void Renderer::renderMouse2d(int x, int y, int anim, float fade) {
|
|||
const Texture2D *texture= display->getDownImage(downPos);
|
||||
renderTextureQuad(x+18,y-50,32,32,texture,0.8f);
|
||||
}
|
||||
else {
|
||||
// Display current commandtype
|
||||
const Unit *unit=NULL;
|
||||
if(gui->getSelection()->isEmpty()){
|
||||
blue=0.0f;
|
||||
green=0.1f;
|
||||
}
|
||||
else{
|
||||
unit=gui->getSelection()->getFrontUnit();
|
||||
if(unit->getCurrCommand()!=NULL && unit->getCurrCommand()->getCommandType()->getImage()!=NULL){
|
||||
const Texture2D *texture = unit->getCurrCommand()->getCommandType()->getImage();
|
||||
renderTextureQuad(x+18,y-50,32,32,texture,0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// // Display current commandtype
|
||||
// const Unit *unit=NULL;
|
||||
// if(gui->getSelection()->isEmpty()){
|
||||
// blue=0.0f;
|
||||
// green=0.1f;
|
||||
// }
|
||||
// else{
|
||||
// unit=gui->getSelection()->getFrontUnit();
|
||||
// if(unit->getCurrCommand()!=NULL && unit->getCurrCommand()->getCommandType()->getImage()!=NULL){
|
||||
// const Texture2D *texture = unit->getCurrCommand()->getCommandType()->getImage();
|
||||
// renderTextureQuad(x+18,y-50,32,32,texture,0.2f);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
float color1 = 0.0, color2 = 0.0;
|
||||
|
@ -1619,11 +1619,11 @@ void Renderer::renderMouse2d(int x, int y, int anim, float fade) {
|
|||
//border
|
||||
glLineWidth(2);
|
||||
glBegin(GL_LINE_LOOP);
|
||||
glColor4f(1.f, green, blue, color1);
|
||||
glColor4f(1.f, 0.2f, 0, color1);
|
||||
glVertex2i(x, y);
|
||||
glColor4f(1.f, green, blue, color2);
|
||||
glColor4f(1.f, 0.4f, 0, color2);
|
||||
glVertex2i(x+20, y-10);
|
||||
glColor4f(1.f, green, blue, color2);
|
||||
glColor4f(1.f, 0.4f, 0, color2);
|
||||
glVertex2i(x+10, y-20);
|
||||
glEnd();
|
||||
glPopAttrib();
|
||||
|
|
|
@ -566,6 +566,7 @@ void Gui::clickCommonCommand(CommandClass commandClass){
|
|||
break;
|
||||
}
|
||||
}
|
||||
computeDisplay();
|
||||
}
|
||||
|
||||
void Gui::mouseDownDisplayUnitSkills(int posDisplay) {
|
||||
|
|
Loading…
Reference in New Issue