Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
limuy2022 committed Jun 6, 2024
1 parent 007420d commit 4567b1b
Show file tree
Hide file tree
Showing 21 changed files with 391 additions and 5 deletions.
2 changes: 2 additions & 0 deletions gdrust/src/fight_items.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
mod bar;
mod block_drawer;
mod health_bar;
15 changes: 15 additions & 0 deletions gdrust/src/fight_items/bar.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use godot::engine::{Control, IControl};
use godot::prelude::*;

#[derive(GodotClass)]
#[class(base=Control)]
struct Bar {
base: Base<Control>,
}

#[godot_api()]
impl IControl for Bar {
fn init(base: Base<Control>) -> Self {
Self { base }
}
}
9 changes: 6 additions & 3 deletions gdrust/src/fight_items/block_drawer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ struct BlockDrawer {
y: f32,
}

const BLOCK_COLOR: Color = Color::from_rgb(10.0, 10.0, 10.0);
const WIDTH: f32 = 12.0;

#[godot_api]
impl INode2D for BlockDrawer {
fn init(base: Base<Node2D>) -> BlockDrawer {
Expand All @@ -34,9 +37,9 @@ impl INode2D for BlockDrawer {
self.base_mut()
.draw_rect_ex(
Rect2::new(tmp, Vector2::new(xsize, Self::Y_SIZE_DEFAULT)),
Color::from_rgb(10.0, 10.0, 10.0),
BLOCK_COLOR,
)
.width(20.0)
.width(WIDTH)
.filled(false)
.done();
}
Expand All @@ -45,7 +48,7 @@ impl INode2D for BlockDrawer {
#[godot_api]
impl BlockDrawer {
const BOX_START_POS_X: f32 = 400.0;
const BOX_START_POS_Y: f32 = 330.0;
const BOX_START_POS_Y: f32 = 300.0;
const Y_SIZE_DEFAULT: f32 = 200.0;

#[func]
Expand Down
17 changes: 17 additions & 0 deletions gdrust/src/fight_items/health_bar.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use godot::engine::{INode2D, Node2D};
use godot::prelude::*;

#[derive(GodotClass)]
#[class(base=Node2D)]
struct HealthBar {
base: Base<Node2D>,
}

#[godot_api()]
impl INode2D for HealthBar {
fn init(base: Base<Node2D>) -> Self {
Self { base }
}

fn draw(&mut self) {}
}
Binary file added resources/images/UIAct/Default/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resources/images/UIAct/Default/000.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cvx31mw3e38mx"
path="res://.godot/imported/000.png-21593b225de17a2280fe84f0df19c92c.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/images/UIAct/Default/000.png"
dest_files=["res://.godot/imported/000.png-21593b225de17a2280fe84f0df19c92c.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added resources/images/UIAct/Highlight/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resources/images/UIAct/Highlight/000.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cho5eldvgpv3j"
path="res://.godot/imported/000.png-04b562133c649371c21a030a599dbf27.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/images/UIAct/Highlight/000.png"
dest_files=["res://.godot/imported/000.png-04b562133c649371c21a030a599dbf27.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added resources/images/UIFight/Default/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resources/images/UIFight/Default/000.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://b37v3b41jrx1x"
path="res://.godot/imported/000.png-74726d3d1156e02d9ab1d01cd9b5fb6a.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/images/UIFight/Default/000.png"
dest_files=["res://.godot/imported/000.png-74726d3d1156e02d9ab1d01cd9b5fb6a.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added resources/images/UIFight/Highlight/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resources/images/UIFight/Highlight/000.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dscxanl5ikwrj"
path="res://.godot/imported/000.png-358a4ff38bc3c83fca4a3a13dbc59b7c.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/images/UIFight/Highlight/000.png"
dest_files=["res://.godot/imported/000.png-358a4ff38bc3c83fca4a3a13dbc59b7c.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added resources/images/UIItem/Default/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resources/images/UIItem/Default/000.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://r8fejoruchch"
path="res://.godot/imported/000.png-0378d9d3b65c258038aecad9ad5d8465.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/images/UIItem/Default/000.png"
dest_files=["res://.godot/imported/000.png-0378d9d3b65c258038aecad9ad5d8465.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added resources/images/UIItem/Highlight/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resources/images/UIItem/Highlight/000.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://br34m74mf8wh6"
path="res://.godot/imported/000.png-5349b2863fcb0838e421b4a1115329e3.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/images/UIItem/Highlight/000.png"
dest_files=["res://.godot/imported/000.png-5349b2863fcb0838e421b4a1115329e3.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added resources/images/UIMercy/Default/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resources/images/UIMercy/Default/000.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cjdh86b5aivef"
path="res://.godot/imported/000.png-5590cfe65e71589fb782b9f30a79c5e0.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/images/UIMercy/Default/000.png"
dest_files=["res://.godot/imported/000.png-5590cfe65e71589fb782b9f30a79c5e0.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added resources/images/UIMercy/Highlight/000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resources/images/UIMercy/Highlight/000.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://wawi1y6785j5"
path="res://.godot/imported/000.png-b9108474afd37f30f94d83744bc98dc6.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/images/UIMercy/Highlight/000.png"
dest_files=["res://.godot/imported/000.png-b9108474afd37f30f94d83744bc98dc6.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Loading

0 comments on commit 4567b1b

Please sign in to comment.