Logo

Question: How Change Preferences Automatically.

Register Log In Back To Forums

Post #1 · Posted at 2014-07-31 03:36:28am 9.7 years ago

Offline Th3_Ov3rHell_3XoduZ
Th3_Ov3rHell_3XoduZ Avatar Member
313 Posts
Chile
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
Quote: Released Themes for SM5 Beta 3
Quote: Released Themes for SM5 Beta 4 & 5.0.7
Quote: Simfles Packs Released

Post #2 · Posted at 2014-07-31 05:29:19am 9.7 years ago

Offline dbk2
dbk2 Avatar Member
332 Posts
Not Set
Reg. 2012-04-30


Last updated: 2014-07-31 10:51am
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...

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 · Posted at 2014-07-31 04:13:24pm 9.7 years ago

Offline Th3_Ov3rHell_3XoduZ
Th3_Ov3rHell_3XoduZ Avatar Member
313 Posts
Chile
Reg. 2012-09-13

"ITG, The Best Dance Machine!"
Quote: dbk2
From within your theme, you can use PREFSMANConfusedetPreference() 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...

Quote: ScreenInit overlay

local t = Def.ActorFrame{
OnCommand=function(self)
PREFSMANConfusedetPreference("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
Quote: Released Themes for SM5 Beta 3
Quote: Released Themes for SM5 Beta 4 & 5.0.7
Quote: Simfles Packs Released

Post #4 · Posted at 2014-07-31 04:45:41pm 9.7 years ago

Offline Kyzentun
Kyzentun Avatar Member
3,209 Posts
United States
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.
silenttype01: Kyzentun is never harsh. He says it how it is.

GENERATION 24: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Post #5 · Posted at 2014-07-31 04:56:01pm 9.7 years ago

Offline Mad Matt
Mad Matt Avatar Member
65 Posts
United States
Reg. 2011-10-26


Last updated: 2014-07-31 04:56pm
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 · Posted at 2014-07-31 05:30:25pm 9.7 years ago

Offline Quadrasputnik
Quadrasputnik Avatar Banned
191 Posts
Netherlands
Reg. 2013-07-18

Game Center Nickname: Bravelion765
Can anyone tell me how I can make the site automatically change themes after each month?
Nu Heat is Max Headroom.

Post #7 · Posted at 2014-07-31 05:32:42pm 9.7 years ago

Offline Th3_Ov3rHell_3XoduZ
Th3_Ov3rHell_3XoduZ Avatar Member
313 Posts
Chile
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.
Quote: Released Themes for SM5 Beta 3
Quote: Released Themes for SM5 Beta 4 & 5.0.7
Quote: Simfles Packs Released

Post #8 · Posted at 2014-07-31 05:45:56pm 9.7 years ago

Offline Max
Max Avatar Member+
8,111 Posts
United States
Reg. 2008-02-05

Nintendo Network ID: maxninja1143DS Friend Code: 392661848995Game Center Nickname: maxninja114
"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 · Posted at 2014-08-02 05:26:07pm 9.7 years ago

Offline Silverhawke
Silverhawke Avatar Member+
4,606 Posts
Indonesia
Reg. 2009-01-27

3DS Friend Code: 3496-9710-9426
"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
my homepage → silverhawke.xyz
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 4% · Database: 4% · Server Time: 2024-04-16 17:57:40
This page took 0.006 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language