-
-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Fix actual typos that made into our dictionary #2305
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -422,7 +422,7 @@ with a `passive` `CollisionType`. Collisions will be explained more in a later | |
#### Display the Platform | ||
|
||
In our `loadGameSegments` method from earlier, we will need to add the call to add our block. We | ||
will need to define `gridPosition` and `xOffset` to be passed in. `gridPostion` will be a | ||
will need to define `gridPosition` and `xOffset` to be passed in. `gridPosition` will be a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How come spell didn't catch this? Should we add it to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because we have it set to ignore anything within backticks via regex on config. I am working on improving that to be more strict |
||
`Vector2` and `xOffset` is a double as that will be used to calculate the x-axis offset for | ||
the block in a `Vector2`. So add the following to your `loadGameSegments` method: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,28 +51,28 @@ class SpriteFontTextFormatter extends TextFormatter { | |
@override | ||
TextElement format(String text) { | ||
var rects = Float32List(text.length * 4); | ||
var rsts = Float32List(text.length * 4); | ||
var transforms = Float32List(text.length * 4); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @st-pasha I have googled far and wide what rsts means but could not find it hahaha There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haha, etymology time! Renaming it into simply There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, very interesting story. so the issue is just on that flutter signature - as for our code, I think rsTransforms or just transforms are both good. I will merge transforms but lmk if you prefer rsTransforms I can change it |
||
var j = 0; | ||
var x0 = 0.0; | ||
for (final glyph in font.textToGlyphs(text)) { | ||
rects[j + 0] = glyph.srcLeft; | ||
rects[j + 1] = glyph.srcTop; | ||
rects[j + 2] = glyph.srcRight; | ||
rects[j + 3] = glyph.srcBottom; | ||
rsts[j + 0] = scale; | ||
rsts[j + 1] = 0; | ||
rsts[j + 2] = x0 + (glyph.srcLeft - glyph.left) * scale; | ||
rsts[j + 3] = (glyph.srcTop - glyph.top - font.ascent) * scale; | ||
transforms[j + 0] = scale; | ||
transforms[j + 1] = 0; | ||
transforms[j + 2] = x0 + (glyph.srcLeft - glyph.left) * scale; | ||
transforms[j + 3] = (glyph.srcTop - glyph.top - font.ascent) * scale; | ||
j += 4; | ||
x0 += glyph.width * scale + letterSpacing; | ||
} | ||
if (j < text.length * 4) { | ||
rects = rects.sublist(0, j); | ||
rsts = rsts.sublist(0, j); | ||
transforms = transforms.sublist(0, j); | ||
} | ||
return SpriteFontTextElement( | ||
source: font.source, | ||
transforms: rsts, | ||
transforms: transforms, | ||
rects: rects, | ||
paint: paint, | ||
metrics: LineMetrics( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ class Inventory extends StatelessWidget { | |
String _mapWeaponName(Weapon weapon) { | ||
switch (weapon) { | ||
case Weapon.bullet: | ||
return 'Kinect'; | ||
return 'Kinetic'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume they didn't mean the video game peripheral |
||
case Weapon.laser: | ||
return 'Laser'; | ||
case Weapon.plasma: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we favor the American spelling