defualt values for first run
#1
I use T! skin but with my modifications... so I have my xml's...
every time I install "my" skin in other pc, I am replacing the xml's I edited, but:
the skin defualt options needed to be change from "skin settings" menu, because their defualts is different from what I want...
I know the names of the options I want to change, and I made a list of all the "Skin.HasSetting(.....) that I want to change by defualt, but they are sitting in the gui.xml in userdata,
I wonder what is the easies way to make a simple code that checks if the skin is running for the first time, and the apply some skin settings to the gui xml....
example:

the defualt skin option is to show a medium list in Fanart View, and I want a Long List by defualt - Skin.HasSetting(FanartNormal) , and I want Skin.HasSetting(FanartLong)
so I want to put on startup.xml Skin.ToggleSetting(FanartLong) or something like that, but only for first time, so If someone after the first install want to change my defualt settings - he can


Need some Help please... Thanks
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#2
You can check your (special) first run by setting your own first run value when you run it.

<onload condition="!Skin.HasSetting(FirstRun)">Skin.SetBool(FirstRun)</onload>

Now you can set all your other values before you do that, based on that same Boolean.

<onload condition="!Skin.HasSetting(FirstRun)">Skin.SetBool(FanartLong)</onload>

All values get set based on not having the FirstRun setting, until at the end you set it.
And next time they are read they don't get set.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#3
First Of all thanks,
But let me understand..
then First Line is checking if "FirstRun" doesnt excist - then It set it to true.
then the second line check again if "FirstRun" doesnt excist - and it should not work because the condition is false right? FirstRun already excist now...
Maybe If I Replace The order? Like put all of the Skin.Set.... commands first, and in the and Set the FirstRun Value
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#4
Ok Forget about it, I added a Button in "Skin Settings" called "Set Defualts" - and when click it he just set what I want... better then auto-start and sh*t :]
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#5
(2014-11-27, 12:04)tomer953 Wrote: Like put all of the Skin.Set.... commands first, and in the end Set the FirstRun Value
That is what my post says you should do yes.
MassIV Wrote:you can set all your other values before you do that (before setting first run value)
So this:
Code:
<onload condition="!Skin.HasSetting(FirstRun)">Skin.SetBool(FanartLong)</onload>
<onload condition="!Skin.HasSetting(FirstRun)">Skin.SetBool(FirstRun)</onload>
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply

Logout Mark Read Team Forum Stats Members Help
defualt values for first run0