Jump to content

How to Add a PSSliderCell to Your PreferenceBundle


Rook

13 posts in this topic

Recommended Posts

Posted

You want to return a custom value in a function instead of a huge amount?

 

DiDA, how can I add slider to this :)

 

 

%hook User

- (void)setCoins:(long) arg1 {
if(GetPrefBool(@"ksetCoin")) {
arg1 = 900;
}
%orig (arg1);
}
%end
Posted

 

DiDA, how can I add slider to this :)

 

 

%hook User

- (void)setCoins:(long) arg1 {
if(GetPrefBool(@"ksetCoin")) {
arg1 = 900;
}
%orig (arg1);
}
%end

 

PM me. :)

Posted

This is my tweak.x

#define PLIST_PATH @"/var/mobile/Library/Preferences/root.plist

inline bool GetPrefBool(NSString *key) {

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

inline int GetPrefInt(NSString *key) {

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] intValue];

}

 

%hook SBAppSwitcherSettings

- (void)setDeckSwitcherPageScale:(double)arg1 {

if(GetPrefBool(@"key1")) {

int newValue = GetPrefInt(@"key1slider");

arg1 = (newValue);

} else {

return %orig;

}

}

%end

 

And this is the root.plist

 

 

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.gh.fastx</string>

<key>key</key>

<string>key1</string>

<key>label</key>

<string>Enable Coins Hack</string>

</dict>

<dict>

<key>cell</key>

<string>PSSliderCell</string>

<key>default</key>

<integer>0.5</integer>

<key>defaults</key>

<string>com.gh.fastx</string>

<key>key</key>

<string>key1slider</string>

<key>max</key>

<real>0.9</real>

<key>min</key>

<real>0.1</real>

<key>showValue</key>

<true/>

</dict>

 

where is error

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines