Skip to content

Commit

Permalink
[#41] Update UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Orchaldir committed Sep 17, 2023
1 parent 2081feb commit 39a163c
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
22 changes: 22 additions & 0 deletions resources/characters/characters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
skin:
type: NormalSkin
color: Fair
clothing:
type: Simple
pants:
style: Regular
color: Blue
head:
ears:
type: Normal
Expand Down Expand Up @@ -66,6 +71,8 @@
skin:
type: Scales
color: Red
clothing:
type: None
head:
ears:
type: Normal
Expand Down Expand Up @@ -152,6 +159,11 @@
skin:
type: ExoticSkin
color: White
clothing:
type: Simple
pants:
style: Regular
color: Red
head:
ears:
type: Normal
Expand Down Expand Up @@ -206,6 +218,11 @@
skin:
type: ExoticSkin
color: Green
clothing:
type: Simple
pants:
style: Regular
color: Purple
head:
ears:
type: None
Expand Down Expand Up @@ -248,6 +265,11 @@
skin:
type: NormalSkin
color: Light
clothing:
type: Simple
pants:
style: Regular
color: Gray
head:
ears:
type: Normal
Expand Down
19 changes: 19 additions & 0 deletions resources/templates/appearance_edit.html.tera
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,25 @@
{% endif %}
</ul>
</li>
<li>
<b>Clothing:</b> {{ macros::add_select(name="appearance.body.clothing.type", options=[ "None","Simple" ], selected=appearance.body.clothing.type, update=true) }}
<ul>
{% if appearance.body.clothing.type == "None" %}
{% elif appearance.body.clothing.type == "Simple" %}
<li>
<b>Pants</b>
<ul>
<li>
<b>Style:</b> {{ macros::add_select(name="appearance.body.clothing.pants.style", options=[ "Balloon","Bermuda","HotPants","Regular","Shorts" ], selected=appearance.body.clothing.pants.style, update=true) }}
</li>
<li>
<b>Color:</b> {{ macros::add_select(name="appearance.body.clothing.pants.color", options=[ "Aqua","Black","Blue","Fuchsia","Gray","Green","Lime","Maroon","Navy","Olive","Orange","Purple","Red","SaddleBrown","Silver","Teal","White","Yellow" ], selected=appearance.body.clothing.pants.color, update=true) }}
</li>
</ul>
</li>
{% endif %}
</ul>
</li>
</ul>
</li>
<li>
Expand Down
19 changes: 19 additions & 0 deletions resources/templates/character.html.tera
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,25 @@
{% endif %}
</ul>
</li>
<li>
<b>Clothing</b>: {{ appearance.body.clothing.type }}
<ul>
{% if appearance.body.clothing.type == "None" %}
{% elif appearance.body.clothing.type == "Simple" %}
<li>
<b>Pants</b>
<ul>
<li>
<b>Style:</b> {{ appearance.body.clothing.pants.style }}
</li>
<li>
<b>Color:</b> {{ appearance.body.clothing.pants.color }}
</li>
</ul>
</li>
{% endif %}
</ul>
</li>
</ul>
</li>
<li>
Expand Down
1 change: 1 addition & 0 deletions rpg_tools_core/examples/editor_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extern crate rpg_tools_core;
pub mod utils;

use crate::utils::write_each;
use macro_core::visitor::UI;
use rpg_tools_core::model::character::appearance::Appearance;
use rpg_tools_core::ui::editor::EditorVisitor;

Expand Down
1 change: 1 addition & 0 deletions rpg_tools_core/examples/viewer_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extern crate rpg_tools_core;
pub mod utils;

use crate::utils::write_each;
use macro_core::visitor::UI;
use rpg_tools_core::model::character::appearance::Appearance;
use rpg_tools_core::ui::viewer::ViewerVisitor;

Expand Down

0 comments on commit 39a163c

Please sign in to comment.