a little improvement in input display
This commit is contained in:
parent
31d5f080dc
commit
e2643b4e69
|
@ -151,6 +151,20 @@ static TouchInfo temptouch;
|
|||
bool touchshadow = true;
|
||||
static std::vector<TouchInfo> touch (8);
|
||||
|
||||
static void TextualInputDisplay() {
|
||||
std::string displayStr = InputDisplayString;
|
||||
if(nds.isTouch) {
|
||||
std::stringstream ss;
|
||||
ss << " " << (nds.touchX >> 4) << " " << (nds.touchY >> 4);
|
||||
displayStr += ss.str();
|
||||
}
|
||||
|
||||
aggDraw.hud->lineColor(255,255,255,255);
|
||||
double x = Hud.InputDisplay.x;
|
||||
for (int i = 0; i < displayStr.length(); i++, x+=11.0) {
|
||||
aggDraw.hud->renderTextDropshadowed(x, Hud.InputDisplay.y, displayStr.substr(i,1));
|
||||
}
|
||||
}
|
||||
|
||||
static void TouchDisplay() {
|
||||
aggDraw.hud->lineWidth(1.0);
|
||||
|
@ -233,13 +247,9 @@ void DrawHUD()
|
|||
g_get_current_time(&time);
|
||||
hudTimer = ((s64)time.tv_sec * 1000) + ((s64)time.tv_usec/1000);
|
||||
|
||||
|
||||
if (CommonSettings.hud.ShowInputDisplay)
|
||||
{
|
||||
std::stringstream ss;
|
||||
if(nds.isTouch)
|
||||
ss << (nds.touchX >> 4) << " " << (nds.touchY >> 4);
|
||||
osd->addFixed(Hud.InputDisplay.x, Hud.InputDisplay.y, "%s",(InputDisplayString + ss.str()).c_str());
|
||||
TextualInputDisplay();
|
||||
TouchDisplay();
|
||||
}
|
||||
|
||||
|
|
|
@ -2586,7 +2586,7 @@ static std::string MakeInputDisplayString(u16 pad, const std::string* Buttons, i
|
|||
}
|
||||
|
||||
static std::string MakeInputDisplayString(u16 pad, u16 padExt) {
|
||||
const std::string Buttons[] = {"A", "B", "Sl", "St", "R", "L", "U", "D", "Rs", "Ls"};
|
||||
const std::string Buttons[] = {"A", "B", "s", "S", ">", "<", "^", "v", "R", "L"};
|
||||
const std::string Ext[] = {"X", "Y"};
|
||||
|
||||
std::string s = MakeInputDisplayString(pad, Ext, ARRAY_SIZE(Ext));
|
||||
|
|
|
@ -864,9 +864,10 @@ static void DoDisplay(bool firstTime)
|
|||
//we only do this once per emulated frame
|
||||
aggDraw.hud->attach((u8*)video.buffer, 256, 384, 1024);
|
||||
DoDisplay_DrawHud();
|
||||
CallRegisteredLuaFunctions(LUACALL_AFTEREMULATIONGUI);
|
||||
}
|
||||
|
||||
CallRegisteredLuaFunctions(LUACALL_AFTEREMULATIONGUI);
|
||||
|
||||
//apply user's filter
|
||||
video.filter();
|
||||
|
||||
|
|
Loading…
Reference in New Issue