31 const ImVec2 display = ImGui::GetIO().DisplaySize;
32 ImGui::SetNextWindowPos({display.x / 2.0f, display.y * 0.45f},
33 ImGuiCond_FirstUseEver, {0.5f, 0.5f});
34 ImGui::SetNextWindowSize(
Ui(ImVec2{720.0f, 460.0f}));
36 ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings |
37 ImGuiWindowFlags_NoCollapse)) {
47 static constexpr std::array<Tab, 7> kPages = {{
48 {Page::kMoving, ICON_FA_PERSON_WALKING,
N_(
"Moving")},
49 {Page::kFighting, ICON_FA_HAND_FIST,
N_(
"Fighting")},
50 {Page::kItems, ICON_FA_BAG_SHOPPING,
N_(
"Items")},
51 {Page::kQuests, ICON_FA_SCROLL,
N_(
"Quests")},
52 {Page::kGuilds, ICON_FA_SHIELD_HALVED,
N_(
"Guilds and duels")},
53 {Page::kChat, ICON_FA_COMMENTS,
N_(
"Chat")},
54 {Page::kKeys, ICON_FA_KEYBOARD,
N_(
"Keys")},
56 ImGui::BeginChild(
"Pages", {
Ui(190.0f), 0.0f});
57 for (
const auto& [page, icon, name] : kPages) {
58 ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, {0.0f, 0.5f});
59 const std::string label = absl::StrCat(icon,
" ",
Tr(name),
"###", name);
60 if (ImGui::Selectable(label.c_str(), page_ == page, 0, {0.0f, Ui(34.0f)})) {
66 ImGui::SameLine(0.0f,
Ui(16.0f));
67 ImGui::BeginChild(
"Page");
70 ImGui::SeparatorText(
Tr(
"Moving"));
71 Line(
"W A S D, or the arrows, walk, and Shift runs.");
73 "Double-click the ground, or click a place on the map (M), and you "
74 "walk there, round what's in the way.");
76 "Q and E, or the right button held down, turn the camera, and the "
77 "mouse wheel zooms in and out.");
78 Line(
"A gate takes you to another land.");
81 ImGui::SeparatorText(
Tr(
"Fighting"));
83 "Click a monster to pick it. Its name and health show over it, and "
84 "in the frame at the top.");
86 "Space swings what you hold at the monster you picked. Too far "
87 "away, you run up to it first.");
89 "1 to 9 use the skills on the hotbar, and with Shift, those on its "
90 "second row. Trainers teach you more of them.");
92 "A monster's attack shows on the ground before it lands, filling "
93 "as it comes: step out of its shape.");
94 Line(
"When you die, wait for the count, then click Respawn.");
97 ImGui::SeparatorText(
Tr(
"Items"));
98 Line(
"What a monster drops goes into your bag (I).");
100 "Double-click an item to use it, wear it, or take it off. Or drag "
101 "it onto your character (C).");
102 Line(
"Drag an item out of the bag to throw it away.");
104 "Crafting (K) makes something from what's in your bag, over a few "
105 "seconds. Moving, or being hit, stops it, and nothing's lost.");
106 Line(
"To trade with someone, type /trade and their name in the chat.");
109 ImGui::SeparatorText(
Tr(
"Quests"));
111 "Someone with a ! over them has a quest for you. Click them to "
114 "A ? over them means you've done it: click them again to turn it "
115 "in, for your prize.");
116 Line(
"The quests you're on show in the top right, under the minimap.");
118 "T opens your quests: how far you've got with each, what it gives, "
119 "and a way to give one up, which its giver then gives again.");
122 ImGui::SeparatorText(
Tr(
"Guilds and duels"));
124 "G opens your guild: found one, ask people in, and see who's "
126 Line(
"To ask someone to a duel, type /duel and their name in the chat.");
128 "A guild's leader can type /war and another guild's name, to ask "
129 "it to war for 30 minutes. Its players' names are red, and you can "
130 "fight them anywhere.");
133 ImGui::SeparatorText(
Tr(
"Chat"));
134 Line(
"Enter opens the chat, and Enter again sends what you typed.");
135 Line(
"/g and a space first talks to your guild.");
137 "/trade, /duel or /war and a name asks for a trade, a duel or a "
141 ImGui::SeparatorText(
Tr(
"Keys"));