mirror of
https://github.com/zhigang1992/RubyMotion-PixateFreestyle.git
synced 2026-01-12 17:52:19 +08:00
Update files to support Pixate Freestyle 2.1
This commit is contained in:
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
||||
|
||||
gem 'rake'
|
||||
# Add your dependencies here:
|
||||
gem 'motion-pixate'
|
||||
gem 'motion-pixatefreestyle'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
$:.unshift("/Library/RubyMotion/lib")
|
||||
require 'motion/project/template/ios'
|
||||
require 'rubygems'
|
||||
require 'motion-pixate'
|
||||
require 'motion-pixatefreestyle'
|
||||
|
||||
begin
|
||||
require 'bundler'
|
||||
@@ -13,7 +13,5 @@ end
|
||||
Motion::Project::App.setup do |app|
|
||||
# Use `rake config' to see complete project settings.
|
||||
app.name = 'HelloWorld'
|
||||
app.pixate.key = 'KEY CODE'
|
||||
app.pixate.user = 'USER ID'
|
||||
app.pixate.framework = 'vendor/PXEngine.framework'
|
||||
app.pixatefreestyle.framework = 'vendor/PixateFreestyle.framework'
|
||||
end
|
||||
|
||||
@@ -4,7 +4,6 @@ class AppDelegate
|
||||
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
|
||||
@window.rootViewController = HelloWorldController.alloc.init
|
||||
@window.rootViewController.wantsFullScreenLayout = true
|
||||
@window.styleMode = PXStylingNormal
|
||||
@window.makeKeyAndVisible
|
||||
|
||||
true
|
||||
|
||||
7
Examples/HelloWorld/app/pixatefreestyle_code.rb
Normal file
7
Examples/HelloWorld/app/pixatefreestyle_code.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
# This file is automatically generated. Do not edit.
|
||||
|
||||
def style(str)
|
||||
PixateFreestyle.initializePixateFreestyle
|
||||
PixateFreestyle.styleSheetFromSource(str, withOrigin:0)
|
||||
PixateFreestyle.updateStylesForAllViews
|
||||
end
|
||||
@@ -1,7 +1,10 @@
|
||||
button {
|
||||
text: Pixate Says Hello!;
|
||||
text: Pixate Freestyle Rocks!;
|
||||
background-image: linear-gradient(blue, lightblue);
|
||||
border-radius: 10px;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: darkgray;
|
||||
}
|
||||
|
||||
#myView {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/Users/pcolton/Library/Developer/Xcode/DerivedData/Pixate_Engine-cxbqfllitlqcspcaxewxldmpknhu/Build/Products/Debug-iphonesimulator/PXEngine.framework
|
||||
1
Examples/HelloWorld/vendor/PixateFreestyle.framework
vendored
Symbolic link
1
Examples/HelloWorld/vendor/PixateFreestyle.framework
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
/Users/pcolton/Downloads/PixateFreestyle.framework
|
||||
@@ -1 +0,0 @@
|
||||
require "motion/project/pixate"
|
||||
1
lib/motion-pixatefreestyle.rb
Normal file
1
lib/motion-pixatefreestyle.rb
Normal file
@@ -0,0 +1 @@
|
||||
require "motion/project/pixatefreestyle"
|
||||
@@ -2,8 +2,8 @@ unless defined?(Motion::Project::Config)
|
||||
raise "This file must be required within a RubyMotion project Rakefile."
|
||||
end
|
||||
|
||||
class PixateConfig
|
||||
attr_accessor :framework, :user, :key
|
||||
class PixateFreestyleConfig
|
||||
attr_accessor :framework
|
||||
|
||||
def initialize(config)
|
||||
@config = config
|
||||
@@ -25,12 +25,12 @@ class PixateConfig
|
||||
# This file is automatically generated. Do not edit.
|
||||
|
||||
def style(str)
|
||||
PixateFreestyle.initializePixateFreestyle()
|
||||
PixateFreestyle.initializePixateFreestyle
|
||||
PixateFreestyle.styleSheetFromSource(str, withOrigin:0)
|
||||
PixateFreestyle.applyStylesheets
|
||||
PixateFreestyle.updateStylesForAllViews
|
||||
end
|
||||
EOF
|
||||
pixate_file = './app/pixate_code.rb'
|
||||
pixate_file = './app/pixatefreestyle_code.rb'
|
||||
create_stub(pixate_file, code)
|
||||
add_file(pixate_file)
|
||||
end
|
||||
@@ -49,15 +49,15 @@ end
|
||||
|
||||
module Motion; module Project; class Config
|
||||
|
||||
variable :pixate
|
||||
variable :pixatefreestyle
|
||||
|
||||
def pixate
|
||||
@pixate ||= PixateConfig.new(self)
|
||||
def pixatefreestyle
|
||||
@pixatefreestyle ||= PixateFreestyleConfig.new(self)
|
||||
end
|
||||
|
||||
end; end; end
|
||||
|
||||
namespace 'pixate' do
|
||||
namespace 'pixatefreestyle' do
|
||||
desc "Create initial stylesheet files"
|
||||
task :init do
|
||||
if Dir.glob("sass/default.s[ac]ss").empty?
|
||||
@@ -2,13 +2,14 @@
|
||||
Version = "2.1"
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "motion-pixate"
|
||||
gem.name = "motion-pixatefreestyle"
|
||||
gem.version = Version
|
||||
gem.authors = ['Paul Colton', 'Shizuo Fujita']
|
||||
gem.email = ['paul@pixate.com', 'watson1978@gmail.com']
|
||||
gem.description = 'Pixate integration for RubyMotion projects'
|
||||
gem.summary = 'motion-pixate allows RubyMotion projects to easily embed the Pixate Framework.'
|
||||
gem.homepage = 'https://github.com/Pixate/RubyMotion-Pixate'
|
||||
gem.description = 'Pixate Freestyle integration for RubyMotion projects'
|
||||
gem.summary = 'motion-pixatefreestyle allows RubyMotion projects to easily embed the Pixate Freestyle Framework.'
|
||||
gem.homepage = 'https://github.com/Pixate/RubyMotion-PixateFreestyle'
|
||||
gem.licenses = ["Apache-2.0"]
|
||||
|
||||
files = []
|
||||
files << 'README.md'
|
||||
Reference in New Issue
Block a user