Skip to content

Commit

Permalink
Added Title to Trade Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
davemoore22 committed Sep 3, 2024
1 parent dee23e4 commit 70ebdef
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion dat/layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -3855,7 +3855,7 @@
{
"name": "item_trade_frame",
"w": "20",
"h": "11",
"h": "12",
"x": "centre",
"y": "8",
"alpha": "225",
Expand Down
1 change: 1 addition & 0 deletions dat/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"ACTION_FOUND_1": "Found The Following",
"ACTION_FOUND_2": "Choose To Add To Party:",
"ACTION_TRADE_TO": "Trade Item to:",
"ACTION_CANCEL": "Cancel Trade",
"PARTY_FULL": "Party Already Full!",
"NAME_CURSOR": ">",
"OPTION_ON" : "ON",
Expand Down
50 changes: 25 additions & 25 deletions sorcery.layout
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="src/resources/itemstore.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11232" topLine="319" />
</Cursor>
</File>
<File name="src/engine/engine.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="51251" topLine="1437" />
Expand All @@ -24,19 +19,14 @@
</File>
<File name="src/engine/inspect.cpp" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="18204" topLine="467" />
<Cursor1 position="18419" topLine="480" />
</Cursor>
</File>
<File name="src/resources/monsterstore.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5109" topLine="130" />
</Cursor>
</File>
<File name="dat/layout.json" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="252118" topLine="13634" />
</Cursor>
</File>
<File name="src/gui/menu.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2259" topLine="50" />
Expand All @@ -54,27 +44,22 @@
</File>
<File name="src/types/inventory.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3722" topLine="133" />
<Cursor1 position="3722" topLine="122" />
</Cursor>
</File>
<File name="src/types/dice.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2533" topLine="83" />
</Cursor>
</File>
<File name="doc/COMPILE" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="342" topLine="0" />
</Cursor>
</File>
<File name="cfg/config.ini" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/types/monstertype.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="136" topLine="0" />
<Cursor1 position="2904" topLine="91" />
</Cursor>
</File>
<File name="src/types/monstertype.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="doc/COMPILE" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2904" topLine="91" />
<Cursor1 position="342" topLine="0" />
</Cursor>
</File>
<File name="src/types/monster.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
Expand All @@ -92,9 +77,9 @@
<Cursor1 position="9629" topLine="286" />
</Cursor>
</File>
<File name="dat/strings.json" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="dat/explain.json" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="477" topLine="0" />
<Cursor1 position="4629" topLine="18" />
</Cursor>
</File>
<File name="src/modules/inn.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
Expand All @@ -112,9 +97,24 @@
<Cursor1 position="2097" topLine="38" />
</Cursor>
</File>
<File name="dat/explain.json" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="cfg/config.ini" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4629" topLine="18" />
<Cursor1 position="136" topLine="0" />
</Cursor>
</File>
<File name="dat/strings.json" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="477" topLine="0" />
</Cursor>
</File>
<File name="dat/layout.json" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="252118" topLine="13634" />
</Cursor>
</File>
<File name="src/resources/itemstore.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11232" topLine="319" />
</Cursor>
</File>
</CodeBlocks_layout_file>
4 changes: 3 additions & 1 deletion src/gui/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,8 @@ auto Sorcery::Menu::_populate_trade_chars(const unsigned int current_char) -> vo
_options.clear();
auto max_id{0};
if (_game->state->party_has_members()) {
_add_item(++max_id, TEXT, NC_WARNING, (*_display->string)["ACTION_TRADE_TO"]);
_add_item(++max_id, SPACER, ITEM_SPACER, (*_display->string)["MENU_SPACER"]);
auto party{_game->state->get_party_characters()};
for (auto character_id : party) {
if (character_id != current_char) {
Expand All @@ -1075,7 +1077,7 @@ auto Sorcery::Menu::_populate_trade_chars(const unsigned int current_char) -> vo
_add_item(++max_id, TEXT, NC_WARNING, (*_display->string)["MENU_NO_CHARACTERS"]);

_add_item(++max_id, SPACER, ITEM_SPACER, (*_display->string)["MENU_SPACER"]);
_add_item(++max_id, CANCEL, AC_LEAVE, (*_display->string)["ACTION_LEAVE"]);
_add_item(++max_id, CANCEL, AC_LEAVE, (*_display->string)["ACTION_CANCEL"]);
}

auto Sorcery::Menu::_populate_chars() -> void {
Expand Down

0 comments on commit 70ebdef

Please sign in to comment.