Skip to content

Commit

Permalink
Split sidebar.json roughly by widget_var (#54125)
Browse files Browse the repository at this point in the history
To facilitate future expansion in widget styles for each widget_var,
break up the main sidebar.json file into pieces:

- activity.json, body_temp.json, date.json, encumbrance.json, etc.
- layout.json: Various layouts combining other widgets
- sidebar.json: Main sidebar definition(s) only
  • Loading branch information
wapcaplet authored Jan 8, 2022
1 parent 8340f4d commit 1849155
Show file tree
Hide file tree
Showing 34 changed files with 954 additions and 887 deletions.
10 changes: 10 additions & 0 deletions data/json/ui/activity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"id": "activity_desc",
"type": "widget",
"label": "Activity",
"style": "text",
"var": "activity_text",
"//": "Uses display::activity_text_color"
}
]
10 changes: 10 additions & 0 deletions data/json/ui/body_temp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"id": "body_temp_desc",
"type": "widget",
"label": "Heat",
"style": "text",
"var": "body_temp_text",
"//": "Uses display::temp_text_color"
}
]
9 changes: 9 additions & 0 deletions data/json/ui/date.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"id": "date_desc",
"type": "widget",
"label": "Date",
"style": "text",
"var": "date_text"
}
]
73 changes: 73 additions & 0 deletions data/json/ui/encumbrance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[
{
"id": "encumbrance_graph",
"type": "widget",
"style": "graph",
"var_max": 50,
"width": 5,
"symbols": "-vX",
"fill": "bucket"
},
{
"id": "encumbrance_head_graph",
"type": "widget",
"label": "e:H",
"var": "bp_encumb",
"bodypart": "head",
"copy-from": "encumbrance_graph"
},
{
"id": "encumbrance_torso_graph",
"type": "widget",
"label": "e:T",
"var": "bp_encumb",
"bodypart": "torso",
"copy-from": "encumbrance_graph"
},
{
"id": "encumbrance_left_arm_graph",
"type": "widget",
"label": "e:LA",
"var": "bp_encumb",
"bodypart": "arm_l",
"copy-from": "encumbrance_graph"
},
{
"id": "encumbrance_right_arm_graph",
"type": "widget",
"label": "e:RA",
"var": "bp_encumb",
"bodypart": "arm_r",
"copy-from": "encumbrance_graph"
},
{
"id": "encumbrance_left_leg_graph",
"type": "widget",
"label": "e:LL",
"var": "bp_encumb",
"bodypart": "leg_l",
"copy-from": "encumbrance_graph"
},
{
"id": "encumbrance_right_leg_graph",
"type": "widget",
"label": "e:RL",
"var": "bp_encumb",
"bodypart": "leg_r",
"copy-from": "encumbrance_graph"
},
{
"id": "encumbrance_top_layout",
"type": "widget",
"style": "layout",
"arrange": "columns",
"widgets": [ "encumbrance_left_arm_graph", "encumbrance_head_graph", "encumbrance_right_arm_graph" ]
},
{
"id": "encumbrance_bottom_layout",
"type": "widget",
"style": "layout",
"arrange": "columns",
"widgets": [ "encumbrance_left_leg_graph", "encumbrance_torso_graph", "encumbrance_right_leg_graph" ]
}
]
10 changes: 10 additions & 0 deletions data/json/ui/env_temp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"id": "env_temp_desc",
"type": "widget",
"label": "Temperature",
"style": "text",
"var": "env_temp_text",
"//": "Uses display::get_temp"
}
]
29 changes: 29 additions & 0 deletions data/json/ui/fatigue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"id": "fatigue_num",
"type": "widget",
"label": "Fatigue",
"var": "fatigue",
"style": "number"
},
{
"id": "fatigue_graph",
"type": "widget",
"label": "Fatig",
"var": "fatigue",
"var_max": 1000,
"style": "graph",
"fill": "bucket",
"width": 5,
"symbols": "-fF",
"colors": [ "c_green", "c_yellow", "c_red" ]
},
{
"id": "fatigue_desc",
"type": "widget",
"label": "Rest",
"style": "text",
"var": "fatigue_text",
"//": "Uses display::fatigue_text_color"
}
]
9 changes: 9 additions & 0 deletions data/json/ui/focus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"id": "focus_num",
"type": "widget",
"label": "Focus",
"var": "focus",
"style": "number"
}
]
182 changes: 182 additions & 0 deletions data/json/ui/hp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
[
{
"id": "hitpoint_graph",
"type": "widget",
"style": "graph",
"width": 5,
"symbols": ".\\|",
"fill": "bucket",
"colors": [ "c_red", "c_light_red", "c_yellow", "c_light_green", "c_green" ]
},
{
"id": "hitpoint_num",
"type": "widget",
"style": "number",
"colors": [ "c_red", "c_light_red", "c_yellow", "c_light_green", "c_green" ]
},
{
"id": "hp_head_graph",
"type": "widget",
"label": "HEAD",
"var": "bp_hp",
"bodypart": "head",
"copy-from": "hitpoint_graph"
},
{
"id": "hp_torso_graph",
"type": "widget",
"label": "TORSO",
"var": "bp_hp",
"bodypart": "torso",
"copy-from": "hitpoint_graph"
},
{
"id": "hp_left_arm_graph",
"type": "widget",
"label": "L ARM",
"var": "bp_hp",
"bodypart": "arm_l",
"copy-from": "hitpoint_graph"
},
{
"id": "hp_right_arm_graph",
"type": "widget",
"label": "R ARM",
"var": "bp_hp",
"bodypart": "arm_r",
"copy-from": "hitpoint_graph"
},
{
"id": "hp_left_leg_graph",
"type": "widget",
"label": "L LEG",
"var": "bp_hp",
"bodypart": "leg_l",
"copy-from": "hitpoint_graph"
},
{
"id": "hp_right_leg_graph",
"type": "widget",
"label": "R LEG",
"var": "bp_hp",
"bodypart": "leg_r",
"copy-from": "hitpoint_graph"
},
{
"id": "hp_head_num",
"type": "widget",
"label": "HEAD",
"var": "bp_hp",
"bodypart": "head",
"copy-from": "hitpoint_num"
},
{
"id": "hp_torso_num",
"type": "widget",
"label": "TORSO",
"var": "bp_hp",
"bodypart": "torso",
"copy-from": "hitpoint_num"
},
{
"id": "hp_left_arm_num",
"type": "widget",
"label": "L ARM",
"var": "bp_hp",
"bodypart": "arm_l",
"copy-from": "hitpoint_num"
},
{
"id": "hp_right_arm_num",
"type": "widget",
"label": "R ARM",
"var": "bp_hp",
"bodypart": "arm_r",
"copy-from": "hitpoint_num"
},
{
"id": "hp_left_leg_num",
"type": "widget",
"label": "L LEG",
"var": "bp_hp",
"bodypart": "leg_l",
"copy-from": "hitpoint_num"
},
{
"id": "hp_right_leg_num",
"type": "widget",
"label": "R LEG",
"var": "bp_hp",
"bodypart": "leg_r",
"copy-from": "hitpoint_num"
},
{
"id": "hitpoint_graphs_top_layout",
"type": "widget",
"style": "layout",
"label": "HP Top",
"arrange": "columns",
"widgets": [ "hp_left_arm_graph", "hp_head_graph", "hp_right_arm_graph" ]
},
{
"id": "hitpoint_graphs_bottom_layout",
"type": "widget",
"style": "layout",
"label": "HP Bottom",
"arrange": "columns",
"widgets": [ "hp_left_leg_graph", "hp_torso_graph", "hp_right_leg_graph" ]
},
{
"id": "hitpoints_all_graphs_layout",
"type": "widget",
"style": "layout",
"label": "Hit Points",
"arrange": "rows",
"widgets": [ "hitpoints_top_layout", "hitpoints_bottom_layout" ]
},
{
"id": "hitpoints_head_torso_layout",
"type": "widget",
"style": "layout",
"arrange": "columns",
"widgets": [ "hp_head_graph", "hp_torso_graph" ]
},
{
"id": "hitpoints_arms_layout",
"type": "widget",
"style": "layout",
"arrange": "columns",
"widgets": [ "hp_left_arm_graph", "hp_right_arm_graph" ]
},
{
"id": "hitpoints_legs_layout",
"type": "widget",
"style": "layout",
"arrange": "columns",
"widgets": [ "hp_left_leg_graph", "hp_right_leg_graph" ]
},
{
"id": "hitpoint_nums_top_layout",
"type": "widget",
"label": "HP Nums Top",
"style": "layout",
"arrange": "columns",
"widgets": [ "hp_left_arm_num", "hp_head_num", "hp_right_arm_num" ]
},
{
"id": "hitpoint_nums_bottom_layout",
"type": "widget",
"label": "HP Nums Bottom",
"style": "layout",
"arrange": "columns",
"widgets": [ "hp_left_leg_num", "hp_torso_num", "hp_right_leg_num" ]
},
{
"id": "hitpoints_all_narrow_graphs_layout",
"type": "widget",
"style": "layout",
"label": "Hit Points",
"arrange": "rows",
"widgets": [ "hitpoints_head_torso_layout", "hitpoints_arms_layout", "hitpoints_legs_layout" ]
}
]
10 changes: 10 additions & 0 deletions data/json/ui/hunger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"id": "hunger_desc",
"type": "widget",
"label": "Hunger",
"style": "text",
"var": "hunger_text",
"//": "Uses display::hunger_text_color"
}
]
Loading

0 comments on commit 1849155

Please sign in to comment.