Skip to content

Commit 472f6ff

Browse files
committed
misc ui fixes
1 parent 370259f commit 472f6ff

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

game/src/display/effects.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ impl DisplayEffect {
888888
t!("an unknown amount")
889889
} else if project.is_policy() {
890890
format!(
891-
"{}% [i]political_capital[/i]",
891+
"{}% [political_capital]",
892892
display::percent(amount.abs(), true)
893893
)
894894
.into()

game/src/views/events/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ impl<E: AsEventView> Events<E> {
175175
.vertical(|ui| {
176176
ui.set_width(width);
177177
render_event_card(ui, state, event);
178-
ui.add(button(t!("Continue"))).clicked()
178+
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
179+
ui.add(button(t!("Continue"))).clicked()
180+
})
181+
.inner
179182
})
180183
.inner;
181184
if go_to_next {

game/src/views/events/update.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::{
99
intensity::{self, intensity_bar},
1010
render_effects,
1111
},
12+
text::bbcode,
1213
tips::{add_tip, tip},
1314
};
1415

@@ -135,9 +136,14 @@ fn render_region_outcomes(ui: &mut egui::Ui, region: &Region, up: bool, world: &
135136
let prev_demand = prev_region.demand(per_capita_demand);
136137
let pop = region.population;
137138

138-
ui.label(body);
139+
ui.add(bbcode(&body));
140+
141+
ui.add_space(12.);
142+
143+
let spacer = ui.available_width() / 2. - 92.;
139144

140145
ui.horizontal(|ui| {
146+
ui.add_space(spacer);
141147
add_tip(
142148
prev_tip,
143149
ui.horizontal(|ui| {
@@ -179,6 +185,7 @@ fn render_region_outcomes(ui: &mut egui::Ui, region: &Region, up: bool, world: &
179185
);
180186

181187
ui.horizontal(|ui| {
188+
ui.add_space(spacer);
182189
add_tip(
183190
prev_tip,
184191
ui.horizontal(|ui| {

game/src/views/report.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ impl Report {
293293
});
294294
});
295295
row.col(|ui| {
296+
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Extend);
296297
let pc_change = format!("{:+}", self.pc_change);
297298
ui.label(pc_change);
298299
});

game/src/views/scanner/cards.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ impl<C: AsCard + Scannable> Cards<C> {
155155
});
156156
if let Some(delta) = delta {
157157
if delta.y > 0. {
158-
action = Some(Action::Next);
159-
} else if delta.y < 0. {
160158
action = Some(Action::Prev);
159+
} else if delta.y < 0. {
160+
action = Some(Action::Next);
161161
}
162162
}
163163

0 commit comments

Comments
 (0)