NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 31 32 33 34 35 … 93 Next »
So, about this StandardButtonOrigin...

 
  • 0 Vote(s) - 0 Average
So, about this StandardButtonOrigin...
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#1
2008-05-22, 10:17 PM
Alright, so. StandardButtonOrigin is defined in a placement in baseskin.xml in both Blue and CommunitySkin3. It take it to mean this is the well, origin value of the standard button lists. Fair enough, I'm on board so far.

With this in mind, should I, in my plugin, be able to access it directly as if it were a placement in the plugin's xml file? That is, remove any mention of the button list from my xml, and just rely on StandardButtonOrigin, the idea being to pick up default values as defined by the skin, rather than my own.

And if I do, what risks am I taking? Is this a placement that all skins [/i]should[/i] have, or am I exchanging convenience in one place for inconvenience in another - namely, no button list at all for skins that don't have StandardButtonOrigin.

Also - I say 'should' be able to access, since attempting to use it as a placement without it being defined in my plugin's skin.xml gives me an error. (But one crises at a time...)

Aaaannnnddd...

I admit to being baffled by the values supplied in the location (loc=) defined for StandardButtonOrigin. Blue's loc is 12,12 - but that's not where it's being put. (Or it is and I just don't understand what is going on).

If I copy the line to my own skin, it is rendered as 12%,12%, as I would expect. But buttons are nowhere near 12% (for an x value anyway) in Video Library, for example.

So, do loc values have a different meaning when defined in baseskin.xml? Or is there something else going on that I'm not understanding?

I'll happily accept the latter (so much of my work with skins involved random fuddling with numbers), but am anxious to get a better feel for why I'm seeing what I am.

As always, thank you all.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#2
2008-05-23, 12:37 AM
From memory 12,12 is 12% of the way down the screen, and the middle of the button is 12% of the way across the screen. The reason it is the middle of the button, not the left, is because the "selected" and "normal" button are different sizes.

If you dont define a skin setting in your skin.xml, it'll fall back to looking in the baseskin.xml file.

I hope that answers the question.
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#3
2008-05-24, 08:35 PM
Hm, mostly, yes!

I'm still getting an error if I do not have the placement name in my local skin file, although, looking closer at it, it might be coming from JW's UI Library. (Or maybe not. I'm hoping he'll drop in and take a look at it as well.)

Code:
2008-05-24 14:25:39.890    VERBOSE    [1]    OnPaint()
2008-05-24 14:25:40.640    VERBOSE    [8]    Volume monitor thread started
2008-05-24 14:25:42.125    VERBOSE    [1]    Key pressed: Return
2008-05-24 14:25:42.171    VERBOSE    [1]    WizUiButtonList: ctor- PlacementName: StandardButtonOrigin
2008-05-24 14:25:42.171    VERBOSE    [1]    WizUiButton: ctor- PlacementName: StandardButtonOrigin caption: Select
2008-05-24 14:25:42.296    VERBOSE    [1]    ReturnToMainMenu()
2008-05-24 14:25:42.296    VERBOSE    [1]    Anime Library is currently active
2008-05-24 14:25:42.296    VERBOSE    [1]    Anime Library.Deactivate() called
2008-05-24 14:25:42.437    VERBOSE    [1]    ReturnToMainMenu()@2
2008-05-24 14:25:42.453    VERBOSE    [1]    System.NullReferenceException: Object reference not set to an instance of an object.
   at WizUtilities.WizUiHelper.WizUiButton..ctor(SkinHelper2 skinHelper, String placementName, String caption, String normalImageName, String selectedImageName, Int32 index, Boolean columnLayout)
   at WizUtilities.WizUiHelper.WizUiButton..ctor(SkinHelper2 skinHelper, String placementName, String caption, String normalImageName, String selectedImageName, Int32 index)
   at WizUtilities.WizUiHelper.WizUiButtonList..ctor(SkinHelper2 skinHelper, String placementName, String[] captions, String normalImageName, String selectedImageName, CommandCallback callback)
   at WizUtilities.WizUiHelper.WizUiButtonList..ctor(SkinHelper2 skinHelper, String placementName, String[] captions)
   at AniLibrary.GbPRVAniLibrary.Activate()
   at GBPVRX2.MenuTask.x9006c1ed9ccb79de.OnKeyDown(KeyEventArgs e)
   at GBPVRX2.x0061b801bdf12d35.xdae9991ab918b397(Object xdf2e3583f942db7b, KeyEventArgs xc4f45905cb1fc7ba)
   at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at GBPVRX2.x0061b801bdf12d35.WndProc(Message& m)

In Activate:

Code:
cmdButtonList = New WizUiButtonList(_SkinHelper, "StandardButtonOrigin", ButtonCaptionList())
ctlManager.AddControl(cmdButtonList)

For what it is worth, "Select" is indeed the caption of the first button.

All works well if I have CommonButtonOrigin in the local skin file, but it would be 'nice' to be able to use the standardized placements, if possible. (And if not possible, then, so be it!)
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#4
2008-05-25, 02:57 AM
I think this version of WizUiHelper.DLL (V1.0.16.5) should correct your problem.

I'd like to ask you not to release this version yet as it has several other changes (mostly performance related) that I want to finish testing before releasing for public use.

Thanks..

Al.
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#5
2008-05-25, 04:23 AM (This post was last modified: 2008-05-25, 04:45 AM by Ommina.)
As always, JavaWiz, thank you for the quick responses.

That version did, indeed, fix up the error I was getting before. But, (there's always a 'but', isn't there?), it left another. Although I'm not sure what can be done about it.

The button list does render now, however, it renders too far to the right. Looking at it, I would say that it is treating the loc supplied in the skin as the top left of the button, whereas sub is treating it as the top middle. (See comments above.)

While I'm sure that behaviour can be changed, it would break existing skins that are expecting the "top left" behaviour, which I wouldn't expect would be popular.

Would it be possible to indicate which method to use, with it defaulting to top left? If not, or if it is more effort than it it worth, I'm willing to forgo using the baseskin.xml version and just leaving it in the local xml file. I'm not that obsessed with removing one line from the skin.xml file!
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#6
2008-05-25, 04:42 AM
Ommina Wrote:I'm not that obsessed with removing one line from the skin.xml file!

I am Wink
sub Wrote:Are you trying to make sure I get nothing done today?
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#7
2008-05-25, 06:53 AM
Ommina Wrote:While I'm sure that behaviour can be changed, it would break existing skins that are expecting the "top left" behaviour, which I wouldn't expect would be popular.

Would it be possible to indicate which method to use, with it defaulting to top left? If not, or if it is more effort than it it worth, I'm willing to forgo using the baseskin.xml version and just leaving it in the local xml file. I'm not that obsessed with removing one line from the skin.xml file!
See attached WizUiHelper.DLL (v1.0.16.6).

There is a new method on the WizUiButtonList - StandardButtonOrigin().

Use it as follows:

Code:
// Create button list
[SIZE=2]cmdButtonList = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]WizUiButtonList[/COLOR][/SIZE][SIZE=2](skinHelper, [/SIZE][SIZE=2][COLOR=#a31515]"StandardButtonOrigin"[/COLOR][/SIZE][SIZE=2], captions);[/SIZE]
[SIZE=2]// Change XY postion from left, top to center, top[/SIZE]
[SIZE=2]cmdButtonList.CenterButtonOrigin();[/SIZE]
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#8
2008-05-25, 07:20 AM
Woo! You're far too kind, thank you again. You've made me and a penguin very happy.
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#9
2008-05-25, 08:25 AM
thanks alot javawiz, much appreciated!
sub Wrote:Are you trying to make sure I get nothing done today?
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#10
2008-05-25, 06:14 PM
Ommina Wrote:I'm not that obsessed with removing one line from the skin.xml file!

Ted the Penguin Wrote:I am Wink

Seconded.

As a plugin developer, it is of little concern. As a "skinner", its one of those things you can do to make the skin cohesive throughout, regardless of screen.

As a plugin developer, do what you need to do to be satisfied with your "product". Us xml jockey's can make do.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


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

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

Linear Mode
Threaded Mode