woguan / legend-wings Goto Github PK
View Code? Open in Web Editor NEWiOS Swift Game - Push SpriteKit to the limit
iOS Swift Game - Push SpriteKit to the limit
Hello,
Just out of curiosity, why don't you use regular checkboxes?
Nice work btw, thanks!
Hi @woguan ,
I'm reporting this issue because my team and I are trying to localize this game to different language(s) for a school project (200% no commercial purpose). In your project, you made the description of characters go to different lines by hard-coded them. This, however, makes localization hard.
let firstLabel = SKLabelNode()
firstLabel.numberOfLines = 0
firstLabel.preferredMaxLayoutWidth = 1000
firstLabel.name = "character_menu_firstlabel"
firstLabel.horizontalAlignmentMode = .left
firstLabel.verticalAlignmentMode = .top
firstLabel.fontColor = .brown
**firstLabel.text = "She was born in the wilds and "**
firstLabel.lineBreakMode = NSLineBreakMode.byWordWrapping
firstLabel.fontName = "GillSans-Bold"
firstLabel.fontSize = firstlinebox.size.width/MAGICNUMBER
firstlinebox.addChild(firstLabel)
// 2nd Line
let secondlinebox = SKSpriteNode()
secondlinebox.name = "character_menu_secondlinebox"
secondlinebox.size = CGSize(width: txtBox.size.width, height: txtBox.size.height/3)
secondlinebox.anchorPoint = CGPoint(x: 0.0, y: 1.0)
secondlinebox.position.y = -secondlinebox.size.height
secondlinebox.color = .clear
txtBox.addChild(secondlinebox)
let secondLabel = SKLabelNode()
secondLabel.name = "character_menu_secondlabel"
secondLabel.horizontalAlignmentMode = .left
secondLabel.verticalAlignmentMode = .top
secondLabel.fontColor = .brown
**secondLabel.text = "raised by dragons. When dragons"**
secondLabel.fontName = "GillSans-Bold"
secondLabel.fontSize = secondlinebox.size.width/MAGICNUMBER
secondlinebox.addChild(secondLabel)
For example, in order to localize it, we need the firstLabel.text = "She was born in the wilds and "
and secondLabel.text = "raised by dragons. When dragons"
to be in the same label.text. Our team has googled and tried everything we could, but nothing has worked yet. Do you have any ideas how to make them multilined using the same label?
Thank you so much!!
Best,
Olivia
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.