Post #1 · Posté à 2014-07-31 03:36:28am il y a 10.1 années
Th3_Ov3rHell_3XoduZ | |
---|---|
Member | |
313 Messages | |
Reg. 2012-09-13 | |
"ITG, The Best Dance Machine!" |
Well, the title says all, How I can set some preferences automatically each time when I select a determinate Theme, for example, on my ITG2 Theme the Percentage Scoring should be always On, but if before I was using other Theme where that option requires be Off...
How I can set that option automatically instead go to Options and set it by my self? Thanks in advance
How I can set that option automatically instead go to Options and set it by my self? Thanks in advance
Post #2 · Posté à 2014-07-31 05:29:19am il y a 10.1 années
From within your theme, you can use PREFSMAN:SetPreference() as it is documented in Lua.xml: http://kki.ajworld.net/lua/sm5/Lua.xml#PrefsManager
It's up to you to determine which screen is a good one to do this from. If I were to do something like this, I might use ScreenInit...
local t = Def.ActorFrame{
OnCommand=function(self)
PREFSMAN:SetPreference("PercentageScoring", 1)
end
}
return t
IMPORTANT: Any preferences you change this way will stay changed into other themes. Users may not realize this and be confused. It is probably good practice to let the user know somewhere in your theme that you've switched his or her preferences.
It's up to you to determine which screen is a good one to do this from. If I were to do something like this, I might use ScreenInit...
Quote: ScreenInit overlay
local t = Def.ActorFrame{
OnCommand=function(self)
PREFSMAN:SetPreference("PercentageScoring", 1)
end
}
return t
IMPORTANT: Any preferences you change this way will stay changed into other themes. Users may not realize this and be confused. It is probably good practice to let the user know somewhere in your theme that you've switched his or her preferences.
Post #3 · Posté à 2014-07-31 04:13:24pm il y a 10.1 années
Th3_Ov3rHell_3XoduZ | |
---|---|
Member | |
313 Messages | |
Reg. 2012-09-13 | |
"ITG, The Best Dance Machine!" |
Quote: dbk2
From within your theme, you can use PREFSMANetPreference() as it is documented in Lua.xml: http://kki.ajworld.net/lua/sm5/Lua.xml#PrefsManager
It's up to you to determine which screen is a good one to do this from. If I were to do something like this, I might use ScreenInit...
local t = Def.ActorFrame{
OnCommand=function(self)
PREFSMANetPreference("PercentageScoring", 1)
end
}
return t
It's up to you to determine which screen is a good one to do this from. If I were to do something like this, I might use ScreenInit...
Quote: ScreenInit overlay
local t = Def.ActorFrame{
OnCommand=function(self)
PREFSMANetPreference("PercentageScoring", 1)
end
}
return t
Thanks you dbk2, as always you help me a lot. This is what i needed, Im gonna add the preferences I think should be set by itself when the ITG 2 Theme is chosen.
Quote: dbk2
IMPORTANT: Any preferences you change this way will stay changed into other themes. Users may not realize this and be confused. It is probably good practice to let the user know somewhere in your theme that you've switched his or her preferences.
And... yeah, you right... Due to this possible "problem", I will try to create a Screen or something for notice to each player that is using the Theme that some of their Preferences has been changed. Thanks again
Post #4 · Posté à 2014-07-31 04:45:41pm il y a 10.1 années
Kyzentun | |
---|---|
Member | |
3,209 Messages | |
Reg. 2008-02-20 | |
"I'm honestly pissed off." |
Or you could just write the theme to ignore the preference and pretend that it's set to Percentage Scoring always.
Post #5 · Posté à 2014-07-31 04:56:01pm il y a 10.1 années
Quote: Kyzentun
Or you could just write the theme to ignore the preference and pretend that it's set to Percentage Scoring always.
While I am in favor of this in general, there is one slight caveat in this case. The percentage scoring preference affects the comparison between high scores, and thus which scores will be saved, and what order it considers them to be in.Post #6 · Posté à 2014-07-31 05:30:25pm il y a 10.1 années
Quadrasputnik | |
---|---|
Banned | |
191 Messages | |
Reg. 2013-07-18 | |
Can anyone tell me how I can make the site automatically change themes after each month?
Post #7 · Posté à 2014-07-31 05:32:42pm il y a 10.1 années
Th3_Ov3rHell_3XoduZ | |
---|---|
Member | |
313 Messages | |
Reg. 2012-09-13 | |
"ITG, The Best Dance Machine!" |
Quote: Quadrasputnik
Can anyone tell me how I can make the site automatically change themes after each month?
What?
-------------------
Anyway, thanks all... with dbk2 help I have fixed my problem... If someone can lock this would be amazing.
Post #8 · Posté à 2014-07-31 05:45:56pm il y a 10.1 années
Max | |
---|---|
Member+ | |
8,111 Messages | |
Reg. 2008-02-05 | |
"Charlie isn't real" |
Quote: Quadrasputnik
Can anyone tell me how I can make the site automatically change themes after each month?
Yeah.It's called going to the 'Home' tab > Themes > Pick whichever theme you want to change for that month.
a.k.a There is no option/mechanic on the site that changes a user's theme every month. Do it manually.
Post #9 · Posté à 2014-08-02 05:26:07pm il y a 10.1 années
Silverhawke | |
---|---|
Member+ | |
4,606 Messages | |
Reg. 2009-01-27 | |
"highwind fluffdragon" |
Quote: Quadrasputnik
Can anyone tell me how I can make the site automatically change themes after each month?
why are you hijacking this thread