Skip to content

Commit

Permalink
Implemented controls setup view groups (still has some quirks).
Browse files Browse the repository at this point in the history
  • Loading branch information
cyco committed Jul 30, 2013
1 parent b7b9cff commit 1af3c30
Show file tree
Hide file tree
Showing 9 changed files with 592 additions and 204 deletions.
Binary file added Interface Graphics/Preferences/controls_triangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions Interface Graphics/Theme.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,20 @@
<string>{{42,0},{21,21}}</string>
</dict>
</dict>
<key>controls_triangle</key>
<dict>
<key>Resource</key>
<string>controls_triangle</string>
<key>States</key>
<dict>
<key>Default</key>
<string>{{0,0},{10,10}}</string>
<key>Toggle Off</key>
<string>{{0,0},{10,10}}</string>
<key>Toggle On</key>
<string>{{0,10},{10,10}}</string>
</dict>
</dict>
<key>game_scanner_toggle_pause_cancel</key>
<dict>
<key>Resource</key>
Expand Down
8 changes: 4 additions & 4 deletions OpenEmu/OEBackgroundImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ - (id)initWithThemeKey:(NSString*)themeKey

- (void)drawRect:(NSRect)dirtyRect
{
NSRect targetRect = [self bounds];
OEThemeState currentState = [self OE_currentState];

[[[self backgroundThemeImage] imageForState:currentState] drawInRect:targetRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:[self isFlipped] hints:nil];
[[[self themeImage] imageForState:currentState] drawInRect:targetRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:[self isFlipped] hints:nil];
[[self image] drawInRect:targetRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:[self isFlipped] hints:nil];
[[[self backgroundThemeImage] imageForState:currentState] drawInRect:dirtyRect fromRect:dirtyRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:[self isFlipped] hints:nil];
[[[self themeImage] imageForState:currentState] drawInRect:dirtyRect fromRect:dirtyRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:[self isFlipped] hints:nil];
[[self image] drawInRect:dirtyRect fromRect:dirtyRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:[self isFlipped] hints:nil];
}

#pragma mark - Theme
- (void)setThemeKey:(NSString *)key
{
Expand Down
3 changes: 2 additions & 1 deletion OpenEmu/OEControlsButtonSetupView.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#import <Cocoa/Cocoa.h>

extern NSString * const OEControlsButtonHighlightRollsOver;
@interface OEControlsButtonSetupView : NSView

@property(unsafe_unretained) id target;
Expand All @@ -43,6 +44,6 @@
- (void)selectNextKeyButton;
- (void)selectNextKeyAfterKeys:(NSArray *)keys;

- (void)layoutSubviews;
- (void)layoutSubviews:(BOOL)animated;

@end
Loading

0 comments on commit 1af3c30

Please sign in to comment.