From 69c2f354c2648bf057d5b975610e4afbd3109ba8 Mon Sep 17 00:00:00 2001 From: alt-shreya Date: Thu, 7 Mar 2024 12:14:21 +0530 Subject: [PATCH 01/21] docs(joystick): improved link text --- doc/flame/inputs/other_inputs.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/doc/flame/inputs/other_inputs.md b/doc/flame/inputs/other_inputs.md index 88f46b0b6c8..556e79ec462 100644 --- a/doc/flame/inputs/other_inputs.md +++ b/doc/flame/inputs/other_inputs.md @@ -14,7 +14,7 @@ Flame provides a component capable of creating a virtual joystick for taking inp To use this feature, you need to create a `JoystickComponent`, configure it the way you want, and add it to your game. -Check this example to get a better understanding: +Check out the following example to get a better understanding: ```dart class MyGame extends FlameGame { @@ -74,12 +74,11 @@ class Player extends SpriteComponent with HasGameRef { } ``` -So in this example, we create the classes `MyGame` and `Player`. `MyGame` creates a joystick which is -passed to the `Player` when it is created. In the `Player` class we act upon the current state of -the joystick. +So in this example, we create the classes `MyGame` and `Player`. `MyGame` creates a joystick which is passed to the `Player` when it is created. In the `Player` class we act upon the current state of the joystick. The joystick has a few fields that change depending on what state it is in. -These are the fields that should be used to know the state of the joystick: + +Following are the fields that should be used to know the state of the joystick: - `intensity`: The percentage [0.0, 1.0] that the knob is dragged from the epicenter to the edge of the joystick (or `knobRadius` if that is set). @@ -90,13 +89,10 @@ These are the fields that should be used to know the state of the joystick: If you want to create buttons to go with your joystick, check out [`HudButtonComponent`](#hudbuttoncomponent). -A full examples of how to use it can be found -[here](https://github.com/flame-engine/flame/blob/main/examples/lib/stories/input/joystick_example.dart). -And it can be seen running [here](https://examples.flame-engine.org/#/Input_Joystick). +For the complete code on implementing the joystick, check out the [Joystick Example on GitHub](https://github.com/flame-engine/flame/blob/main/examples/lib/stories/input/joystick_example.dart). You can also view the [JoystickComponent in action](https://examples.flame-engine.org/#/Input_Joystick) to see a live example of the joystick input function integrated into a game. -There is also a more advanced example -[here](https://github.com/flame-engine/flame/blob/main/examples/lib/stories/input/joystick_advanced_example.dart) -which is running [here](https://examples.flame-engine.org/#/Input_Joystick%20Advanced). +For an add challenge, explore the +[Advanced Joystick Example on GitHub](https://github.com/flame-engine/flame/blob/main/examples/lib/stories/input/joystick_advanced_example.dart). See what else the advanced features can do in the [live demo](https://examples.flame-engine.org/#/Input_Joystick%20Advanced). ## HudButtonComponent From 6f7db82e3a482e6dca9955c537a2d42d2af1030b Mon Sep 17 00:00:00 2001 From: alt-shreya Date: Thu, 7 Mar 2024 12:17:58 +0530 Subject: [PATCH 02/21] docs(gamepads): fixed link & improved link text --- doc/flame/inputs/other_inputs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/flame/inputs/other_inputs.md b/doc/flame/inputs/other_inputs.md index 556e79ec462..b9e0f0fcdc6 100644 --- a/doc/flame/inputs/other_inputs.md +++ b/doc/flame/inputs/other_inputs.md @@ -130,8 +130,8 @@ else which isn't a pure sprite. ## Gamepad -Flame has a separate plugin to support external game controllers (gamepads), check -[here](https://github.com/flame-engine/flame_gamepad) for more information. +Flame has a dedicated plugin to support external game controllers (gamepads). Find more information in the +[Gamepads repository](https://github.com/flame-engine/gamepad). ## AdvancedButtonComponent From 4b6c95f7db6443e008600f90d8598215bd70f6b4 Mon Sep 17 00:00:00 2001 From: alt-shreya Date: Thu, 7 Mar 2024 12:26:14 +0530 Subject: [PATCH 03/21] docs(rendering): improved link text descriptions --- doc/flame/rendering/text_rendering.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/flame/rendering/text_rendering.md b/doc/flame/rendering/text_rendering.md index 86d544793fa..24f2aa0c91a 100644 --- a/doc/flame/rendering/text_rendering.md +++ b/doc/flame/rendering/text_rendering.md @@ -355,16 +355,16 @@ import 'package:flutter/painting.dart'; import 'dart:ui' hide TextStyle; ``` -Some common properties of `TextStyle` are the following (here is the [full -list](https://api.flutter.dev/flutter/painting/TextStyle-class.html)): +Following are some common properties of `TextStyle`(see the [full +list of `TextStyle` properties](https://api.flutter.dev/flutter/painting/TextStyle-class.html)): - `fontFamily`: a commonly available font, like Arial (default), or a custom font added in your - pubspec (see [here](https://docs.flutter.dev/cookbook/design/fonts) how to do it). + pubspec (see [how to add a custom font](https://docs.flutter.dev/cookbook/design/fonts)). - `fontSize`: font size, in pts (default `24.0`). - `height`: height of text line, as a multiple of font size (default `null`). - `color`: the color, as a `ui.Color` (default white). -For more information regarding colors and how to create then, see the [Colors and the +For more information regarding colors and how to create them, see the [Colors and the Palette](palette.md) guide. From 0632a040437abddf9e8ca78c64d8f0ebc38bc196 Mon Sep 17 00:00:00 2001 From: alt-shreya Date: Thu, 7 Mar 2024 12:46:33 +0530 Subject: [PATCH 04/21] docs(layout): added discernible link & alt text --- doc/_sphinx/theme/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/_sphinx/theme/layout.html b/doc/_sphinx/theme/layout.html index 3a33826beb1..b029f1f1da7 100644 --- a/doc/_sphinx/theme/layout.html +++ b/doc/_sphinx/theme/layout.html @@ -83,8 +83,8 @@ }); - - + + Flame logo: a fiery symbol along with the FLAME wordmark.