Skip to content

Commit

Permalink
fix text scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
stutxo committed Aug 3, 2023
1 parent e4e1139 commit 290fbe1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>☔ rain.run</title>
<script type="module">import init from './satrunner-7bf43ee74ea78ac0.js';init('./satrunner-7bf43ee74ea78ac0_bg.wasm');</script>
<script type="module">import init from './satrunner-f72704806ce1ddc.js';init('./satrunner-f72704806ce1ddc_bg.wasm');</script>


<style>
Expand All @@ -17,8 +17,8 @@
}
</style>

<link rel="preload" href="./satrunner-7bf43ee74ea78ac0_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="./satrunner-7bf43ee74ea78ac0.js"></head>
<link rel="preload" href="./satrunner-f72704806ce1ddc_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="./satrunner-f72704806ce1ddc.js"></head>

<body>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ async function __wbg_init(input) {
if (wasm !== undefined) return wasm;

if (typeof input === 'undefined') {
input = new URL('satrunner-7bf43ee74ea78ac0_bg.wasm', import.meta.url);
input = new URL('satrunner-f72704806ce1ddc_bg.wasm', import.meta.url);
}
const imports = __wbg_get_imports();

Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion src/game_core/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ pub fn game_over(
.show(ctx, |ui| {
for (mut transform, mut player, mut sprite) in query_player.iter_mut() {
egui::Area::new("area")
.anchor(egui::Align2::CENTER_CENTER, egui::Vec2::new(0.0, 220.0))
.anchor(egui::Align2::CENTER_CENTER, egui::Vec2::new(0.0, 0.0))
.show(ctx, |ui| {
ui.horizontal(|ui| {
if player.score == 21 {
Expand Down
6 changes: 5 additions & 1 deletion src/game_core/sprites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ pub fn spawn_enemies(
parent
.spawn(Text2dBundle {
text: text.with_alignment(TextAlignment::Center),
transform: Transform::from_translation(Vec3::new(0.0, -3., 0.0)),
transform: Transform {
translation: Vec3::new(0.0, -3., 0.0),
scale: Vec2::new(0.1, 0.1).extend(1.),
..default()
},
..Default::default()
})
.insert(NamePlates);
Expand Down

0 comments on commit 290fbe1

Please sign in to comment.