ポスト #1 · 2014-07-31 03:36:28amにポスト 10.1年前
Th3_Ov3rHell_3XoduZ | |
---|---|
Member | |
313 ポスト | |
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
ポスト #2 · 2014-07-31 05:29:19amにポスト 10.1年前
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.
ポスト #3 · 2014-07-31 04:13:24pmにポスト 10.1年前
Th3_Ov3rHell_3XoduZ | |
---|---|
Member | |
313 ポスト | |
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
ポスト #4 · 2014-07-31 04:45:41pmにポスト 10.1年前
Kyzentun | |
---|---|
Member | |
3,209 ポスト | |
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.
ポスト #5 · 2014-07-31 04:56:01pmにポスト 10.1年前
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.ポスト #6 · 2014-07-31 05:30:25pmにポスト 10.1年前
Quadrasputnik | |
---|---|
Banned | |
191 ポスト | |
Reg. 2013-07-18 | |
Can anyone tell me how I can make the site automatically change themes after each month?
ポスト #7 · 2014-07-31 05:32:42pmにポスト 10.1年前
Th3_Ov3rHell_3XoduZ | |
---|---|
Member | |
313 ポスト | |
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.
ポスト #8 · 2014-07-31 05:45:56pmにポスト 10.1年前
Max | |
---|---|
Member+ | |
8,111 ポスト | |
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.
ポスト #9 · 2014-08-02 05:26:07pmにポスト 10.1年前
Silverhawke | |
---|---|
Member+ | |
4,606 ポスト | |
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