Skip to content

Commit

Permalink
Linguistics (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper committed Aug 3, 2016
1 parent d817f28 commit 6254dcf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 7 additions & 7 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ end

## 16. Modal

Use the `Modal`-object to display messages as modal windows.
Use the `Modal`-object to display content as modal windows (in front of all other windows). Modals can be used to display icons and/or text for visual cues. Properties defined as dynamic can be altered while the modal is displayed.

```java
class Modal implements Identifiable
Expand All @@ -431,15 +431,15 @@ class Modal implements Identifiable
end
```

- `origin` property for the origin for the modal, the enclosed properties are read-only so you must pass an object for this property, by default `(0, 0)`
- `duration` property for the duration (in seconds) for the modal, if the duration is set to `0` the modal will remain open until closed, by default `0`
- `weight` property for the weight for the modal (in points), by default `24`
- `origin` dynamic property for the origin of the modal, the enclosed properties are read-only so you must pass an object for this property, by default `(0, 0)`
- `duration` property for the duration (in seconds) before automatically closing the modal, if the duration is set to `0` the modal will remain open until closed, by default `0`
- `weight` dynamic property for the weight of the modal (in points), by default `24`
- `appearance` property for the appearance of the modal (`dark|light|transparent`), by default `dark`
- `icon` property for the icon displayed in the modal
- `text` property for the text displayed in the modal
- `icon` dynamic property for the icon displayed in the modal
- `text` dynamic property for the text displayed in the modal
- `new Modal()` constructs and returns a new modal
- `frame()` returns the frame for the modal, the frame is adjusted for the current content, therefor you must first set the weight, icon and text to get an accurate frame
- `show()` shows the modal
- `show()` shows the modal, you must set at least an icon or text for the modal to be displayed
- `close()` closes the modal

## 17. Screen
Expand Down
14 changes: 9 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Changelog

Release: dd.mm.yyyy

### New

- Modals have a new improved “vibrant” appearance and can now display icons as well as text. All the new options are described in the [API](https://github.com/kasper/phoenix/blob/2.2.2/API.md#16-modal) ([#126](https://github.com/kasper/phoenix/issues/126)).

### Improvements

- Callback for key is now called repeatedly when key is held down ([#119](https://github.com/kasper/phoenix/issues/119)).
Expand All @@ -26,11 +30,11 @@ Release: dd.mm.yyyy

#### Modal

- New: Use `weight`-property to adjust the weight for the modal (in points), by default `24` ([#126](https://github.com/kasper/phoenix/issues/126)).
- New: Use `appearance`-property to set the appearance of the modal (`dark|light|transparent`), by default `dark` ([#126](https://github.com/kasper/phoenix/issues/126)).
- New: Use `icon`-property for the icon displayed in the modal ([#126](https://github.com/kasper/phoenix/issues/126)).
- New: Use `text`-property for the text displayed in the modal, required ([#126](https://github.com/kasper/phoenix/issues/126)).
- Change: Origin can be adjusted dynamically ([#126](https://github.com/kasper/phoenix/issues/126)).
- New: Dynamic property `weight` defines the weight of the modal (in points), by default `24` ([#126](https://github.com/kasper/phoenix/issues/126)).
- New: Property `appearance` defines the appearance of the modal (`dark|light|transparent`), by default `dark` ([#126](https://github.com/kasper/phoenix/issues/126)).
- New: Dynamic property `icon` defines the icon displayed in the modal ([#126](https://github.com/kasper/phoenix/issues/126)).
- New: Dynamic property `text` defines the text displayed in the modal ([#126](https://github.com/kasper/phoenix/issues/126)).
- Change: Origin is now a dynamic property ([#126](https://github.com/kasper/phoenix/issues/126)).
- Deprecation: Property `message` is deprecated and will be removed in later versions, use `text` instead ([#126](https://github.com/kasper/phoenix/issues/126)).

#### Screen
Expand Down

0 comments on commit 6254dcf

Please sign in to comment.