feat: ambition text, fonts, and icon

Former-commit-id: 1838fc61a1e38b72ed89b2edf4b80855b10605da
This commit is contained in:
Muhammad Nauman Raza 2023-11-27 21:45:11 +00:00
parent bf2ed5e610
commit 28274807d2
Signed by: devraza
GPG key ID: 91EAD6081011574B
31 changed files with 131 additions and 20 deletions

3
.cargo/config.toml Normal file
View file

@ -0,0 +1,3 @@
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]

View file

@ -14,10 +14,6 @@ opt-level = 1
[profile.dev.package."*"]
opt-level = 3
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
[dependencies]
bevy = { version = "0.12.0", features = [ "wayland", "dynamic_linking" ] }
lazy_static = "1.4.0"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
43a6ab5c4dfb60b08c412649395ce5c25e188a8c

View file

@ -1 +0,0 @@
ccc5a6f8221d5251ef60bf750fd69949924a9051

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
assets/icon/ambition-2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
assets/icon/ambition.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

92
assets/icon/ambition.svg Normal file
View 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

View file

@ -30,8 +30,10 @@ fn main() {
App::new()
.insert_resource(ClearColor(HYPERNOVA.get("DARK_GRAY").copied().unwrap()))
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.add_systems(Update, render_ui)
.add_systems(
Startup,
(setup, render_ui)
)
.run();
}
@ -52,19 +54,39 @@ fn render_ui(
server: Res<AssetServer>,
mut commands: Commands
) {
let bold_font: Handle<Font> = server.load("fonts/iosevka-comfy-bold.ttf");
let regular_font: Handle<Font> = server.load("fonts/iosevka-comfy-regular.ttf");
let bold_font: Handle<Font> = server.load("fonts/VictorMono-Bold.otf");
let regular_font: Handle<Font> = server.load("fonts/VictorMono-Regular.otf");
let text_style = TextStyle {
font: bold_font,
font_size: 60.0,
color: HYPERNOVA.get("WHITE").copied().unwrap(),
font: bold_font.clone(),
font_size: 80.0,
color: Color::WHITE,
};
let text_alignment = TextAlignment::Center;
commands.spawn((
Text2dBundle {
text: Text::from_section("translation", text_style.clone())
.with_alignment(text_alignment),
commands
.spawn(NodeBundle {
style: Style {
// fill the entire window
width: Val::Percent(100.),
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()
}),
);
}
);
}