NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 13 14 15 16 17 … 93 Next »
Video Overlay Graphics

 
  • 0 Vote(s) - 0 Average
Video Overlay Graphics
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,102
Threads: 957
Joined: May 2006
#11
2011-07-23, 06:42 PM
Hi again, why not use

Code:
string filename = "Wildlife.wmv";
Hashtable args = new Hashtable();
args["@message"] = "Are you sure you want to delete " + filename + " ?";
public SimpleMessageBox popup = new NUtility.Base.SimpleMessageBox(args, "OK", "Cancel", this);
PluginHelperFactory.GetPluginHelper().ActivatePopup(popup);

Then use the Plugin handler I gave a couple of days ago.

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#12
2011-07-23, 06:51 PM
Sorry, I probably didn't explain myself very well.

I know how to do that sort of message box already (pretty much identically to how you've suggested); what I was after was a popup as shown in the first image, but with buttons arranged like they are in the second.

Here's a badly stitched together example using both images:

[ATTACHMENT NOT FOUND]

I'd like buttons as circled in red, rather than the ones circled in blue, which is the best I can manage so far.

Iain
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,102
Threads: 957
Joined: May 2006
#13
2011-07-23, 07:24 PM
In another popup in SearchLite I used the code similar to what I gave you and added this in the constructor (I have more than two buttons).

Code:
PointF okOrigin = skinHelper.GetElementLocation("ScheduleRecording","okButton");
            SkinHelper globalSh = new SkinHelper("global.xml");
            SizeF okSize = globalSh.GetElementSize("PopupCenterButtonSelected");
            buttons[5] = new UiButton("PopupCenterButtonNormal", "PopupCenterButtonSelected", "OK", new Hashtable(), skinHelper);
            buttons[5].Location = new RectangleF(okOrigin.X - (okSize.Width / 2), okOrigin.Y - (okSize.Height / 2), okSize.Width, okSize.Height);
            okOrigin = skinHelper.GetElementLocation("ScheduleRecording", "cancelButton");
            buttons[6] = new UiButton("PopupCenterButtonNormal", "PopupCenterButtonSelected", "Cancel", new Hashtable(), skinHelper);
            buttons[6].Location = new RectangleF(okOrigin.X - (okSize.Width / 2), okOrigin.Y - (okSize.Height / 2), okSize.Width, okSize.Height);

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#14
2011-07-23, 09:50 PM
Yep, that works, thanks!

How do you get the buttons to "work" though? Both of them are now showing up for me, but neither has the highlight or responds to user interaction. There must be something else I'm still missing?

Iain
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,102
Threads: 957
Joined: May 2006
#15
2011-07-23, 10:03 PM
My solution isn't very elegant since I manually maintain the index to the active button which I modify based on OnKeyDown() and OnDblClick() and OnClick() actions. Sub might have a better answer. buttons[#].Selected = true seems to control the highlighting.

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#16
2011-07-23, 10:19 PM
mvallevand Wrote:My solution isn't very elegant
Maybe not, but again it works, and that counts for a hell of lot in my book Smile

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#17
2011-07-24, 12:54 AM
imilne Wrote:How do you get the buttons to "work" though?
Its pretty manual. If you've added a UiButton to your screen, then you need to give it a chance to respond to clicks etc. So, you'd typically override events like OnClick(), and give the buttons a chance to respond. ie, something like:

Code:
public override bool OnClick(PointF location)
{
    if (myOKButton.OnClick(location))
    {
        HandleCommand("MY_OK_BUTTON_CLICKED_EVENT);
        return true;
    }
    else if (myCancelButton.OnClick(location))
    {
        HandleCommand("MY_CANCEL_BUTTON_CLICKED_EVENT);
        return true;
    }
    ....any other controls here...
    return false;
}


In the same way you'd probably override OnKeyDown to implement navigation between the controls you've got.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Video streaming URL and parameters? cncb 1 1,917 2021-10-22, 06:58 PM
Last Post: sub
  Extras device - using hardware video encoder gdogg371 6 3,366 2021-03-09, 12:18 AM
Last Post: gdogg371
  Loading Local Video Files Syler 25 6,893 2021-03-07, 09:20 PM
Last Post: Syler
  Resuming a video imilne 28 15,015 2016-10-30, 09:27 PM
Last Post: mvallevand
  How to tell when video playback has finished in web client? cncb 6 4,371 2015-09-29, 08:07 PM
Last Post: cncb
  VIdeo playback from plugin mvallevand 5 3,600 2015-08-06, 10:43 PM
Last Post: sub
  Inset Video - Stop mvallevand 2 2,123 2013-08-07, 09:57 PM
Last Post: mvallevand
  Video Library Fanart Transparency tieke 7 4,026 2013-01-09, 08:23 AM
Last Post: tieke
  NMT Video Playback - does it receive start/stop events psycik 8 3,524 2012-07-15, 10:01 PM
Last Post: mvallevand
  Resume or Restart dialog for video psycik 6 3,122 2011-12-22, 02:52 AM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode