Logo

Question: How Change Preferences Automatically.

Enregistré Connexion Retour aux forums

Post #1 · Posté à 2014-07-31 03:36:28am il y a 9.7 années

Offline Th3_Ov3rHell_3XoduZ
Th3_Ov3rHell_3XoduZ Avatar Member
313 Messages
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 · Posté à 2014-07-31 05:29:19am il y a 9.7 années

Offline dbk2
dbk2 Avatar Member
332 Messages
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 · Posté à 2014-07-31 04:13:24pm il y a 9.7 années

Offline Th3_Ov3rHell_3XoduZ
Th3_Ov3rHell_3XoduZ Avatar Member
313 Messages
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 · Posté à 2014-07-31 04:45:41pm il y a 9.7 années

Offline Kyzentun
Kyzentun Avatar Member
3,209 Messages
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 · Posté à 2014-07-31 04:56:01pm il y a 9.7 années

Offline Mad Matt
Mad Matt Avatar Member
65 Messages
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 · Posté à 2014-07-31 05:30:25pm il y a 9.7 années

Offline Quadrasputnik
Quadrasputnik Avatar Banned
191 Messages
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 · Posté à 2014-07-31 05:32:42pm il y a 9.7 années

Offline Th3_Ov3rHell_3XoduZ
Th3_Ov3rHell_3XoduZ Avatar Member
313 Messages
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 · Posté à 2014-07-31 05:45:56pm il y a 9.7 années

Offline Max
Max Avatar Member+
8,111 Messages
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 · Posté à 2014-08-02 05:26:07pm il y a 9.7 années

Offline Silverhawke
Silverhawke Avatar Member+
4,606 Messages
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
Enregistré Connexion Retour aux 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-05-01 15:47:45
Page générée en 0.009 secondes.
Theme: starlight · Language: french
Reset Theme & Language