SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 3bad68f2ab8fd5d69dc4186eef3ae18795fca621 parent 3168e0e1fabe4a00e96f2b853996a23f9ba9b2af Author: Lior Halphon <LIJI32@gmail.com> Date: Sat, 12 Aug 2023 13:35:32 +0300 Add backstep to the Cocoa button bar Diffstat:
| A | Cocoa/BackstepTemplate.png | 0 | |
| A | Cocoa/BackstepTemplate@2x.png | 0 | |
| M | Cocoa/Document.h | 1 | + |
| M | Cocoa/Document.m | 2 | ++ |
| M | Cocoa/Document.xib | 24 | +++++++++++++++++++----- |
5 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/Cocoa/BackstepTemplate.png b/Cocoa/BackstepTemplate.png Binary files differ. diff --git a/Cocoa/BackstepTemplate@2x.png b/Cocoa/BackstepTemplate@2x.png Binary files differ. diff --git a/Cocoa/Document.h b/Cocoa/Document.h @@ -67,6 +67,7 @@ @property IBOutlet GBDebuggerButton *debuggerNextButton; @property IBOutlet GBDebuggerButton *debuggerStepButton; @property IBOutlet GBDebuggerButton *debuggerFinishButton; +@property (strong) IBOutlet GBDebuggerButton *debuggerBackstepButton; + (NSImage *) imageFromData:(NSData *)data width:(NSUInteger) width height:(NSUInteger) height scale:(double) scale; diff --git a/Cocoa/Document.m b/Cocoa/Document.m @@ -2617,6 +2617,7 @@ static bool is_path_writeable(const char *path) self.debuggerNextButton.enabled = true; self.debuggerStepButton.enabled = true; self.debuggerFinishButton.enabled = true; + self.debuggerBackstepButton.enabled = true; } else { self.debuggerContinueButton.toolTip = self.debuggerContinueButton.title = @"Interrupt"; @@ -2630,6 +2631,7 @@ static bool is_path_writeable(const char *path) self.debuggerNextButton.enabled = false; self.debuggerStepButton.enabled = false; self.debuggerFinishButton.enabled = false; + self.debuggerBackstepButton.enabled = false; } if (updateContinue) { [self.debuggerContinueButton mouseEntered:nil]; diff --git a/Cocoa/Document.xib b/Cocoa/Document.xib @@ -15,6 +15,7 @@ <outlet property="consoleInput" destination="l22-S8-uji" id="Heu-am-YgB"/> <outlet property="consoleOutput" destination="doS-dM-hnl" id="Gn5-ju-Wb0"/> <outlet property="consoleWindow" destination="21F-Ah-yHX" id="eQ4-ug-LsT"/> + <outlet property="debuggerBackstepButton" destination="onn-R8-3vg" id="gi1-dC-tJj"/> <outlet property="debuggerContinueButton" destination="G4h-KO-Z3g" id="Dad-5e-XYM"/> <outlet property="debuggerFinishButton" destination="vtb-n5-Qlz" id="9vv-fJ-gxp"/> <outlet property="debuggerNextButton" destination="cOi-Rs-9gS" id="Xjx-uM-D0u"/> @@ -221,6 +222,18 @@ <outlet property="textField" destination="l22-S8-uji" id="blK-B3-MWI"/> </connections> </button> + <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="onn-R8-3vg" customClass="GBDebuggerButton"> + <rect key="frame" x="102" y="26" width="26" height="26"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <buttonCell key="cell" type="bevel" title="Step Backwards" alternateTitle="backstep" bezelStyle="rounded" image="BackstepTemplate" imagePosition="only" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="WtK-kD-bf6"> + <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> + <font key="font" metaFont="system"/> + </buttonCell> + <connections> + <action selector="debuggerButtonPressed:" target="-2" id="S9a-jV-Z6g"/> + <outlet property="textField" destination="l22-S8-uji" id="1gw-Lc-QFS"/> + </connections> + </button> </subviews> </customView> <customView fixedFrame="YES" id="4Z2-33-dYY" customClass="GBOptionalVisualEffectView"> @@ -786,7 +799,7 @@ </connections> </textField> <button verticalHuggingPriority="750" id="C3V-Ep-bMj"> - <rect key="frame" x="202.5" y="12" width="83" height="23"/> + <rect key="frame" x="203" y="12" width="83" height="23"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <buttonCell key="cell" type="roundTextured" title="Import" bezelStyle="texturedRounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="mMP-KW-YNy"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> @@ -857,7 +870,7 @@ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" heightSizable="YES"/> <clipView key="contentView" id="mzf-yu-RID"> <rect key="frame" x="1" y="1" width="398" height="273"/> - <autoresizingMask key="autoresizingMask"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" headerView="pvX-uJ-qK5" id="tA3-8T-bxb"> <rect key="frame" x="0.0" y="0.0" width="398" height="256"/> @@ -866,7 +879,7 @@ <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> <tableColumns> - <tableColumn width="52" minWidth="32" maxWidth="1000" id="JNd-HW-LvS"> + <tableColumn width="32" minWidth="32" maxWidth="1000" id="JNd-HW-LvS"> <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border"> <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/> @@ -888,7 +901,7 @@ </buttonCell> <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> </tableColumn> - <tableColumn editable="NO" width="151" minWidth="40" maxWidth="1000" id="4Qa-FQ-QWY"> + <tableColumn editable="NO" width="142" minWidth="40" maxWidth="1000" id="4Qa-FQ-QWY"> <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Description"> <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/> @@ -928,7 +941,7 @@ <rect key="frame" x="224" y="17" width="15" height="102"/> <autoresizingMask key="autoresizingMask"/> </scroller> - <tableHeaderView key="headerView" id="pvX-uJ-qK5"> + <tableHeaderView key="headerView" wantsLayer="YES" id="pvX-uJ-qK5"> <rect key="frame" x="0.0" y="0.0" width="398" height="17"/> <autoresizingMask key="autoresizingMask"/> </tableHeaderView> @@ -952,6 +965,7 @@ </customObject> </objects> <resources> + <image name="BackstepTemplate" width="14" height="14"/> <image name="FinishTemplate" width="14" height="14"/> <image name="HelpTemplate" width="14" height="14"/> <image name="InterruptTemplate" width="14" height="14"/>
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.