feat: ambition
text, fonts, and icon
Former-commit-id: 1838fc61a1e38b72ed89b2edf4b80855b10605da
This commit is contained in:
parent
bf2ed5e610
commit
28274807d2
3
.cargo/config.toml
Normal file
3
.cargo/config.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[target.x86_64-unknown-linux-gnu]
|
||||||
|
linker = "clang"
|
||||||
|
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
|
|
@ -14,10 +14,6 @@ opt-level = 1
|
||||||
[profile.dev.package."*"]
|
[profile.dev.package."*"]
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
||||||
[target.x86_64-unknown-linux-gnu]
|
|
||||||
linker = "clang"
|
|
||||||
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = { version = "0.12.0", features = [ "wayland", "dynamic_linking" ] }
|
bevy = { version = "0.12.0", features = [ "wayland", "dynamic_linking" ] }
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
|
|
BIN
assets/fonts/VictorMono-Bold.otf
Normal file
BIN
assets/fonts/VictorMono-Bold.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-BoldItalic.otf
Normal file
BIN
assets/fonts/VictorMono-BoldItalic.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-BoldOblique.otf
Normal file
BIN
assets/fonts/VictorMono-BoldOblique.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-ExtraLight.otf
Normal file
BIN
assets/fonts/VictorMono-ExtraLight.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-ExtraLightItalic.otf
Normal file
BIN
assets/fonts/VictorMono-ExtraLightItalic.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-ExtraLightOblique.otf
Normal file
BIN
assets/fonts/VictorMono-ExtraLightOblique.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-Italic.otf
Normal file
BIN
assets/fonts/VictorMono-Italic.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-Light.otf
Normal file
BIN
assets/fonts/VictorMono-Light.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-LightItalic.otf
Normal file
BIN
assets/fonts/VictorMono-LightItalic.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-LightOblique.otf
Normal file
BIN
assets/fonts/VictorMono-LightOblique.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-Medium.otf
Normal file
BIN
assets/fonts/VictorMono-Medium.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-MediumItalic.otf
Normal file
BIN
assets/fonts/VictorMono-MediumItalic.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-MediumOblique.otf
Normal file
BIN
assets/fonts/VictorMono-MediumOblique.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-Oblique.otf
Normal file
BIN
assets/fonts/VictorMono-Oblique.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-Regular.otf
Normal file
BIN
assets/fonts/VictorMono-Regular.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-SemiBold.otf
Normal file
BIN
assets/fonts/VictorMono-SemiBold.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-SemiBoldItalic.otf
Normal file
BIN
assets/fonts/VictorMono-SemiBoldItalic.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-SemiBoldOblique.otf
Normal file
BIN
assets/fonts/VictorMono-SemiBoldOblique.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-Thin.otf
Normal file
BIN
assets/fonts/VictorMono-Thin.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-ThinItalic.otf
Normal file
BIN
assets/fonts/VictorMono-ThinItalic.otf
Normal file
Binary file not shown.
BIN
assets/fonts/VictorMono-ThinOblique.otf
Normal file
BIN
assets/fonts/VictorMono-ThinOblique.otf
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
43a6ab5c4dfb60b08c412649395ce5c25e188a8c
|
|
|
@ -1 +0,0 @@
|
||||||
ccc5a6f8221d5251ef60bf750fd69949924a9051
|
|
BIN
assets/icon/ambition-2x-nobg-white.png
Normal file
BIN
assets/icon/ambition-2x-nobg-white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
assets/icon/ambition-2x.png
Normal file
BIN
assets/icon/ambition-2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
assets/icon/ambition-nobg-white.png
Normal file
BIN
assets/icon/ambition-nobg-white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/icon/ambition.png
Normal file
BIN
assets/icon/ambition.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
92
assets/icon/ambition.svg
Normal file
92
assets/icon/ambition.svg
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 135.46667 135.46666"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||||
|
sodipodi:docname="ambition.svg"
|
||||||
|
inkscape:export-filename="ambition-nobg-white.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:zoom="1.1111933"
|
||||||
|
inkscape:cx="-139.93965"
|
||||||
|
inkscape:cy="237.58243"
|
||||||
|
inkscape:window-width="2560"
|
||||||
|
inkscape:window-height="1080"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs1" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Canvas"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<g
|
||||||
|
id="g1"
|
||||||
|
transform="translate(0,-37.239771)">
|
||||||
|
<path
|
||||||
|
id="path1"
|
||||||
|
style="fill:#f9f9f9;fill-opacity:1;stroke-width:1.28923"
|
||||||
|
inkscape:transform-center-y="2.6463078"
|
||||||
|
d="M 67.733333,53.023018 60.459005,65.62247 53.184928,78.221923 h 8.940759 l 1.319698,-2.285614 0.65645,-1.136889 h -4.944398 l 4.287948,-7.426921 4.287948,-7.427173 4.287949,7.427173 4.287948,7.426921 h -4.944398 l 0.65645,1.136889 1.319698,2.285614 h 8.940759 L 75.007662,65.62247 Z" />
|
||||||
|
<path
|
||||||
|
id="path1-6"
|
||||||
|
style="fill:#f9f9f9;fill-opacity:1;stroke-width:1.28923"
|
||||||
|
inkscape:transform-center-y="2.6463077"
|
||||||
|
d="m 67.733334,65.915317 -7.274328,12.599452 -7.274077,12.599452 h 8.940759 l 1.319698,-2.285612 0.656449,-1.136889 h -4.944398 l 4.287949,-7.426921 4.287948,-7.427174 4.287949,7.427174 4.287948,7.426921 h -4.944398 l 0.65645,1.136889 1.319698,2.285612 h 8.940757 L 75.007663,78.514769 Z" />
|
||||||
|
<path
|
||||||
|
id="path1-6-6"
|
||||||
|
style="fill:#f9f9f9;fill-opacity:1;stroke-width:1.28923"
|
||||||
|
inkscape:transform-center-y="2.6463051"
|
||||||
|
d="M 67.733333 78.807776 L 60.458842 91.407007 L 53.184867 104.00676 L 62.125924 104.00676 L 62.132642 103.99487 L 73.334025 103.99487 L 73.340743 104.00676 L 82.281799 104.00676 L 75.007825 91.407007 L 67.733333 78.807776 z M 67.733333 85.729834 L 72.021444 93.157288 L 76.287333 100.5465 L 59.179333 100.5465 L 63.445223 93.157288 L 67.733333 85.729834 z " />
|
||||||
|
</g>
|
||||||
|
<rect
|
||||||
|
style="fill:#f9f9f9;fill-opacity:1;stroke-width:1.28713"
|
||||||
|
id="rect2"
|
||||||
|
width="4.6198416"
|
||||||
|
height="35.058056"
|
||||||
|
x="65.423409"
|
||||||
|
y="48.304253" />
|
||||||
|
<g
|
||||||
|
id="g3">
|
||||||
|
<path
|
||||||
|
id="rect3-3"
|
||||||
|
style="fill:#f9f9f9;fill-opacity:1;stroke-width:1.74119"
|
||||||
|
d="M 78.022588,96.623859 80.599121,94.047326 67.733333,81.181542 54.867544,94.047326 57.444077,96.623859 67.733333,86.334604 Z" />
|
||||||
|
<path
|
||||||
|
id="rect3-3-4"
|
||||||
|
style="fill:#f9f9f9;fill-opacity:1;stroke-width:1.74119"
|
||||||
|
d="m 78.022585,106.18262 2.576536,-2.57653 -12.865792,-12.865794 -12.865784,12.865794 2.576527,2.57653 10.289257,-10.289262 z" />
|
||||||
|
<path
|
||||||
|
id="rect3-3-4-1"
|
||||||
|
style="fill:#f9f9f9;fill-opacity:1;stroke-width:1.74119"
|
||||||
|
d="m 78.022585,116.18678 2.576536,-2.57653 -12.865792,-12.8658 -12.865784,12.8658 2.576527,2.57653 10.289257,-10.28927 z" />
|
||||||
|
</g>
|
||||||
|
<circle
|
||||||
|
style="fill:#f9f9f9;fill-opacity:1;stroke-width:1.64999"
|
||||||
|
id="path3"
|
||||||
|
cx="67.73333"
|
||||||
|
cy="75.141663"
|
||||||
|
r="4.339817" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.8 KiB |
50
src/main.rs
50
src/main.rs
|
@ -30,8 +30,10 @@ fn main() {
|
||||||
App::new()
|
App::new()
|
||||||
.insert_resource(ClearColor(HYPERNOVA.get("DARK_GRAY").copied().unwrap()))
|
.insert_resource(ClearColor(HYPERNOVA.get("DARK_GRAY").copied().unwrap()))
|
||||||
.add_plugins(DefaultPlugins)
|
.add_plugins(DefaultPlugins)
|
||||||
.add_systems(Startup, setup)
|
.add_systems(
|
||||||
.add_systems(Update, render_ui)
|
Startup,
|
||||||
|
(setup, render_ui)
|
||||||
|
)
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,19 +54,39 @@ fn render_ui(
|
||||||
server: Res<AssetServer>,
|
server: Res<AssetServer>,
|
||||||
mut commands: Commands
|
mut commands: Commands
|
||||||
) {
|
) {
|
||||||
let bold_font: Handle<Font> = server.load("fonts/iosevka-comfy-bold.ttf");
|
let bold_font: Handle<Font> = server.load("fonts/VictorMono-Bold.otf");
|
||||||
let regular_font: Handle<Font> = server.load("fonts/iosevka-comfy-regular.ttf");
|
let regular_font: Handle<Font> = server.load("fonts/VictorMono-Regular.otf");
|
||||||
|
|
||||||
let text_style = TextStyle {
|
let text_style = TextStyle {
|
||||||
font: bold_font,
|
font: bold_font.clone(),
|
||||||
font_size: 60.0,
|
font_size: 80.0,
|
||||||
color: HYPERNOVA.get("WHITE").copied().unwrap(),
|
color: Color::WHITE,
|
||||||
};
|
};
|
||||||
let text_alignment = TextAlignment::Center;
|
commands
|
||||||
commands.spawn((
|
.spawn(NodeBundle {
|
||||||
Text2dBundle {
|
style: Style {
|
||||||
text: Text::from_section("translation", text_style.clone())
|
// fill the entire window
|
||||||
.with_alignment(text_alignment),
|
width: Val::Percent(100.),
|
||||||
..default()
|
flex_direction: FlexDirection::Column,
|
||||||
)};
|
align_items: AlignItems::Center,
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
|
background_color: BackgroundColor(Color::BLACK),
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
.with_children(|builder| {
|
||||||
|
builder.spawn(
|
||||||
|
TextBundle::from_section("Ambition", text_style.clone())
|
||||||
|
.with_text_alignment(TextAlignment::Center)
|
||||||
|
.with_style(Style {
|
||||||
|
position_type: PositionType::Absolute,
|
||||||
|
margin: UiRect {
|
||||||
|
top: Val::Percent(10.),
|
||||||
|
..default()
|
||||||
|
},
|
||||||
|
..default()
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue