wyndwarrior / DreamBoard

Powerful iOS theming platform. Interactive widgets, dynamic layouts, script parser
GNU General Public License v3.0
23 stars 6 forks source link

Add button click support? #25

Open jgjake2 opened 9 years ago

jgjake2 commented 9 years ago

Would it be possible to add button click support? something like this:

%hook SpringBoard

- (void)menuButtonUp:(GSEventRef)event
{
    %orig(event);
    if([[DreamBoard sharedInstance] dbtheme])
        [[DreamBoard sharedInstance].dbtheme onHomeButtonPress];
}

- (void)_menuButtonUp:(GSEventRef)event
{
    %orig(event);
    if([[DreamBoard sharedInstance] dbtheme])
        [[DreamBoard sharedInstance].dbtheme onHomeButtonPress];
}

%end

// DBTheme.mm
-(void)onHomeButtonPress{
    //if(lockView)[lockView removeFromSuperview];
    if(dictTheme[@"OnHomeButtonPress"]){
        for(NSString *action in dictTheme[@"OnHomeButtonPress"])
            [DBActionParser parseAction:action];
    }
}

I just cant setup a stable compiling environment or I would do it myself :/