Help! skinner newbie...
#1
Hi, I'm trying to write my first dialog...
To do so I wrote the custom1.xml file into the folder skin.transparency/720p:

Code:
<window id="4567" type="window">
  <defaultcontrol always="false">2</defaultcontrol>
  <allowoverlay>yes</allowoverlay>
  <backgroundcolor>0xff00ff00</backgroundcolor>
  <views>50,51,509,510<views>
  <visible>Window.IsActive(Home)</visible>
  <animation effect="fade" time="100">WindowOpen</animation>
  <animation effect="slide" end="0,576" time="100">WindowClose</animation>
  <zorder>1</zorder>
  <coordinates>
    <posx>40</posx>
    <posy>50</posy>
    <origin x="100" y="50">Window.IsActive(Home)</origin>
  </coordinates>
  <previouswindow>MyVideos</previouswindow>
  <controls>
     <control type="label" id="1">
        <description>My First label</description>
        <posx>80</posx>
        <posy>60</posy>
        <width>250</width>
        <visible>true</visible>
        <align>center</align>
        <aligny>center</aligny>
        <scroll>false</scroll>
        <label>6</label>
        <info>MusicPlayer.Artist</info>
        <number></number>
        <angle>30</angle>
        <haspath>false</haspath>
        <font>font14</font>
        <textcolor>FFB2D4F5</textcolor>
        <shadowcolor>ff000000</shadowcolor>
        <wrapmultiline>false</wrapmultiline>
        <scrollspeed>50</scrollspeed>
        <scrollsuffix> - </scrollsuffix>
  </control>
  </controls>
</window>

Then I modified the Includes_Home.xml one, changing the line 2062:

Code:
<onclick>ActivateWindow(Pictures)</onclick>

into this:

Code:
<onclick>ActivateWindow(4567)</onclick>

When I try it, nothing happens! Why? I don't understand...:confused2:
I copied what was in the wiki skinning tutorial...
Reply
#2
Try changing the name of the xml file to custom_mytest_4567.xml

I know it has to start with custom_ and end with _<windowid>
-stoli-
Reply
#3
the wiki lists all valid code that can be used in a window,
that doesn't mean you have to use it all. ;-)

some code even only works in very specific windows
and may break other windows if it's used there (that's what's happening in your case).

so, start by removing this line:
Code:
<views>50,51,509,510<views>

here's the wiki explanation:
Quote:views
This tag lets you use view id's beyond 50 to 59 it also lets you set the order in which they cycle with the change view button in the skin. Only useful in My<Foo>.xml windows.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Quote:here's the wiki explanation...

Ops, I skipped that part... Tongue
Ok, I'll try now...
Reply
#5
Ok, I cut some code but it works now...

Now it is:
Code:
<window id="4567" type="window">
  <defaultcontrol always="false">1</defaultcontrol>
  <allowoverlay>yes</allowoverlay>
  <animation effect="fade" time="100">WindowOpen</animation>
  <animation effect="fade" time="100">WindowClose</animation>
  <zorder>1</zorder>
    <origin x="100" y="50">Window.IsActive(Home)</origin>
  <controls>
  <control type="button" id="1">
      <description>Primo bottone</description>
      <label>Impostazioni</label>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFF00FF</colordiffuse>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <onclick>XBMC.ActivateWindow(Settings)</onclick>
  </control>
  </controls>
</window>

Now, another question... How can I give a name to my window, so that I can use ActivateWindow with that name instead of its id number?

EDIT: Now I'm adding other buttons and setting other actions with <onclick>... but when I execute XBMC.RestartApp it doesn't restart but only quits... Why? (I'm using Win 7)
Reply
#6
Could be RestartApp is old Xbox code.
Reply
#7
Hmm, so how can I do that? Huh
Reply
#8
Haltar Dhrim Wrote:Now, another question... How can I give a name to my window, so that I can use ActivateWindow with that name instead of its id number?

i don't think you can.

Haltar Dhrim Wrote:EDIT: Now I'm adding other buttons and setting other actions with <onclick>... but when I execute XBMC.RestartApp it doesn't restart but only quits... Why? (I'm using Win 7)

most likely the command is broken.
it doesn't do anything on my linux machine.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
Do you want/need to actually restart xbmc or just reload the skin? If the latter, just use ReloadSkin(). Or just take the advice here and update your keymap to include some commands you will be grateful for when working on a skin.
-stoli-
Reply
#10
Quote:i don't think you can.

what a pity... that wasn't much important anyway...

Quote:most likely the command is broken.
it doesn't do anything on my linux machine.

Doh! I was asked to implement this command... I think I'll simply quit the application then...

Quote:Do you want/need to actually restart xbmc or just reload the skin?

I need to restart xbmc, they gave me this new window to create with a reset button in the corner... I hope they will be satisfied with a shutdown...

--------------------

Ok, last question (i think... Tongue):
I use the Transparency skin, and i need to create another window that resembles a file explorer, to play some videos...
So i searched for the ActivateWindow(VideoLibrary, <FOLDER>) command into the Include_Home.xml file and copied it into mine.
Now I have to modify the graphics... Oo

I have to transform this screenshot:
http://img231.imageshack.us/img231/2452/...ot000s.png

into this:
http://img191.imageshack.us/img191/1722/biogasapp2.jpg

I read the MyVideoNav.xml file but can't understand where is the part that takes the files and makes the list... Can you help me please?
Sorry i have to ask you but i can't get helpful hints from the wiki about this... all i've found out is that there is a list somewhere, but i dunno where it is because of all that includes tags...
Reply
#11
the first screenshot is the fanart view.
you can find the code in View-Fanart.xml

<control type="list" id="50"> contains the section that creates the list.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#12
Thanks a lot ronie! Now i'll try to modify something...
Reply
#13
Fortunately i've found a way to move the file list in center...

This is the current screenshot:
http://img576.imageshack.us/img576/3719/...t001fq.png

Now i have to make to rows instead of one (see the image i posted earlier)...
How can i do that?
And i have to cut that part in the bottom too... or move it in some way...
Reply
#14
You'll have to change from using a list to using a panel control.

http://wiki.xbmc.org/index.php?title=Panel_Container
Reply
#15
Ok, trying now...
Ah for the bottom panel, i already cut it, all i have to do now is the double-column list...
Reply

Logout Mark Read Team Forum Stats Members Help
Help! skinner newbie...0