From 77f36b451f9d713a81692db44b71ea9ea48c93a0 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Fri, 24 Apr 2020 17:47:44 +0100 Subject: [PATCH] More CWFs --- tbboxx.cc | 2 +- vopts.cc | 2 +- vradiorec.cc | 4 ++-- vrecording.cc | 5 ++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tbboxx.cc b/tbboxx.cc index 4ecd324..8e7922f 100644 --- a/tbboxx.cc +++ b/tbboxx.cc @@ -63,7 +63,7 @@ void TBBoxx::draw() int xpos = 5; #ifdef GRADIENT_DRAWING if (icon) { - drawTVMedia(*icon, xpos,0,30,30,TopLeftLimited); + drawTVMedia(*icon, static_cast(xpos), 0,30,30,TopLeftLimited); xpos+=5+30; } #endif diff --git a/vopts.cc b/vopts.cc index 8a96f73..ca8c3b4 100644 --- a/vopts.cc +++ b/vopts.cc @@ -504,7 +504,7 @@ void VOpts::processMessage(Message* m) { BoxStack::getInstance()->update(this); } - else if (x<0 || y <0 || x>(int)getWidth() || y>(int)getHeight()) + else if (coordsOutsideBox(m)) { BoxStack::getInstance()->handleCommand(Input::BACK); //simulate cancel press } diff --git a/vradiorec.cc b/vradiorec.cc index fc54662..673ea77 100644 --- a/vradiorec.cc +++ b/vradiorec.cc @@ -274,8 +274,8 @@ void VRadioRec::processMessage(Message* m) { if (m->message == Message::MOUSE_LBDOWN) { - int x = m->parameter - (int)getScreenX(); - int y = m->tag - (int)getScreenY(); + int x = m->parameter - getScreenX(); + int y = m->tag - getScreenY(); if (!barShowing) { boxstack->handleCommand(Input::OK); //simulate rok press diff --git a/vrecording.cc b/vrecording.cc index 3ae8b98..c9936a7 100644 --- a/vrecording.cc +++ b/vrecording.cc @@ -173,9 +173,8 @@ void VRecording::draw() } if (poster.height) { // float aspect=((float)poster.height)/((float)poster.width)/Osd::getInstance()->getPixelAspect(); - drawTVMedia(poster.info,buttonRegion.x, - tabbar.getY2()-3, - buttonRegion.w,/*buttonRegion.w*aspect*/0.f,BottomLeft); + drawTVMedia(poster.info, static_cast(buttonRegion.x), static_cast(tabbar.getY2() - 3), + static_cast(buttonRegion.w), /*buttonRegion.w*aspect*/ 0.f, BottomLeft); } } -- 2.39.2