Added arrows in variable editor menu

This commit is contained in:
Andrea Cavalli 2017-05-17 22:28:19 +02:00
parent 234d43fe31
commit 3ab1e7102c
2 changed files with 3 additions and 2 deletions

View File

@ -202,7 +202,7 @@ public class BlockVariable extends Block {
mustRefreshMenu = false; mustRefreshMenu = false;
text = block.type.toString(); text = block.type.toString();
BinaryFont f = BlockContainer.getDefaultFont(true); BinaryFont f = BlockContainer.getDefaultFont(true);
width = 2+f.getStringWidth(text)+2; width = 7+f.getStringWidth(text)+7;
height = 2+f.getCharacterHeight()+2; height = 2+f.getCharacterHeight()+2;
super.beforeRender(delta, caret); super.beforeRender(delta, caret);
@ -232,10 +232,11 @@ public class BlockVariable extends Block {
popupY=screenSize[1]-height-1; popupY=screenSize[1]-height-1;
} }
r.glFillRect(location[0]+width/2-5, popupY+1, 10, 5, 163, 16, 10, 5); r.glFillRect(location[0]+width/2-5, popupY+1, 10, 5, 163, 16, 10, 5);
r.glFillColor(popupX, popupY+5, width, height); r.glFillColor(popupX, popupY+5, width, height);
r.glFillColor(popupX+2, popupY+4, width-4, height+2); r.glFillColor(popupX+2, popupY+4, width-4, height+2);
r.glFillColor(popupX-1, popupY+7, width+2, height-4); r.glFillColor(popupX-1, popupY+7, width+2, height-4);
r.glFillRect(popupX+2, popupY+5+height/2-7/2, 4, 7, 160, 21, 4, 7);
r.glFillRect(popupX+width-2-4, popupY+5+height/2-7/2, 4, 7, 172, 21, 4, 7);
r.glColor(color); r.glColor(color);
r.glDrawStringCenter(popupX+width/2, popupY+2+5, text); r.glDrawStringCenter(popupX+width/2, popupY+2+5, text);
} }

Binary file not shown.