mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-29 05:05:37 +08:00
more work on osx template: create empty window, add Credits.rtf file
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
class AppDelegate
|
||||
def applicationDidFinishLaunching(notification)
|
||||
buildMenu
|
||||
buildWindow
|
||||
end
|
||||
|
||||
def buildWindow
|
||||
@mainWindow = NSWindow.alloc.initWithContentRect([[240, 180], [480, 360]],
|
||||
styleMask: NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask,
|
||||
backing: NSBackingStoreBuffered,
|
||||
defer: false)
|
||||
@mainWindow.title = NSBundle.mainBundle.infoDictionary['CFBundleName']
|
||||
@mainWindow.orderFrontRegardless
|
||||
end
|
||||
end
|
||||
|
||||
@@ -90,6 +90,8 @@ class AppDelegate
|
||||
NSApp.mainMenu = @mainMenu
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def addMenu(title, &b)
|
||||
item = createMenu(title, &b)
|
||||
@mainMenu.addItem item
|
||||
|
||||
29
lib/motion/project/template/osx/files/resources/Credits.rtf
Normal file
29
lib/motion/project/template/osx/files/resources/Credits.rtf
Normal file
@@ -0,0 +1,29 @@
|
||||
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\paperw9840\paperh8400
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
||||
|
||||
\f0\b\fs24 \cf0 Engineering:
|
||||
\b0 \
|
||||
Some people\
|
||||
\
|
||||
|
||||
\b Human Interface Design:
|
||||
\b0 \
|
||||
Some other people\
|
||||
\
|
||||
|
||||
\b Testing:
|
||||
\b0 \
|
||||
Hopefully not nobody\
|
||||
\
|
||||
|
||||
\b Documentation:
|
||||
\b0 \
|
||||
Whoever\
|
||||
\
|
||||
|
||||
\b With special thanks to:
|
||||
\b0 \
|
||||
Mom\
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
Reference in New Issue
Block a user