Skip to content

Commit

Permalink
merge: custom views #11
Browse files Browse the repository at this point in the history
This merge commit merges the PR #11, which adds custom views to the menu and scenes.
  • Loading branch information
ThePedroo authored Aug 27, 2023
2 parents d72fa00 + 17ed0c5 commit 0104a0d
Show file tree
Hide file tree
Showing 30 changed files with 1,685 additions and 197 deletions.
66 changes: 41 additions & 25 deletions OS_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ The save button allows the player to save their progress in the visual novel.

##### Version support

>= `v1.18.2-b.0 & v1.16.8-b.0`: Supported
\>= `v1.18.2-b.0 & v1.16.8-b.0`: Supported

#### Menu button

The menu button is the button that goes to the menu.

##### Version support

>= `v1.2.2-alpha`: Supported
\>= `v1.2.2-alpha`: Supported

#### Characters

The characters are overlaid on the scenario, and they can be moved around the screen expressing emotions.

##### Version support

>= `v1.0.2-alpha`: Supported but with bugs
\>= `v1.0.2-alpha`: Supported but with bugs

>= `v1.15.0-b.0 & v1.12.2-b.0`: Supported
\>= `v1.15.0-b.0 & v1.12.2-b.0`: Supported

OBS: Versions below `v1.5.3` must have the character image saved on the `drawable` folder, and versions above `v1.5.3` must have the character image saved on the `raw` folder.

Expand All @@ -44,19 +44,19 @@ The character animations are the animations that the characters can do, like `mo

###### Version support

>= `v1.15.0-b.0 & 1.12.2-b.0`: Supported but limited to `movement` animation and 1 animation per character only
\>= `v1.15.0-b.0 & 1.12.2-b.0`: Supported but limited to `movement` animation and 1 animation per character only

>= `v1.18.2-b.0 & v1.16.8-b.0`: Supported
\>= `v1.18.2-b.0 & v1.16.8-b.0`: Supported

#### Scenarios

The scenarios are the image in the background of the scene, and they can be changed to represent different places.

##### Version support

>= `v1.0.2-alpha`: Supported but with bugs
\>= `v1.0.2-alpha`: Supported but with bugs

>= `v1.15.0-b.0 & v1.12.2-b.0`: Supported
\>= `v1.15.0-b.0 & v1.12.2-b.0`: Supported

OBS: Versions below `v1.5.3` must have the scenario image saved on the `drawable` folder, and versions above `v1.5.3` must have the scenario image saved on the `raw` folder.

Expand All @@ -66,11 +66,11 @@ The speech is the text that the characters say, and it adds more expression to t

##### Version support

>= `v1.1.2-alpha`: Supported but with bugs (speech texts containing `"`, `'` or `\` are not supported)
\>= `v1.1.2-alpha`: Supported but with bugs (speech texts containing `"`, `'` or `\` are not supported)

>= `v1.16.2-b.0 & v1.14.6-b.0`: Supported without author animation:
\>= `v1.16.2-b.0 & v1.14.6-b.0`: Supported without author animation:

>= `v1.16.2-b.0 & v1.15.8-b.0`: Supported
\>= `v1.16.2-b.0 & v1.15.8-b.0`: Supported

#### Sound effect

Expand All @@ -82,27 +82,35 @@ Ensure that two sound effect doesn't play at the same time, or it *may* generate

##### Version support

>= `v1.5.3-alpha`: Supported but with bugs and limited to 1 sound effect per scene
\>= `v1.5.3-alpha`: Supported but with bugs and limited to 1 sound effect per scene

>= `v1.16.1-b.0 & v1.14.4-b.0`: Supported but limited to 1 sound effect per scene
\>= `v1.16.1-b.0 & v1.14.4-b.0`: Supported but limited to 1 sound effect per scene

>= `v1.18.2-b.0 & v1.16.8-b.0`: Supported
\>= `v1.18.2-b.0 & v1.16.8-b.0`: Supported

#### Music

The music, differently from the sound effect, is the sound that can represent the mood of the scene, and it's also important for immersion.

##### Version support

>= `v1.16.0-b.0 & v1.14.2-b.0`: Supported
\>= `v1.16.0-b.0 & v1.14.2-b.0`: Supported

##### Custom paths

Custom paths allow multiple ends to the visual novel, allowing the player to choose their own path through buttons.

###### Version support

>= `v1.19.2-b.0 & v1.17.8-b.0`: Supported
\>= `v1.19.2-b.0 & v1.17.8-b.0`: Supported

##### Custom elements

Custom elements are elements that can be added to the scene, like a button, a text box, etc.

###### Version support

\>= `v1.20.2 & 1.18.8`: Supported

### Menu

Expand All @@ -114,39 +122,47 @@ The start button is the button that starts the VN.

##### Version support

>= `v1.0.0-alpha`: Supported
\>= `v1.0.0-alpha`: Supported

>= `v1.1.2-alpha`: Supported with design changes
\>= `v1.1.2-alpha`: Supported with design changes

#### About

The About menu is the place where the player can see the information about the VN, like the name, the version, etc.

##### Version support

>= `v1.0.2-alpha`: Supported without hyperlink support & additional text support
\>= `v1.0.2-alpha`: Supported without hyperlink support & additional text support

>= `v1.1.2-alpha`: Supported without additional text support
\>= `v1.1.2-alpha`: Supported without additional text support

>= `v1.16.2-b.0 & v1.15.8-b.0`: Supported
\>= `v1.16.2-b.0 & v1.15.8-b.0`: Supported

#### Settings

The settings menu is the place where the player can change the text speed, menu music volume, etc.

##### Version support

>= `v1.5.3-beta`: Supported but with bugs (dimensions)
\>= `v1.5.3-beta`: Supported but with bugs (dimensions)

>= `v1.16.2-b.0 & v1.14.8-b.0`: Supported
\>= `v1.16.2-b.0 & v1.14.8-b.0`: Supported

#### Background music

The background music is the music that plays on the menu.

##### Version support

>= `v1.4.2-alpha`: Supported
\>= `v1.4.2-alpha`: Supported

#### Custom elements

Custom elements are elements that can be added to the menu, like a button, a text box, etc.

##### Version support

\>= `v1.20.2 & 1.18.8`: Supported

## [iOS](https://www.apple.com/br/ios/ios-16/)

Expand Down Expand Up @@ -178,14 +194,14 @@ This is the list of features that we're planning to add (or modify) to PerforVNM
- [x] Sound effects (Completed)
- [x] Save/Load system (Completed)
- [x] Custom paths (Completed)
- [x] Custom Views (Completed)
- [x] Menu (Missing vertical footer)
- [x] Settings (Misses some additional configurations)
- [ ] Achievements
- [ ] Inventory
- [ ] Text effects
- [ ] Speech bubbles
- [ ] Text box effects
- [ ] Custom buttons & *View

## Code generation support

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ High-performance Visual Novel Maker with code generation technology.

## Project status

PerforVNM even though the fast development, leaks a few features that are essential for big VNs, but if you're making a small VN, we'll provide the best technologies for you.
PerforVNM is currently in development, and limited to Android only, but we're working on making it available on more OSes.

OBS: Remember to always update PerforVNM.
If you don't care about the current limitations, you can take a look at the [Usage](#usage) section, and if you want to know more about the current limitations, you can take a look at the [Feature support](#feature-support) section.

OBS: Remember to always update PerforVNM, soon we'll bring more platforms.

## Using PerforVNM?

Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/java/com/perforvnm/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class MainActivity : Activity() {
startActivity(android.content.Intent(android.content.Intent.ACTION_VIEW, android.net.Uri.parse("https://github.com/PerformanC/PerforVNMaker")))
}
}, length - "PerforVNM".length, length, 0)
append(" 1.19.2-b.0 (code generator), 1.17.8-b.0 (generated code).")
append(" 1.20.2 (code generator), 1.18.8 (generated code).")
append("\n\nThis is our example visual novel, made by @ThePedroo")
}
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, resources.getDimension(com.intuit.ssp.R.dimen._11ssp))
Expand Down
11 changes: 6 additions & 5 deletions docs/coder/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ coder.init({

## Parameters

- `name`: The compact name of the VN is used in the title of the app.
- `fullName`: The full name of the VN, used in the About menu.
- `applicationId`: The application id of the VN is used in the package name of the app.
- `version`: The version of the VN, used by the system and in the About menu.
- `options`: The options of the VN.
- `name`: The compact name of the VN is used in the title of the app.
- `fullName`: The full name of the VN, used in the About menu.
- `applicationId`: The application ID of the VN is used in the package name of the app.
- `version`: The version of the VN, used by the system and in the About menu.

## Return value

This function will return `null` if the initialization was successful, otherwise, it will execute `new Error` to terminate the generation process.
This function will return `undefined` if the initialization was successful, otherwise, it will execute `new Error` to terminate the generation process.

## Platform support

Expand Down
51 changes: 51 additions & 0 deletions docs/menu/addCustomButton.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Menu - Add custom button

## Description

Adds a custom button to the menu.

## Syntax

```js
menu.addCustomButton(menu, {
text: 'Hello world!',
color: 'FFFFFF',
fontSize: 12,
position: {
side: 'left',
margins: {
side: 10,
top: 10
}
}
})
```

## Parameters

- `menu`: The menu configurations from the `init` function.
- `options`: The options of the custom button. An object with the following properties:
- `text`: The text of the button.
- `color`: The color of the button.
- `fontSize`: The font size of the text.
- `height`: The height of the button. Must be either `match`, `wrap` or a `number`. (dp)
- `width`: The width of the button. Must be either `match`, `wrap` or a `number`. (dp)
- `position`: The position of the button. An object with the following properties:
- `side`: The side of the button can be `left`, `right` or `center`.
- `margins`: The margin of the button can be any number. An object with the following properties: (Not required if side == center)
- `side`: The margin of the side of the button. (dp)
- `top`: The margin of the top of the button. (dp)


## Return value

This function will return the scene configurations if the addition was successful, otherwise, it will execute `new Error` to terminate the generation process.

## Platform support

- [x] Android
- [ ] iOS
- [ ] Windows
- [ ] Linux distros
- [ ] MacOS
- [ ] Web
49 changes: 49 additions & 0 deletions docs/menu/addCustomImage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Menu - Add custom image

## Description

Adds a custom image to the menu.

## Syntax

```js
menu.addCustomImage(menu, {
image: 'background_thanking',
height: 'match',
width: 'match',
position: {
side: 'left',
margins: {
side: 10,
top: 10
}
}
})
```

## Parameters

- `menu`: The menu configurations from the `init` function.
- `options`: The options of the custom text. An object with the following properties:
- `image`: The image of the text.
- `height`: The height of the text. Must be either `match`, `wrap` or a `number`. (dp)
- `width`: The width of the text. Must be either `match`, `wrap` or a `number`. (dp)
- `position`: The position of the text. An object with the following properties:
- `side`: The side of the text can be `left`, `right` or `center`.
- `margins`: The margin of the text can be any number. An object with the following properties: (Not required if side == center)
- `side`: The margin of the side of the text. (dp)
- `top`: The margin of the top of the text. (dp)


## Return value

This function will return the scene configurations if the addition was successful, otherwise, it will execute `new Error` to terminate the generation process.

## Platform support

- [x] Android
- [ ] iOS
- [ ] Windows
- [ ] Linux distros
- [ ] MacOS
- [ ] Web
50 changes: 50 additions & 0 deletions docs/menu/addCustomRectangle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Menu - Add custom button

## Description

Adds a custom rectangle to the menu.

## Syntax

```js
menu.addCustomRectangle(menu, {
color: 'FFFFFF',
opacity: 0.8,
height: 'match',
width: 'match',
position: {
side: 'left',
margins: {
side: 10,
top: 10
}
}
})
```

## Parameters

- `menu`: The menu configurations from the `init` function.
- `options`: The options of the custom rectangle. An object with the following properties:
- `color`: The color of the rectangle.
- `opacity`: The opacity of the rectangle.
- `height`: The height of the rectangle. Must be either `match`, `wrap` or a `number`. (dp)
- `width`: The width of the rectangle. Must be either `match`, `wrap` or a `number`. (dp)
- `position`: The position of the rectangle. An object with the following properties:
- `side`: The side of the rectangle can be `left`, `right` or `center`.
- `margins`: The margin of the rectangle can be any number. An object with the following properties: (Not required if side == center)
- `side`: The margin of the side of the rectangle. (dp)
- `top`: The margin of the top of the rectangle. (dp)

## Return value

This function will return the scene configurations if the addition was successful, otherwise, it will execute `new Error` to terminate the generation process.

## Platform support

- [x] Android
- [ ] iOS
- [ ] Windows
- [ ] Linux distros
- [ ] MacOS
- [ ] Web
Loading

0 comments on commit 0104a0d

Please sign in to comment.