Compare commits
7 Commits
a20c80d922
...
item_chang
| Author | SHA1 | Date | |
|---|---|---|---|
| 34c125e6bb | |||
| 66905c9b53 | |||
|
|
a1f4a29eb3 | ||
| a6ea1b1873 | |||
|
|
47ceb2f613 | ||
| bf6b0d50c3 | |||
| c7603a163f |
@@ -16,6 +16,8 @@ public interface IExperiencePointsComponent : IEntityComponent
|
|||||||
|
|
||||||
public void Gain(int baseExpGain);
|
public void Gain(int baseExpGain);
|
||||||
|
|
||||||
|
public void GainUnmodified(int flateRateExpGain);
|
||||||
|
|
||||||
public void LevelUp();
|
public void LevelUp();
|
||||||
|
|
||||||
public event Action PlayerLevelUp;
|
public event Action PlayerLevelUp;
|
||||||
|
|||||||
@@ -51,6 +51,16 @@ public class ExperiencePointsComponent : IExperiencePointsComponent
|
|||||||
var cappedAmount = Math.Min(baseExpGain + _currentExp.Value, _expToNextLevel.Value);
|
var cappedAmount = Math.Min(baseExpGain + _currentExp.Value, _expToNextLevel.Value);
|
||||||
_currentExp.OnNext(cappedAmount);
|
_currentExp.OnNext(cappedAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void GainUnmodified(int flatRateExp)
|
||||||
|
{
|
||||||
|
var newCurrentExpTotal = flatRateExp + _currentExp.Value;
|
||||||
|
while (flatRateExp + _currentExp.Value >= _expToNextLevel.Value)
|
||||||
|
LevelUp();
|
||||||
|
var cappedAmount = Math.Min(flatRateExp + _currentExp.Value, _expToNextLevel.Value);
|
||||||
|
_currentExp.OnNext(cappedAmount);
|
||||||
|
}
|
||||||
|
|
||||||
public void ModifyExpGainRate(double newRate) => _expGainRate.OnNext(newRate);
|
public void ModifyExpGainRate(double newRate) => _expGainRate.OnNext(newRate);
|
||||||
|
|
||||||
public void LevelUp()
|
public void LevelUp()
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public partial class App : Node, IApp
|
|||||||
})
|
})
|
||||||
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
||||||
{
|
{
|
||||||
LoadingScreen.Show();
|
LoadingScreen.ShowLoadingScreen();
|
||||||
LoadGame(GAME_SCENE_PATH);
|
LoadGame(GAME_SCENE_PATH);
|
||||||
})
|
})
|
||||||
.Handle((in AppLogic.Output.ShowMainMenu _) =>
|
.Handle((in AppLogic.Output.ShowMainMenu _) =>
|
||||||
@@ -155,7 +155,7 @@ public partial class App : Node, IApp
|
|||||||
})
|
})
|
||||||
.Handle((in AppLogic.Output.CloseGame _) =>
|
.Handle((in AppLogic.Output.CloseGame _) =>
|
||||||
{
|
{
|
||||||
LoadingScreen.Hide();
|
LoadingScreen.HideLoadingScreen();
|
||||||
_game.GameExitRequested -= GameExitRequested;
|
_game.GameExitRequested -= GameExitRequested;
|
||||||
MainMenu.StartGameButton.GrabFocus();
|
MainMenu.StartGameButton.GrabFocus();
|
||||||
_game.CallDeferred(MethodName.QueueFree, []);
|
_game.CallDeferred(MethodName.QueueFree, []);
|
||||||
@@ -166,13 +166,13 @@ public partial class App : Node, IApp
|
|||||||
})
|
})
|
||||||
.Handle((in AppLogic.Output.EnemyViewerOpened _) =>
|
.Handle((in AppLogic.Output.EnemyViewerOpened _) =>
|
||||||
{
|
{
|
||||||
LoadingScreen.Show();
|
LoadingScreen.ShowLoadingScreen();
|
||||||
MainMenu.Hide();
|
MainMenu.Hide();
|
||||||
LoadEnemyViewer(ENEMY_VIEWER_PATH);
|
LoadEnemyViewer(ENEMY_VIEWER_PATH);
|
||||||
})
|
})
|
||||||
.Handle((in AppLogic.Output.EnemyViewerExited _) =>
|
.Handle((in AppLogic.Output.EnemyViewerExited _) =>
|
||||||
{
|
{
|
||||||
LoadingScreen.Hide();
|
LoadingScreen.HideLoadingScreen();
|
||||||
if (_enemyViewer != null && _enemyViewer is DataViewer enemyViewer)
|
if (_enemyViewer != null && _enemyViewer is DataViewer enemyViewer)
|
||||||
enemyViewer.CallDeferred(MethodName.QueueFree);
|
enemyViewer.CallDeferred(MethodName.QueueFree);
|
||||||
MainMenu.Show();
|
MainMenu.Show();
|
||||||
@@ -203,24 +203,22 @@ public partial class App : Node, IApp
|
|||||||
_game = scene as IGame;
|
_game = scene as IGame;
|
||||||
_game.GameLoaded += OnGameLoaded;
|
_game.GameLoaded += OnGameLoaded;
|
||||||
_game.GameExitRequested += GameExitRequested;
|
_game.GameExitRequested += GameExitRequested;
|
||||||
await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
|
|
||||||
CallDeferred(MethodName.AddChild, scene);
|
CallDeferred(MethodName.AddChild, scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGameLoaded() => LoadingScreen.Hide();
|
private void OnGameLoaded() => LoadingScreen.HideLoadingScreen();
|
||||||
|
|
||||||
private async void LoadEnemyViewer(string sceneName)
|
private async void LoadEnemyViewer(string sceneName)
|
||||||
{
|
{
|
||||||
var scene = await LoadSceneInternal(sceneName);
|
var scene = await LoadSceneInternal(sceneName);
|
||||||
_enemyViewer = scene as IDataViewer;
|
_enemyViewer = scene as IDataViewer;
|
||||||
await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
|
|
||||||
CallDeferred(MethodName.AddChild, scene);
|
CallDeferred(MethodName.AddChild, scene);
|
||||||
LoadingScreen.Hide();
|
LoadingScreen.HideLoadingScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<Node> LoadSceneInternal(string sceneName)
|
private async Task<Node> LoadSceneInternal(string sceneName)
|
||||||
{
|
{
|
||||||
LoadingScreen.Show();
|
LoadingScreen.ShowLoadingScreen();
|
||||||
LoadingScreen.ProgressBar.Value = 0;
|
LoadingScreen.ProgressBar.Value = 0;
|
||||||
var sceneLoader = new SceneLoader();
|
var sceneLoader = new SceneLoader();
|
||||||
CallDeferred(MethodName.AddChild, sceneLoader);
|
CallDeferred(MethodName.AddChild, sceneLoader);
|
||||||
|
|||||||
@@ -10,9 +10,16 @@
|
|||||||
process_mode = 3
|
process_mode = 3
|
||||||
script = ExtResource("1_rt73h")
|
script = ExtResource("1_rt73h")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
[node name="MainMenu" parent="." instance=ExtResource("2_1uiag")]
|
[node name="MainMenu" parent="." instance=ExtResource("2_1uiag")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
visible = false
|
|
||||||
|
|
||||||
[node name="OptionsMenu" parent="." instance=ExtResource("2_v0mgf")]
|
[node name="OptionsMenu" parent="." instance=ExtResource("2_v0mgf")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
@@ -24,5 +31,6 @@ visible = false
|
|||||||
|
|
||||||
[node name="LoadingScreen" parent="." instance=ExtResource("3_3st5l")]
|
[node name="LoadingScreen" parent="." instance=ExtResource("3_3st5l")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
top_level = true
|
top_level = true
|
||||||
z_index = 999
|
z_index = 999
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ bus = &"SFX"
|
|||||||
[node name="MoveSound" type="AudioStreamPlayer" parent="UI"]
|
[node name="MoveSound" type="AudioStreamPlayer" parent="UI"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
stream = ExtResource("6_r16t0")
|
stream = ExtResource("6_r16t0")
|
||||||
|
max_polyphony = 5
|
||||||
bus = &"SFX"
|
bus = &"SFX"
|
||||||
|
|
||||||
[node name="SelectSound" type="AudioStreamPlayer" parent="UI"]
|
[node name="SelectSound" type="AudioStreamPlayer" parent="UI"]
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ _acquireTargetTime = 2.0
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
avoidance_enabled = true
|
avoidance_enabled = true
|
||||||
radius = 1.0
|
radius = 1.0
|
||||||
debug_enabled = true
|
|
||||||
|
|
||||||
[node name="SFX" type="Node3D" parent="."]
|
[node name="SFX" type="Node3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0617, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0617, 0)
|
||||||
|
|||||||
@@ -157,9 +157,7 @@ public partial class Game : Node3D, IGame
|
|||||||
GameState.Set(_player);
|
GameState.Set(_player);
|
||||||
GameState.Set(_map);
|
GameState.Set(_map);
|
||||||
GameState.Set(InGameUI);
|
GameState.Set(InGameUI);
|
||||||
GameRepo.Resume();
|
|
||||||
|
|
||||||
InGameUI.Show();
|
|
||||||
HandleGameLogic();
|
HandleGameLogic();
|
||||||
GameState.Start();
|
GameState.Start();
|
||||||
this.Provide();
|
this.Provide();
|
||||||
@@ -188,6 +186,8 @@ public partial class Game : Node3D, IGame
|
|||||||
|
|
||||||
GameRepo.IsPaused.Sync += IsPaused_Sync;
|
GameRepo.IsPaused.Sync += IsPaused_Sync;
|
||||||
InGameUI.PlayerInfoUI.Activate();
|
InGameUI.PlayerInfoUI.Activate();
|
||||||
|
InGameUI.Show();
|
||||||
|
GameRepo.Resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GameRepo_EnemyDied(IEnemy obj)
|
private void GameRepo_EnemyDied(IEnemy obj)
|
||||||
@@ -209,7 +209,6 @@ public partial class Game : Node3D, IGame
|
|||||||
_effectService = new EffectService(this, _player, _map);
|
_effectService = new EffectService(this, _player, _map);
|
||||||
_player.Activate();
|
_player.Activate();
|
||||||
await _map.LoadFloor();
|
await _map.LoadFloor();
|
||||||
GameLoaded?.Invoke();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Save() => await SaveFile.Save();
|
public async Task Save() => await SaveFile.Save();
|
||||||
@@ -233,9 +232,6 @@ public partial class Game : Node3D, IGame
|
|||||||
EnactEffectItemEffects(effectItem);
|
EnactEffectItemEffects(effectItem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
await ToSignal(GetTree().CreateTimer(0.3f), "timeout");
|
|
||||||
|
|
||||||
RemoveItemOrSubtractFromItemCount(item);
|
RemoveItemOrSubtractFromItemCount(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +394,10 @@ public partial class Game : Node3D, IGame
|
|||||||
InGameUI.InventoryMenu.SetProcessInput(false);
|
InGameUI.InventoryMenu.SetProcessInput(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LoadLevel() => await _map.LoadFloor();
|
private async void LoadLevel()
|
||||||
|
{
|
||||||
|
await _map.LoadFloor();
|
||||||
|
}
|
||||||
|
|
||||||
private void FloorClearMenu_GoToNextFloor() => GameState.Input(new GameState.Input.LoadNextFloor());
|
private void FloorClearMenu_GoToNextFloor() => GameState.Input(new GameState.Input.LoadNextFloor());
|
||||||
|
|
||||||
@@ -419,7 +418,6 @@ public partial class Game : Node3D, IGame
|
|||||||
|
|
||||||
private void UseTeleportPrompt_TeleportToNextFloor()
|
private void UseTeleportPrompt_TeleportToNextFloor()
|
||||||
{
|
{
|
||||||
//_player.LookUp();
|
|
||||||
GameState.Input(new GameState.Input.UseTeleport());
|
GameState.Input(new GameState.Input.UseTeleport());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,6 +586,8 @@ public partial class Game : Node3D, IGame
|
|||||||
private void OnFloorLoadFinished()
|
private void OnFloorLoadFinished()
|
||||||
{
|
{
|
||||||
LoadNextLevel.Hide();
|
LoadNextLevel.Hide();
|
||||||
|
GameLoaded?.Invoke();
|
||||||
|
_map.FadeIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnQuit() => GameExitRequested?.Invoke();
|
private void OnQuit() => GameExitRequested?.Invoke();
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ process_mode = 3
|
|||||||
script = ExtResource("1_ytcii")
|
script = ExtResource("1_ytcii")
|
||||||
|
|
||||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
||||||
custom_minimum_size = Vector2(1440, 1080)
|
custom_minimum_size = Vector2(1456, 1080)
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_right = -480.0
|
offset_right = -464.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
stretch = true
|
stretch = true
|
||||||
@@ -23,7 +23,7 @@ stretch = true
|
|||||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
audio_listener_enable_3d = true
|
audio_listener_enable_3d = true
|
||||||
size = Vector2i(1440, 1080)
|
size = Vector2i(1456, 1080)
|
||||||
render_target_update_mode = 4
|
render_target_update_mode = 4
|
||||||
|
|
||||||
[node name="PauseContainer" type="Node3D" parent="SubViewportContainer/SubViewport"]
|
[node name="PauseContainer" type="Node3D" parent="SubViewportContainer/SubViewport"]
|
||||||
|
|||||||
BIN
Zennysoft.Game.Ma/src/items/3D Render Icons/Mask of Zeal.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cy7qvpjahblv3"
|
||||||
|
path.bptc="res://.godot/imported/Mask of Zeal.png-27ba6e23bb2ecd6acedb6fdbc3423aee.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/items/3D Render Icons/Mask of Zeal.png"
|
||||||
|
dest_files=["res://.godot/imported/Mask of Zeal.png-27ba6e23bb2ecd6acedb6fdbc3423aee.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
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=0
|
||||||
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cy5bd7f37fi35"
|
||||||
|
path.bptc="res://.godot/imported/health item placeholder.png-d6e3fd30b79c4ebf810d66504d813903.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/items/3D Render Icons/health item placeholder.png"
|
||||||
|
dest_files=["res://.godot/imported/health item placeholder.png-d6e3fd30b79c4ebf810d66504d813903.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
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=0
|
||||||
BIN
Zennysoft.Game.Ma/src/items/3D Render Icons/mask placeholder.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://m0f8xmp8l2fe"
|
||||||
|
path.bptc="res://.godot/imported/mask placeholder.png-214c6109a019a6bad1f6bd77ac323bd3.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/items/3D Render Icons/mask placeholder.png"
|
||||||
|
dest_files=["res://.godot/imported/mask placeholder.png-214c6109a019a6bad1f6bd77ac323bd3.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
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=0
|
||||||
@@ -172,7 +172,11 @@ public class EffectService
|
|||||||
SfxDatabase.Instance.Play(SoundEffect.IncreaseStat);
|
SfxDatabase.Instance.Play(SoundEffect.IncreaseStat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RaiseLevel() => _player.LevelUp();
|
public void RaiseLevel()
|
||||||
|
{
|
||||||
|
var expToNextLevel = _player.ExperiencePointsComponent.ExpToNextLevel.Value - _player.ExperiencePointsComponent.CurrentExp.Value;
|
||||||
|
_player.ExperiencePointsComponent.GainUnmodified(expToNextLevel);
|
||||||
|
}
|
||||||
|
|
||||||
public void TeleportToRandomRoom(IEnemy enemy)
|
public void TeleportToRandomRoom(IEnemy enemy)
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
Zennysoft.Game.Ma/src/items/VT Crystal/FRAME 2.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
35
Zennysoft.Game.Ma/src/items/VT Crystal/FRAME 2.png.import
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://d3g5l5x5crrcy"
|
||||||
|
path.bptc="res://.godot/imported/FRAME 2.png-229cea0e1e02f919f524c9941094cf2b.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/items/VT Crystal/FRAME 2.png"
|
||||||
|
dest_files=["res://.godot/imported/FRAME 2.png-229cea0e1e02f919f524c9941094cf2b.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
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=0
|
||||||
BIN
Zennysoft.Game.Ma/src/items/VT Crystal/FRAME 3.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
35
Zennysoft.Game.Ma/src/items/VT Crystal/FRAME 3.png.import
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://evb7fqb01tm5"
|
||||||
|
path.bptc="res://.godot/imported/FRAME 3.png-d7f1ced39fbde420333fb73302a64991.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/items/VT Crystal/FRAME 3.png"
|
||||||
|
dest_files=["res://.godot/imported/FRAME 3.png-d7f1ced39fbde420333fb73302a64991.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
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=0
|
||||||
BIN
Zennysoft.Game.Ma/src/items/VT Crystal/FRAME1.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
35
Zennysoft.Game.Ma/src/items/VT Crystal/FRAME1.png.import
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b36xqrykgtdkw"
|
||||||
|
path.bptc="res://.godot/imported/FRAME1.png-2a41a5e2a774e029a8c5614fdd3304e6.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/items/VT Crystal/FRAME1.png"
|
||||||
|
dest_files=["res://.godot/imported/FRAME1.png-2a41a5e2a774e029a8c5614fdd3304e6.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
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=0
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://db075qhmlmrcu"]
|
[gd_resource type="Resource" script_class="WeaponStats" load_steps=4 format=3 uid="uid://db075qhmlmrcu"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_kbje7"]
|
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_kbje7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cb86dpkft2m03" path="res://src/items/weapons/textures/KUBEL.PNG" id="1_kwtbu"]
|
[ext_resource type="Texture2D" uid="uid://bkntmni5jxfpk" path="res://src/items/weapons/textures/KUBEL.PNG" id="1_kwtbu"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://ilf2s8ct2stt" path="res://src/audio/sfx/PLAYER_slower_slash.ogg" id="1_xfglq"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_kbje7")
|
script = ExtResource("1_kbje7")
|
||||||
AttackSpeed = 1.0
|
AttackSpeed = 1.0
|
||||||
WeaponElement = 5
|
WeaponElement = 5
|
||||||
WeaponTag = 0
|
WeaponTag = 0
|
||||||
SelfDamage = 0
|
|
||||||
SoundEffect = 4
|
SoundEffect = 4
|
||||||
Name = "Kubel"
|
Name = "Kubel"
|
||||||
Description = "+9 ATK
|
Description = "+9 ATK
|
||||||
@@ -25,9 +25,8 @@ TelluricResistance = 0
|
|||||||
HydricResistance = 0
|
HydricResistance = 0
|
||||||
IgneousResistance = 0
|
IgneousResistance = 0
|
||||||
FerrumResistance = 0
|
FerrumResistance = 0
|
||||||
HolyResistance = 0
|
|
||||||
CurseResistance = 0
|
|
||||||
ThrowSpeed = 12.0
|
ThrowSpeed = 12.0
|
||||||
ThrowDamage = 5
|
ThrowDamage = 5
|
||||||
ItemTag = 0
|
ItemTag = 0
|
||||||
Texture = ExtResource("1_kwtbu")
|
Texture = ExtResource("1_kwtbu")
|
||||||
|
AudioStream = ExtResource("1_xfglq")
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ public interface IMap : INode3D
|
|||||||
|
|
||||||
void InitializeMapData();
|
void InitializeMapData();
|
||||||
|
|
||||||
|
public void FadeIn();
|
||||||
|
|
||||||
|
public void FadeOut();
|
||||||
|
|
||||||
public AutoProp<int> CurrentFloorNumber { get; }
|
public AutoProp<int> CurrentFloorNumber { get; }
|
||||||
|
|
||||||
public event Action<(Vector3 Rotation, Vector3 Position)> SpawnPointCreated;
|
public event Action<(Vector3 Rotation, Vector3 Position)> SpawnPointCreated;
|
||||||
|
|||||||
@@ -59,9 +59,11 @@ public partial class Map : Node3D, IMap
|
|||||||
var floor = MapOrder.GetChildren().OfType<FloorNode>().ElementAt(CurrentFloorNumber.Value);
|
var floor = MapOrder.GetChildren().OfType<FloorNode>().ElementAt(CurrentFloorNumber.Value);
|
||||||
if (CurrentFloor is DungeonFloor dungeonFloor && floor is DungeonFloorNode dungeonFloorNode)
|
if (CurrentFloor is DungeonFloor dungeonFloor && floor is DungeonFloorNode dungeonFloorNode)
|
||||||
dungeonFloor.SpawnEnemies(dungeonFloorNode);
|
dungeonFloor.SpawnEnemies(dungeonFloorNode);
|
||||||
AnimationPlayer.CallDeferred(AnimationPlayer.MethodName.Play, ("fade_in"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void FadeIn() => AnimationPlayer.Play("fade_in");
|
||||||
|
public void FadeOut() => AnimationPlayer.Play("fade_out");
|
||||||
|
|
||||||
public void InitializeMapData()
|
public void InitializeMapData()
|
||||||
{
|
{
|
||||||
CurrentFloorNumber.OnNext(-1);
|
CurrentFloorNumber.OnNext(-1);
|
||||||
@@ -89,7 +91,7 @@ public partial class Map : Node3D, IMap
|
|||||||
|
|
||||||
public async Task LoadFloor(string sceneName)
|
public async Task LoadFloor(string sceneName)
|
||||||
{
|
{
|
||||||
AnimationPlayer.CallDeferred(AnimationPlayer.MethodName.Play, "fade_out");
|
CallDeferred(MethodName.FadeOut);
|
||||||
_sceneName = sceneName;
|
_sceneName = sceneName;
|
||||||
var dimmableAudio = GetTree().GetNodesInGroup("DimmableAudio").OfType<IDimmableAudioStreamPlayer>();
|
var dimmableAudio = GetTree().GetNodesInGroup("DimmableAudio").OfType<IDimmableAudioStreamPlayer>();
|
||||||
foreach (var node in dimmableAudio)
|
foreach (var node in dimmableAudio)
|
||||||
|
|||||||
@@ -19,7 +19,22 @@ tracks/0/keys = {
|
|||||||
"values": [Color(0, 0, 0, 1)]
|
"values": [Color(0, 0, 0, 1)]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_g6eui"]
|
[sub_resource type="Animation" id="Animation_v14r0"]
|
||||||
|
resource_name = "fade_out"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_0qcd2"]
|
||||||
resource_name = "fade_in"
|
resource_name = "fade_in"
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
@@ -34,39 +49,16 @@ tracks/0/keys = {
|
|||||||
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_v14r0"]
|
|
||||||
resource_name = "fade_out"
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("ColorRect:color")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(-0.0666667, 0),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 1)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_00xd7"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_00xd7"]
|
||||||
_data = {
|
_data = {
|
||||||
&"RESET": SubResource("Animation_00xd7"),
|
&"RESET": SubResource("Animation_00xd7"),
|
||||||
&"fade_in": SubResource("Animation_g6eui"),
|
&"fade_in": SubResource("Animation_0qcd2"),
|
||||||
&"fade_out": SubResource("Animation_v14r0")
|
&"fade_out": SubResource("Animation_v14r0")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Map" type="Node3D"]
|
[node name="Map" type="Node3D"]
|
||||||
script = ExtResource("1_bw70o")
|
script = ExtResource("1_bw70o")
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
color = Color(0, 0, 0, 1)
|
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
libraries = {
|
libraries = {
|
||||||
@@ -219,3 +211,11 @@ FloorName = 4
|
|||||||
[node name="Final Floor" type="Node" parent="MapOrder"]
|
[node name="Final Floor" type="Node" parent="MapOrder"]
|
||||||
script = ExtResource("3_v14r0")
|
script = ExtResource("3_v14r0")
|
||||||
FloorName = 6
|
FloorName = 6
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=11 format=3 uid="uid://cyrrhoarhxlhg"]
|
[gd_scene load_steps=13 format=3 uid="uid://cyrrhoarhxlhg"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://r8mpxyum31ds" path="res://src/map/dungeon/code/FinalFloor.cs" id="1_b2jrf"]
|
[ext_resource type="Script" uid="uid://r8mpxyum31ds" path="res://src/map/dungeon/code/FinalFloor.cs" id="1_b2jrf"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dpd2y8evtea1t" path="res://src/map/dungeon/models/Special Floors & Rooms/36. Final Floor/36_A2_FINAL_FLOOR_VER.0.1.glb" id="2_b2jrf"]
|
[ext_resource type="PackedScene" uid="uid://dpd2y8evtea1t" path="res://src/map/dungeon/models/Special Floors & Rooms/36. Final Floor/36_A2_FINAL_FLOOR_VER.0.1.glb" id="2_b2jrf"]
|
||||||
@@ -10,10 +10,10 @@ size = Vector3(0.0974121, 15.1811, 23.3886)
|
|||||||
size = Vector3(0.0974121, 15.1811, 27.7427)
|
size = Vector3(0.0974121, 15.1811, 27.7427)
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_s4mfk"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_s4mfk"]
|
||||||
size = Vector3(187.628, 118.514, 12.5598)
|
size = Vector3(234.085, 118.514, 12.5598)
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_170vw"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_170vw"]
|
||||||
size = Vector3(187.874, 144.552, 13.4706)
|
size = Vector3(235.028, 144.552, 13.4706)
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ajpkj"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_ajpkj"]
|
||||||
size = Vector3(281.18, 0.081543, 80.3693)
|
size = Vector3(281.18, 0.081543, 80.3693)
|
||||||
@@ -27,6 +27,23 @@ size = Vector3(19.394, 30.059, 2.88283)
|
|||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_b2jrf"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_b2jrf"]
|
||||||
size = Vector3(12.9663, 20.8418, 50.175)
|
size = Vector3(12.9663, 20.8418, 50.175)
|
||||||
|
|
||||||
|
[sub_resource type="Environment" id="Environment_b2jrf"]
|
||||||
|
background_mode = 1
|
||||||
|
ambient_light_energy = 0.0
|
||||||
|
sdfgi_enabled = true
|
||||||
|
glow_enabled = true
|
||||||
|
glow_intensity = 1.57
|
||||||
|
glow_strength = 1.36
|
||||||
|
glow_bloom = 1.0
|
||||||
|
glow_blend_mode = 0
|
||||||
|
volumetric_fog_enabled = true
|
||||||
|
volumetric_fog_albedo = Color(0.830335, 0.830335, 0.830335, 1)
|
||||||
|
|
||||||
|
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_hojso"]
|
||||||
|
exposure_multiplier = 1.354
|
||||||
|
dof_blur_far_enabled = true
|
||||||
|
dof_blur_far_distance = 371.47
|
||||||
|
|
||||||
[node name="Final Floor" type="Node3D"]
|
[node name="Final Floor" type="Node3D"]
|
||||||
script = ExtResource("1_b2jrf")
|
script = ExtResource("1_b2jrf")
|
||||||
|
|
||||||
@@ -53,12 +70,12 @@ transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -3.576
|
|||||||
shape = SubResource("BoxShape3D_djk74")
|
shape = SubResource("BoxShape3D_djk74")
|
||||||
|
|
||||||
[node name="CollisionShape3D4" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
[node name="CollisionShape3D4" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -110.065, -2.28188, -12.327)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -133.294, -2.28188, -12.327)
|
||||||
shape = SubResource("BoxShape3D_s4mfk")
|
shape = SubResource("BoxShape3D_s4mfk")
|
||||||
debug_color = Color(0, 0.6, 0.701961, 1)
|
debug_color = Color(0, 0.6, 0.701961, 1)
|
||||||
|
|
||||||
[node name="CollisionShape3D5" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
[node name="CollisionShape3D5" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -110.065, -15.2228, 10.4977)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -133.642, -15.2228, 10.4977)
|
||||||
shape = SubResource("BoxShape3D_170vw")
|
shape = SubResource("BoxShape3D_170vw")
|
||||||
|
|
||||||
[node name="CollisionShape3D6" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
[node name="CollisionShape3D6" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
||||||
@@ -66,7 +83,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -110.065, -3.09368, -8.33632)
|
|||||||
shape = SubResource("BoxShape3D_ajpkj")
|
shape = SubResource("BoxShape3D_ajpkj")
|
||||||
|
|
||||||
[node name="CollisionShape3D7" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
[node name="CollisionShape3D7" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -226.104, -1.21697, -3.54719)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -255.62, -1.21697, -3.54719)
|
||||||
shape = SubResource("BoxShape3D_pdgpv")
|
shape = SubResource("BoxShape3D_pdgpv")
|
||||||
|
|
||||||
[node name="CollisionShape3D8" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
[node name="CollisionShape3D8" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
|
||||||
@@ -91,5 +108,17 @@ collision_layer = 0
|
|||||||
collision_mask = 64
|
collision_mask = 64
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Room/Exit"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Room/Exit"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -222.237, -3.35156, 3.78481)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -257.108, -3.35156, 3.78481)
|
||||||
shape = SubResource("BoxShape3D_b2jrf")
|
shape = SubResource("BoxShape3D_b2jrf")
|
||||||
|
|
||||||
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
|
environment = SubResource("Environment_b2jrf")
|
||||||
|
camera_attributes = SubResource("CameraAttributesPractical_hojso")
|
||||||
|
|
||||||
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="WorldEnvironment"]
|
||||||
|
transform = Transform3D(0.85896, -0.300971, 0.414251, 0, -0.809017, -0.587785, 0.512043, 0.504884, -0.694913, 0, 0, 0)
|
||||||
|
light_color = Color(0.204372, 0.420196, 1, 1)
|
||||||
|
light_energy = 4.435
|
||||||
|
shadow_enabled = true
|
||||||
|
|
||||||
|
[editable path="Model/36_A2_FINAL_FLOOR_VER_0_2"]
|
||||||
|
|||||||
|
After Width: | Height: | Size: 5.3 MiB |
@@ -0,0 +1,38 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c1eip3nh46fy0"
|
||||||
|
path.bptc="res://.godot/imported/36_A2_FINAL_FLOOR_VER.0_normal_opengl.png-19d807bda1d6515f9683734aa2231482.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
generator_parameters={
|
||||||
|
"md5": "00b94bfeae1634510fa43553cce9c0fb"
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/map/dungeon/models/Special Floors & Rooms/36. Final Floor/36_A2_FINAL_FLOOR_VER.0_normal_opengl.png"
|
||||||
|
dest_files=["res://.godot/imported/36_A2_FINAL_FLOOR_VER.0_normal_opengl.png-19d807bda1d6515f9683734aa2231482.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=1
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=1
|
||||||
|
roughness/src_normal="res://src/map/dungeon/models/Special Floors & Rooms/36. Final Floor/36_A2_FINAL_FLOOR_VER.0_normal_opengl.png"
|
||||||
|
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=0
|
||||||
|
After Width: | Height: | Size: 728 KiB |
@@ -0,0 +1,38 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ch4cjvuay2edg"
|
||||||
|
path.bptc="res://.godot/imported/36_A2_FINAL_FLOOR_VER.0_roughness.png-03b3a9d966651fcef8eae7c32f126fae.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
generator_parameters={
|
||||||
|
"md5": "634f7d6ce3b2d5f17052a0abff3585b5"
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/map/dungeon/models/Special Floors & Rooms/36. Final Floor/36_A2_FINAL_FLOOR_VER.0_roughness.png"
|
||||||
|
dest_files=["res://.godot/imported/36_A2_FINAL_FLOOR_VER.0_roughness.png-03b3a9d966651fcef8eae7c32f126fae.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
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=0
|
||||||
@@ -1398,7 +1398,8 @@ omni_range = 19.166
|
|||||||
omni_attenuation = 1.106
|
omni_attenuation = 1.106
|
||||||
|
|
||||||
[node name="E symbol!" type="MeshInstance3D" parent="."]
|
[node name="E symbol!" type="MeshInstance3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.216361, 10.8155)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.550282, 10.8155)
|
||||||
|
visible = false
|
||||||
layers = 2
|
layers = 2
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("PlaneMesh_l1s1j")
|
mesh = SubResource("PlaneMesh_l1s1j")
|
||||||
|
|||||||
@@ -675,6 +675,7 @@ autoplay = "Flame Flicker"
|
|||||||
|
|
||||||
[node name="E symbol!" type="MeshInstance3D" parent="."]
|
[node name="E symbol!" type="MeshInstance3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.469518, 10.8155)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.469518, 10.8155)
|
||||||
|
visible = false
|
||||||
layers = 2
|
layers = 2
|
||||||
mesh = SubResource("PlaneMesh_vsgtq")
|
mesh = SubResource("PlaneMesh_vsgtq")
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,28 @@ public partial class LoadingScreen : Control
|
|||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
[Node]
|
[Node] public ProgressBar ProgressBar { get; set; } = default!;
|
||||||
public ProgressBar ProgressBar { get; set; } = default!;
|
|
||||||
|
[Node] public AnimationPlayer AnimationPlayer { get; set; } = default!;
|
||||||
|
|
||||||
|
public void OnResolved()
|
||||||
|
{
|
||||||
|
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AnimationPlayer_AnimationFinished(StringName animName)
|
||||||
|
{
|
||||||
|
if (animName == "fade_out")
|
||||||
|
Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowLoadingScreen()
|
||||||
|
{
|
||||||
|
Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideLoadingScreen()
|
||||||
|
{
|
||||||
|
AnimationPlayer.Play("fade_out");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=5 format=3 uid="uid://cpjlj7kxdhv16"]
|
[gd_scene load_steps=9 format=3 uid="uid://cpjlj7kxdhv16"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b07ueredevhr3" path="res://src/menu/LoadingScreen.cs" id="1_5uxhf"]
|
[ext_resource type="Script" uid="uid://b07ueredevhr3" path="res://src/menu/LoadingScreen.cs" id="1_5uxhf"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d2krh4u2v06k5" path="res://src/ui/rendered_assets/SCREEN_RENDERS_Loading_720_16_9.png" id="2_xfkmi"]
|
[ext_resource type="Texture2D" uid="uid://d2krh4u2v06k5" path="res://src/ui/rendered_assets/SCREEN_RENDERS_Loading_720_16_9.png" id="2_xfkmi"]
|
||||||
@@ -8,8 +8,61 @@
|
|||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xfkmi"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xfkmi"]
|
||||||
bg_color = Color(0.804743, 0.804743, 0.804743, 1)
|
bg_color = Color(0.804743, 0.804743, 0.804743, 1)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_xfkmi"]
|
||||||
|
resource_name = "fade_in"
|
||||||
|
length = 0.500003
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_6i7rn"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_jrbvh"]
|
||||||
|
resource_name = "fade_out"
|
||||||
|
length = 1.0
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jrbvh"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_6i7rn"),
|
||||||
|
&"fade_in": SubResource("Animation_xfkmi"),
|
||||||
|
&"fade_out": SubResource("Animation_jrbvh")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="LoadingScreen" type="Control"]
|
[node name="LoadingScreen" type="Control"]
|
||||||
visible = false
|
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -48,3 +101,18 @@ offset_bottom = 981.0
|
|||||||
theme_override_styles/background = SubResource("StyleBoxTexture_xfkmi")
|
theme_override_styles/background = SubResource("StyleBoxTexture_xfkmi")
|
||||||
theme_override_styles/fill = SubResource("StyleBoxFlat_xfkmi")
|
theme_override_styles/fill = SubResource("StyleBoxFlat_xfkmi")
|
||||||
show_percentage = false
|
show_percentage = false
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_jrbvh")
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
[gd_scene load_steps=3 format=3 uid="uid://rfvnddfqufho"]
|
[gd_scene load_steps=6 format=3 uid="uid://rfvnddfqufho"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://14b7o2c6cgry" path="res://src/menu/MainMenu.cs" id="1_y6722"]
|
[ext_resource type="Script" uid="uid://14b7o2c6cgry" path="res://src/menu/MainMenu.cs" id="1_y6722"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="2_2ijnm"]
|
||||||
[ext_resource type="Shortcut" uid="uid://dumkrjur22k2a" path="res://src/ui/ButtonShortcut.tres" id="2_7fwjx"]
|
[ext_resource type="Shortcut" uid="uid://dumkrjur22k2a" path="res://src/ui/ButtonShortcut.tres" id="2_7fwjx"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="2_dftre"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="3_dftre"]
|
||||||
|
|
||||||
[node name="MainMenu" type="Control"]
|
[node name="MainMenu" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -19,45 +22,78 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
color = Color(0.137255, 0.121569, 0.12549, 1)
|
color = Color(0.0962047, 0.0962048, 0.0962047, 1)
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 7
|
||||||
anchor_right = 1.0
|
anchor_left = 0.5
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.5
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -59.0
|
||||||
|
offset_top = -171.0
|
||||||
|
offset_right = 59.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 0
|
||||||
theme_override_constants/margin_left = 100
|
theme_override_constants/margin_bottom = 200
|
||||||
theme_override_constants/margin_top = 100
|
|
||||||
theme_override_constants/margin_right = 100
|
|
||||||
theme_override_constants/margin_bottom = 100
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 0
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
|
|
||||||
[node name="StartGameButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
[node name="StartGameButton" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
focus_neighbor_bottom = NodePath("../EnemyViewerButton")
|
focus_neighbor_bottom = NodePath("../EnemyViewerButton")
|
||||||
focus_next = NodePath("../EnemyViewerButton")
|
focus_next = NodePath("../EnemyViewerButton")
|
||||||
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
||||||
|
theme_override_fonts/font = ExtResource("2_dftre")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("2_2ijnm")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/disabled = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal = ExtResource("3_dftre")
|
||||||
shortcut = ExtResource("2_7fwjx")
|
shortcut = ExtResource("2_7fwjx")
|
||||||
text = "Start Game"
|
text = "Start Game"
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
[node name="EnemyViewerButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
[node name="EnemyViewerButton" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
focus_neighbor_bottom = NodePath("../GalleryButton")
|
focus_neighbor_bottom = NodePath("../GalleryButton")
|
||||||
focus_next = NodePath("../GalleryButton")
|
focus_next = NodePath("../GalleryButton")
|
||||||
focus_previous = NodePath("../StartGameButton")
|
focus_previous = NodePath("../StartGameButton")
|
||||||
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
||||||
|
theme_override_fonts/font = ExtResource("2_dftre")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("2_2ijnm")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/disabled = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal = ExtResource("3_dftre")
|
||||||
shortcut = ExtResource("2_7fwjx")
|
shortcut = ExtResource("2_7fwjx")
|
||||||
text = "Enemy Viewer"
|
text = "Enemy Viewer"
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
[node name="GalleryButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
[node name="GalleryButton" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
focus_neighbor_top = NodePath("../EnemyViewerButton")
|
focus_neighbor_top = NodePath("../EnemyViewerButton")
|
||||||
@@ -65,10 +101,24 @@ focus_neighbor_bottom = NodePath("../OptionsButton")
|
|||||||
focus_next = NodePath("../OptionsButton")
|
focus_next = NodePath("../OptionsButton")
|
||||||
focus_previous = NodePath("../EnemyViewerButton")
|
focus_previous = NodePath("../EnemyViewerButton")
|
||||||
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
||||||
|
theme_override_fonts/font = ExtResource("2_dftre")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("2_2ijnm")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/disabled = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal = ExtResource("3_dftre")
|
||||||
shortcut = ExtResource("2_7fwjx")
|
shortcut = ExtResource("2_7fwjx")
|
||||||
text = "Gallery"
|
text = "Gallery"
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
[node name="OptionsButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
[node name="OptionsButton" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
focus_neighbor_top = NodePath("../GalleryButton")
|
focus_neighbor_top = NodePath("../GalleryButton")
|
||||||
@@ -76,10 +126,24 @@ focus_neighbor_bottom = NodePath("../QuitButton")
|
|||||||
focus_next = NodePath("../QuitButton")
|
focus_next = NodePath("../QuitButton")
|
||||||
focus_previous = NodePath("../GalleryButton")
|
focus_previous = NodePath("../GalleryButton")
|
||||||
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
||||||
|
theme_override_fonts/font = ExtResource("2_dftre")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("2_2ijnm")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/disabled = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal = ExtResource("3_dftre")
|
||||||
shortcut = ExtResource("2_7fwjx")
|
shortcut = ExtResource("2_7fwjx")
|
||||||
text = "Options"
|
text = "Options"
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
[node name="QuitButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
[node name="QuitButton" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
focus_neighbor_top = NodePath("../OptionsButton")
|
focus_neighbor_top = NodePath("../OptionsButton")
|
||||||
@@ -87,6 +151,20 @@ focus_neighbor_bottom = NodePath(".")
|
|||||||
focus_next = NodePath(".")
|
focus_next = NodePath(".")
|
||||||
focus_previous = NodePath("../OptionsButton")
|
focus_previous = NodePath("../OptionsButton")
|
||||||
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
|
||||||
|
theme_override_fonts/font = ExtResource("2_dftre")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("2_2ijnm")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/disabled = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/hover = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/pressed = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("3_dftre")
|
||||||
|
theme_override_styles/normal = ExtResource("3_dftre")
|
||||||
shortcut = ExtResource("2_7fwjx")
|
shortcut = ExtResource("2_7fwjx")
|
||||||
text = "Quit
|
text = "Quit
|
||||||
"
|
"
|
||||||
|
alignment = 0
|
||||||
|
|||||||
@@ -61,4 +61,3 @@ unique_name_in_owner = true
|
|||||||
libraries = {
|
libraries = {
|
||||||
&"": SubResource("AnimationLibrary_jiqgw")
|
&"": SubResource("AnimationLibrary_jiqgw")
|
||||||
}
|
}
|
||||||
autoplay = "intro"
|
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ grow_vertical = 2
|
|||||||
script = ExtResource("1_yn75n")
|
script = ExtResource("1_yn75n")
|
||||||
|
|
||||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||||
|
custom_minimum_size = Vector2(400, 400)
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -63,13 +64,13 @@ grow_horizontal = 2
|
|||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="CenterContainer"]
|
[node name="SubViewportContainer" type="SubViewportContainer" parent="CenterContainer"]
|
||||||
custom_minimum_size = Vector2(350, 300)
|
custom_minimum_size = Vector2(450, 400)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="SubViewport" type="SubViewport" parent="CenterContainer/SubViewportContainer"]
|
[node name="SubViewport" type="SubViewport" parent="CenterContainer/SubViewportContainer"]
|
||||||
transparent_bg = true
|
transparent_bg = true
|
||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
size = Vector2i(350, 300)
|
size = Vector2i(400, 350)
|
||||||
render_target_update_mode = 4
|
render_target_update_mode = 4
|
||||||
|
|
||||||
[node name="MinimapCamera" type="Camera3D" parent="CenterContainer/SubViewportContainer/SubViewport"]
|
[node name="MinimapCamera" type="Camera3D" parent="CenterContainer/SubViewportContainer/SubViewport"]
|
||||||
@@ -84,24 +85,26 @@ size = 100.0
|
|||||||
near = 0.001
|
near = 0.001
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer/SubViewportContainer/SubViewport"]
|
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer/SubViewportContainer/SubViewport"]
|
||||||
anchors_preset = 15
|
anchors_preset = 3
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
offset_left = -190.0
|
||||||
grow_vertical = 2
|
offset_top = -48.0
|
||||||
theme_override_constants/margin_left = 200
|
grow_horizontal = 0
|
||||||
theme_override_constants/margin_top = 200
|
grow_vertical = 0
|
||||||
|
theme_override_constants/margin_left = 20
|
||||||
|
theme_override_constants/margin_top = 20
|
||||||
|
theme_override_constants/margin_right = 20
|
||||||
|
theme_override_constants/margin_bottom = 20
|
||||||
|
|
||||||
[node name="Control" type="Control" parent="CenterContainer/SubViewportContainer/SubViewport/MarginContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/SubViewportContainer/SubViewport/MarginContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="LayerText" type="Label" parent="CenterContainer/SubViewportContainer/SubViewport/MarginContainer/Control"]
|
[node name="LayerText" type="Label" parent="CenterContainer/SubViewportContainer/SubViewport/MarginContainer/HBoxContainer"]
|
||||||
custom_minimum_size = Vector2(80, 15)
|
custom_minimum_size = Vector2(80, 15)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
offset_left = -14.0
|
|
||||||
offset_top = 26.0
|
|
||||||
offset_right = 136.0
|
|
||||||
offset_bottom = 68.0
|
|
||||||
size_flags_vertical = 6
|
size_flags_vertical = 6
|
||||||
theme = SubResource("Theme_75ec6")
|
theme = SubResource("Theme_75ec6")
|
||||||
theme_override_colors/font_color = Color(0.792157, 0.698039, 0.643137, 1)
|
theme_override_colors/font_color = Color(0.792157, 0.698039, 0.643137, 1)
|
||||||
@@ -114,14 +117,10 @@ text = "LAYER"
|
|||||||
label_settings = SubResource("LabelSettings_yn75n")
|
label_settings = SubResource("LabelSettings_yn75n")
|
||||||
vertical_alignment = 2
|
vertical_alignment = 2
|
||||||
|
|
||||||
[node name="LayerNumberText" type="Label" parent="CenterContainer/SubViewportContainer/SubViewport/MarginContainer/Control"]
|
[node name="LayerNumberText" type="Label" parent="CenterContainer/SubViewportContainer/SubViewport/MarginContainer/HBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(80, 15)
|
custom_minimum_size = Vector2(80, 15)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
offset_left = 79.0
|
|
||||||
offset_top = 22.0
|
|
||||||
offset_right = 159.0
|
|
||||||
offset_bottom = 74.0
|
|
||||||
theme = SubResource("Theme_qgswn")
|
theme = SubResource("Theme_qgswn")
|
||||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||||
theme_override_colors/font_shadow_color = Color(1, 1, 1, 0.027451)
|
theme_override_colors/font_shadow_color = Color(1, 1, 1, 0.027451)
|
||||||
|
|||||||
@@ -10340,8 +10340,6 @@ animations = [{
|
|||||||
collision_layer = 802
|
collision_layer = 802
|
||||||
collision_mask = 775
|
collision_mask = 775
|
||||||
script = ExtResource("1_xcol5")
|
script = ExtResource("1_xcol5")
|
||||||
HealthTimerIsActive = true
|
|
||||||
AutoRevive = true
|
|
||||||
|
|
||||||
[node name="MainCollision" type="CollisionShape3D" parent="."]
|
[node name="MainCollision" type="CollisionShape3D" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
[gd_scene load_steps=12 format=3 uid="uid://b1muxus5qdbeu"]
|
[gd_scene load_steps=12 format=3 uid="uid://b8tclvmc7j7dl"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dlq2mkhl4pe7a" path="res://src/ui/in_game_ui/InGameUI.cs" id="1_sc13i"]
|
[ext_resource type="Script" uid="uid://dlq2mkhl4pe7a" path="res://src/ui/in_game_ui/InGameUI.cs" id="1_sc13i"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="2_6sfje"]
|
[ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="2_6sfje"]
|
||||||
[ext_resource type="PackedScene" uid="uid://t22s2y1t8ktc" path="res://src/debug/DebugInfo.tscn" id="2_f0tui"]
|
[ext_resource type="PackedScene" uid="uid://t22s2y1t8ktc" path="res://src/debug_info/DebugInfo.tscn" id="2_f0tui"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dxl8il8f13c2x" path="res://src/ui/player_ui/PlayerInfoUI.tscn" id="4_46s5l"]
|
[ext_resource type="PackedScene" uid="uid://dxl8il8f13c2x" path="res://src/ui/player_ui/PlayerInfoUI.tscn" id="4_46s5l"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bea2waybmgd6u" path="res://src/ui/teleport_prompt/UseTeleportPrompt.tscn" id="5_h1hgq"]
|
[ext_resource type="PackedScene" uid="uid://bea2waybmgd6u" path="res://src/ui/teleport_prompt/UseTeleportPrompt.tscn" id="5_h1hgq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://x0f1ol50nnp3" path="res://src/ui/in_game_ui/InventoryMessageUI.tscn" id="6_y26qy"]
|
[ext_resource type="PackedScene" uid="uid://x0f1ol50nnp3" path="res://src/ui/in_game_ui/InventoryMessageUI.tscn" id="6_y26qy"]
|
||||||
[ext_resource type="PackedScene" uid="uid://8f3dk16nj0dn" path="res://src/menu/DebugMenu.tscn" id="7_llomk"]
|
[ext_resource type="PackedScene" uid="uid://8f3dk16nj0dn" path="res://src/menu/DebugMenu.tscn" id="7_llomk"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bj4p4qxb1mj3q" path="res://src/ui/player_ui/Assets/panel rough draft.png" id="7_ur8ag"]
|
[ext_resource type="Texture2D" uid="uid://dnt8myee0ju3v" path="res://src/ui/UI Front with Transparency.png" id="9_f46co"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c3e6hbctay1us" path="res://src/ui/inventory_menu/InventoryMenu.tscn" id="9_ur8ag"]
|
[ext_resource type="PackedScene" uid="uid://cbxw70qa7gifp" path="res://src/ui/inventory_menu/InventoryMenu.tscn" id="9_ur8ag"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dwa7o6hkkwjg1" path="res://src/ui/inventory_menu/ItemRescueMenu.tscn" id="10_higkc"]
|
[ext_resource type="PackedScene" uid="uid://dwa7o6hkkwjg1" path="res://src/ui/inventory_menu/ItemRescueMenu.tscn" id="10_higkc"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxLine" id="StyleBoxLine_ur8ag"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_higkc"]
|
||||||
color = Color(0.792157, 0.698039, 0.643137, 1)
|
|
||||||
|
|
||||||
[node name="InGameUI" type="Control"]
|
[node name="InGameUI" type="Control"]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
@@ -76,17 +75,36 @@ visible = false
|
|||||||
custom_minimum_size = Vector2(1440, 1080)
|
custom_minimum_size = Vector2(1440, 1080)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Panel" type="ColorRect" parent="HBoxContainer"]
|
[node name="InventoryMenu" parent="." instance=ExtResource("9_ur8ag")]
|
||||||
custom_minimum_size = Vector2(480, 0)
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 1
|
||||||
|
|
||||||
[node name="MinimapZone" type="Panel" parent="HBoxContainer/Panel"]
|
[node name="ItemRescueMenu" parent="." instance=ExtResource("10_higkc")]
|
||||||
layout_mode = 2
|
unique_name_in_owner = true
|
||||||
offset_top = 14.0
|
visible = false
|
||||||
offset_right = 480.0
|
layout_mode = 1
|
||||||
offset_bottom = 14.0
|
|
||||||
|
|
||||||
[node name="MiniMap" parent="HBoxContainer/Panel/MinimapZone" instance=ExtResource("2_6sfje")]
|
[node name="Sidebar Container" type="PanelContainer" parent="."]
|
||||||
|
custom_minimum_size = Vector2(459, 0)
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 11
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxEmpty_higkc")
|
||||||
|
|
||||||
|
[node name="MinimapContainer" type="MarginContainer" parent="Sidebar Container"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 15
|
||||||
|
theme_override_constants/margin_top = 0
|
||||||
|
|
||||||
|
[node name="MinimapZone" type="Panel" parent="Sidebar Container/MinimapContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="MiniMap" parent="Sidebar Container/MinimapContainer/MinimapZone" instance=ExtResource("2_6sfje")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(50, 50)
|
custom_minimum_size = Vector2(50, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -100,55 +118,26 @@ offset_top = 354.0
|
|||||||
offset_right = 423.0
|
offset_right = 423.0
|
||||||
offset_bottom = 620.0
|
offset_bottom = 620.0
|
||||||
|
|
||||||
[node name="HSeparator2" type="HSeparator" parent="HBoxContainer/Panel/MinimapZone"]
|
[node name="Sidebar Texture" type="TextureRect" parent="Sidebar Container"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
offset_left = 78.0
|
texture = ExtResource("9_f46co")
|
||||||
offset_top = 716.0
|
|
||||||
offset_right = 370.0
|
|
||||||
offset_bottom = 722.0
|
|
||||||
theme_override_styles/separator = SubResource("StyleBoxLine_ur8ag")
|
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/Panel"]
|
[node name="PlayerInfoContainer" type="MarginContainer" parent="Sidebar Container"]
|
||||||
layout_mode = 1
|
layout_mode = 2
|
||||||
anchors_preset = 15
|
theme_override_constants/margin_left = 50
|
||||||
anchor_right = 1.0
|
theme_override_constants/margin_top = 200
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_bottom = 1072.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
texture = ExtResource("7_ur8ag")
|
|
||||||
stretch_mode = 4
|
|
||||||
|
|
||||||
[node name="PlayerInfoUI" parent="HBoxContainer/Panel" instance=ExtResource("4_46s5l")]
|
[node name="PlayerInfoUI" parent="Sidebar Container/PlayerInfoContainer" instance=ExtResource("4_46s5l")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
anchors_preset = 0
|
|
||||||
offset_left = 29.0
|
|
||||||
offset_top = 197.0
|
|
||||||
offset_right = 29.0
|
|
||||||
offset_bottom = -746.0
|
|
||||||
|
|
||||||
[node name="HSeparator" type="HSeparator" parent="HBoxContainer/Panel"]
|
|
||||||
layout_mode = 2
|
|
||||||
offset_left = 99.0
|
|
||||||
offset_top = 326.0
|
|
||||||
offset_right = 391.0
|
|
||||||
offset_bottom = 332.0
|
|
||||||
theme_override_styles/separator = SubResource("StyleBoxLine_ur8ag")
|
|
||||||
|
|
||||||
[node name="Sigil Marker" type="ReferenceRect" parent="HBoxContainer/Panel"]
|
|
||||||
layout_mode = 2
|
|
||||||
offset_left = 75.0
|
|
||||||
offset_top = 813.0
|
|
||||||
offset_right = 267.0
|
|
||||||
offset_bottom = 1004.0
|
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
[node name="InventoryMenu" parent="." instance=ExtResource("9_ur8ag")]
|
[node name="SigilContainer" type="MarginContainer" parent="Sidebar Container"]
|
||||||
unique_name_in_owner = true
|
layout_mode = 2
|
||||||
layout_mode = 1
|
theme_override_constants/margin_left = 50
|
||||||
|
theme_override_constants/margin_top = 800
|
||||||
|
theme_override_constants/margin_right = 175
|
||||||
|
theme_override_constants/margin_bottom = 50
|
||||||
|
|
||||||
[node name="ItemRescueMenu" parent="." instance=ExtResource("10_higkc")]
|
[node name="ReferenceRect" type="ReferenceRect" parent="Sidebar Container/SigilContainer"]
|
||||||
unique_name_in_owner = true
|
layout_mode = 2
|
||||||
visible = false
|
|
||||||
layout_mode = 1
|
|
||||||
|
|||||||
165
Zennysoft.Game.Ma/src/ui/inventory_menu/ActionPanel.cs
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
using Chickensoft.AutoInject;
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using Zennysoft.Game.Ma;
|
||||||
|
using Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
[Meta(typeof(IAutoNode))]
|
||||||
|
public partial class ActionPanel : Panel
|
||||||
|
{
|
||||||
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
|
private IBaseInventoryItem _currentlySelected;
|
||||||
|
|
||||||
|
[Dependency] private IPlayer _player => this.DependOn<IPlayer>();
|
||||||
|
|
||||||
|
[Dependency] private IGame _game => this.DependOn<IGame>();
|
||||||
|
|
||||||
|
[Node] public Button InteractButton { get; set; }
|
||||||
|
|
||||||
|
[Node] public Button ThrowButton { get; set; }
|
||||||
|
|
||||||
|
[Node] public Button DropButton { get; set; }
|
||||||
|
|
||||||
|
public event Action ActionPanelClosing;
|
||||||
|
|
||||||
|
public event Action ReturnToGameAction;
|
||||||
|
|
||||||
|
public event Action AugmentMenuRequested;
|
||||||
|
|
||||||
|
public void OnResolved()
|
||||||
|
{
|
||||||
|
InteractButton.Pressed += InteractButton_Pressed;
|
||||||
|
ThrowButton.Pressed += ThrowButton_Pressed;
|
||||||
|
DropButton.Pressed += DropButton_Pressed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowPanel(IBaseInventoryItem selectedItem)
|
||||||
|
{
|
||||||
|
_currentlySelected = selectedItem;
|
||||||
|
SetOptions(selectedItem);
|
||||||
|
Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FocusActionPanel()
|
||||||
|
{
|
||||||
|
InteractButton.GrabFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideActionPanel()
|
||||||
|
{
|
||||||
|
InteractButton.Disabled = false;
|
||||||
|
ThrowButton.Disabled = false;
|
||||||
|
DropButton.Disabled = false;
|
||||||
|
ThrowButton.FocusMode = FocusModeEnum.All;
|
||||||
|
DropButton.FocusMode = FocusModeEnum.All;
|
||||||
|
ActionPanelClosing?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Input(InputEvent @event)
|
||||||
|
{
|
||||||
|
if (Visible && Input.IsActionJustPressed(GameInputs.Interact))
|
||||||
|
{
|
||||||
|
GetViewport().SetInputAsHandled();
|
||||||
|
HideActionPanel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InteractButton_Pressed()
|
||||||
|
{
|
||||||
|
PerformAction((dynamic)_currentlySelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ThrowButton_Pressed()
|
||||||
|
{
|
||||||
|
_game.ThrowItem(_currentlySelected);
|
||||||
|
_currentlySelected = null;
|
||||||
|
ActionPanelClosing?.Invoke();
|
||||||
|
ReturnToGameAction?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DropButton_Pressed()
|
||||||
|
{
|
||||||
|
_game.DropItem(_currentlySelected);
|
||||||
|
_currentlySelected = null;
|
||||||
|
ActionPanelClosing?.Invoke();
|
||||||
|
ReturnToGameAction?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetOptions(IBaseInventoryItem item)
|
||||||
|
{
|
||||||
|
SetOptionsInternal((dynamic)item);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ResetActionPanel()
|
||||||
|
{
|
||||||
|
InteractButton.Disabled = false;
|
||||||
|
ThrowButton.Disabled = false;
|
||||||
|
DropButton.Disabled = false;
|
||||||
|
ThrowButton.FocusMode = FocusModeEnum.All;
|
||||||
|
DropButton.FocusMode = FocusModeEnum.All;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetOptionsInternal(IEquipableItem equipable)
|
||||||
|
{
|
||||||
|
var isItemEquipped = _player.EquipmentComponent.IsItemEquipped(equipable);
|
||||||
|
InteractButton.Text = isItemEquipped ? "Unequip" : "Equip";
|
||||||
|
InteractButton.Disabled = equipable.Glued;
|
||||||
|
ThrowButton.Disabled = equipable.Glued || isItemEquipped;
|
||||||
|
DropButton.Disabled = equipable.Glued || isItemEquipped;
|
||||||
|
ThrowButton.FocusMode = ThrowButton.Disabled ? FocusModeEnum.None : FocusModeEnum.All;
|
||||||
|
DropButton.FocusMode = DropButton.Disabled ? FocusModeEnum.None : FocusModeEnum.All;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetOptionsInternal(IAugmentItem equipable)
|
||||||
|
{
|
||||||
|
InteractButton.Text = "Augment";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetOptionsInternal(IBaseInventoryItem baseItem)
|
||||||
|
{
|
||||||
|
InteractButton.Text = "Use";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PerformAction(IEquipableItem equipable)
|
||||||
|
{
|
||||||
|
if (_player.EquipmentComponent.IsItemEquipped(equipable))
|
||||||
|
{
|
||||||
|
_player.EquipmentComponent.Unequip(equipable);
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.Unequip);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_player.EquipmentComponent.Equip(equipable);
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.Equip);
|
||||||
|
}
|
||||||
|
|
||||||
|
_currentlySelected = null;
|
||||||
|
ActionPanelClosing?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PerformAction(Plastique plastique)
|
||||||
|
{
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.SelectUI);
|
||||||
|
_game.SetItem(plastique);
|
||||||
|
_currentlySelected = null;
|
||||||
|
ActionPanelClosing?.Invoke();
|
||||||
|
ReturnToGameAction?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PerformAction(Jewel jewel)
|
||||||
|
{
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.SelectUI);
|
||||||
|
ActionPanelClosing?.Invoke();
|
||||||
|
AugmentMenuRequested?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PerformAction(IBaseInventoryItem item)
|
||||||
|
{
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.SelectUI);
|
||||||
|
_game.UseItem(item);
|
||||||
|
_currentlySelected = null;
|
||||||
|
ActionPanelClosing?.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dmbykkr6oev1q
|
||||||
113
Zennysoft.Game.Ma/src/ui/inventory_menu/ActionPanel.tscn
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
[gd_scene load_steps=5 format=3 uid="uid://b648lhohtue70"]
|
||||||
|
|
||||||
|
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="1_kxuil"]
|
||||||
|
[ext_resource type="Script" uid="uid://dmbykkr6oev1q" path="res://src/ui/inventory_menu/ActionPanel.cs" id="1_r13ox"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="2_r13ox"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g7ag1"]
|
||||||
|
bg_color = Color(0, 0, 0, 0.745098)
|
||||||
|
|
||||||
|
[node name="ActionPanel" type="Panel"]
|
||||||
|
custom_minimum_size = Vector2(200, 200)
|
||||||
|
focus_mode = 2
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_g7ag1")
|
||||||
|
script = ExtResource("1_r13ox")
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="ReferenceRect" type="ReferenceRect" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
border_color = Color(1, 1, 1, 1)
|
||||||
|
border_width = 2.0
|
||||||
|
editor_only = false
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 20
|
||||||
|
theme_override_constants/margin_top = 10
|
||||||
|
theme_override_constants/margin_right = 10
|
||||||
|
theme_override_constants/margin_bottom = 10
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="InteractButton" type="Button" parent="MarginContainer/MarginContainer/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
focus_neighbor_left = NodePath(".")
|
||||||
|
focus_neighbor_top = NodePath(".")
|
||||||
|
focus_neighbor_right = NodePath(".")
|
||||||
|
focus_neighbor_bottom = NodePath("../ThrowButton")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("1_kxuil")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/disabled = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/pressed = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/normal = ExtResource("2_r13ox")
|
||||||
|
text = "Interact"
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
|
[node name="ThrowButton" type="Button" parent="MarginContainer/MarginContainer/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
focus_neighbor_left = NodePath(".")
|
||||||
|
focus_neighbor_top = NodePath("../InteractButton")
|
||||||
|
focus_neighbor_right = NodePath(".")
|
||||||
|
focus_neighbor_bottom = NodePath("../DropButton")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("1_kxuil")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/disabled = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/pressed = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/normal = ExtResource("2_r13ox")
|
||||||
|
text = "Throw"
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
|
[node name="DropButton" type="Button" parent="MarginContainer/MarginContainer/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
focus_neighbor_left = NodePath(".")
|
||||||
|
focus_neighbor_top = NodePath("../ThrowButton")
|
||||||
|
focus_neighbor_right = NodePath(".")
|
||||||
|
focus_neighbor_bottom = NodePath(".")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("1_kxuil")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/disabled = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/hover = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/pressed = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("2_r13ox")
|
||||||
|
theme_override_styles/normal = ExtResource("2_r13ox")
|
||||||
|
text = "Drop"
|
||||||
|
alignment = 0
|
||||||
106
Zennysoft.Game.Ma/src/ui/inventory_menu/AugmentableItemsMenu.cs
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
using Chickensoft.AutoInject;
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Zennysoft.Game.Ma;
|
||||||
|
using Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
[Meta(typeof(IAutoNode))]
|
||||||
|
public partial class AugmentableItemsMenu : Control
|
||||||
|
{
|
||||||
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
|
[Dependency] private IPlayer _player => this.DependOn<IPlayer>();
|
||||||
|
|
||||||
|
[Node] public VBoxContainer Inventory { get; set; }
|
||||||
|
|
||||||
|
[Node] public Button CancelAugmentButton { get; set; }
|
||||||
|
|
||||||
|
[Node] public Button ConfirmAugmentButton { get; set; }
|
||||||
|
|
||||||
|
[Node] public Control ConfirmAugmentContainer { get; set; }
|
||||||
|
|
||||||
|
private List<IItemSlot> ItemSlots;
|
||||||
|
|
||||||
|
private IItemSlot _currentlySelected;
|
||||||
|
|
||||||
|
private IAugmentItem _augmentingItem;
|
||||||
|
|
||||||
|
public event Action AugmentMenuClosing;
|
||||||
|
|
||||||
|
public void OnResolved()
|
||||||
|
{
|
||||||
|
ItemSlots = [.. Inventory.GetChildren().OfType<IItemSlot>()];
|
||||||
|
ItemSlots.ForEach(x => x.ItemPressed += ItemPressed);
|
||||||
|
ItemSlots.ForEach(x => x.ItemSelected += ItemSelected);
|
||||||
|
CancelAugmentButton.Pressed += CancelAugmentButton_Pressed;
|
||||||
|
ConfirmAugmentButton.Pressed += ConfirmAugmentButton_Pressed;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ConfirmAugmentButton_Pressed()
|
||||||
|
{
|
||||||
|
_player.ApplyNewAugment(_augmentingItem, _currentlySelected.Item.Value as IAugmentableItem);
|
||||||
|
ConfirmAugmentContainer.Hide();
|
||||||
|
AugmentMenuClosing?.Invoke();
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.SelectUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CancelAugmentButton_Pressed()
|
||||||
|
{
|
||||||
|
CloseAugmentMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseAugmentMenu()
|
||||||
|
{
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.CancelUI);
|
||||||
|
ConfirmAugmentContainer.Hide();
|
||||||
|
AugmentMenuClosing?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenAugmentMenu(IAugmentItem augmentingItem)
|
||||||
|
{
|
||||||
|
_augmentingItem = augmentingItem;
|
||||||
|
|
||||||
|
var inventory = _player.Inventory.Items;
|
||||||
|
ItemSlots.ForEach(x => x.SetEmpty());
|
||||||
|
var slotIndex = 0;
|
||||||
|
|
||||||
|
foreach (var item in inventory)
|
||||||
|
{
|
||||||
|
if (item is IAugmentableItem augmentable && augmentable.Augment == null)
|
||||||
|
ItemSlots[slotIndex++].SetItemToSlot(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
Show();
|
||||||
|
ItemSlots.First().FocusItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Input(InputEvent @event)
|
||||||
|
{
|
||||||
|
if (Visible && Input.IsActionJustPressed(GameInputs.Interact))
|
||||||
|
{
|
||||||
|
GetViewport().SetInputAsHandled();
|
||||||
|
if (ConfirmAugmentContainer.Visible)
|
||||||
|
{
|
||||||
|
if (ConfirmAugmentButton.HasFocus())
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.CancelUI);
|
||||||
|
CancelAugmentButton.GrabFocus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CloseAugmentMenu();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ItemSelected(IItemSlot selectedItem)
|
||||||
|
{
|
||||||
|
_currentlySelected = selectedItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ItemPressed(IItemSlot slot)
|
||||||
|
{
|
||||||
|
ConfirmAugmentContainer.Show();
|
||||||
|
ConfirmAugmentButton.GrabFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://brtic4hw6thox
|
||||||
@@ -0,0 +1,245 @@
|
|||||||
|
[gd_scene load_steps=11 format=3 uid="uid://tpqh7q0xh63c"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c005nd0m2eim" path="res://src/ui/inventory_menu/ItemSlot.tscn" id="1_a5r0f"]
|
||||||
|
[ext_resource type="Script" uid="uid://brtic4hw6thox" path="res://src/ui/inventory_menu/AugmentableItemsMenu.cs" id="1_ukqf2"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="2_ukqf2"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="3_qtvkp"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_p84pf"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="5_rxojm"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_l0byb"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7co7g"]
|
||||||
|
bg_color = Color(0, 0, 0, 0.745098)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_unikd"]
|
||||||
|
bg_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_unikd"]
|
||||||
|
line_spacing = 1.0
|
||||||
|
font = ExtResource("2_ukqf2")
|
||||||
|
font_size = 40
|
||||||
|
outline_size = 3
|
||||||
|
outline_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="AugmentMenu" type="Panel"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxEmpty_l0byb")
|
||||||
|
script = ExtResource("1_ukqf2")
|
||||||
|
|
||||||
|
[node name="CenterContainer2" type="CenterContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -400.0
|
||||||
|
offset_right = 400.0
|
||||||
|
offset_bottom = 1025.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
|
||||||
|
[node name="AugmentableItemsList" type="PanelContainer" parent="CenterContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(800, 1025)
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Panel" type="Panel" parent="CenterContainer2/AugmentableItemsList"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_7co7g")
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer2/AugmentableItemsList/Panel"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="ReferenceRect" type="ReferenceRect" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
border_color = Color(1, 1, 1, 1)
|
||||||
|
editor_only = false
|
||||||
|
|
||||||
|
[node name="MarginContainer2" type="MarginContainer" parent="CenterContainer2/AugmentableItemsList/Panel"]
|
||||||
|
layout_mode = 2
|
||||||
|
offset_right = 800.0
|
||||||
|
offset_bottom = 1050.0
|
||||||
|
theme_override_constants/margin_left = 25
|
||||||
|
theme_override_constants/margin_top = 15
|
||||||
|
theme_override_constants/margin_right = 25
|
||||||
|
theme_override_constants/margin_bottom = 15
|
||||||
|
|
||||||
|
[node name="Inventory" type="VBoxContainer" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 0
|
||||||
|
theme_override_constants/separation = 0
|
||||||
|
|
||||||
|
[node name="AugmentableSlot" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot2" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot3" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot4" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot5" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot6" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot7" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot8" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot9" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot10" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot11" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot12" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot13" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot14" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot15" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot16" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot17" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot18" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot19" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentableSlot20" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ConfirmAugmentContainer" type="Panel" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="CenterContainer" type="CenterContainer" parent="ConfirmAugmentContainer"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_right = -40.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="PanelContainer" type="PanelContainer" parent="ConfirmAugmentContainer/CenterContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Panel" type="Panel" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer"]
|
||||||
|
custom_minimum_size = Vector2(400, 250)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_unikd")
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="ReferenceRect" type="ReferenceRect" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
border_color = Color(1, 1, 1, 1)
|
||||||
|
editor_only = false
|
||||||
|
|
||||||
|
[node name="CenterContainer" type="CenterContainer" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer/CenterContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 25
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer/CenterContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Augment Item?"
|
||||||
|
label_settings = SubResource("LabelSettings_unikd")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer/CenterContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 20
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="CancelAugmentButton" type="Button" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer/CenterContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
focus_neighbor_left = NodePath(".")
|
||||||
|
focus_neighbor_top = NodePath(".")
|
||||||
|
focus_neighbor_right = NodePath("../ConfirmAugmentButton")
|
||||||
|
focus_neighbor_bottom = NodePath(".")
|
||||||
|
theme_override_fonts/font = ExtResource("3_qtvkp")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("4_p84pf")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/disabled = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/hover = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/pressed = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/normal = ExtResource("5_rxojm")
|
||||||
|
text = "Cancel"
|
||||||
|
|
||||||
|
[node name="ConfirmAugmentButton" type="Button" parent="ConfirmAugmentContainer/CenterContainer/PanelContainer/CenterContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
focus_neighbor_left = NodePath("../CancelAugmentButton")
|
||||||
|
focus_neighbor_top = NodePath(".")
|
||||||
|
focus_neighbor_right = NodePath(".")
|
||||||
|
focus_neighbor_bottom = NodePath(".")
|
||||||
|
theme_override_fonts/font = ExtResource("3_qtvkp")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("4_p84pf")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/disabled = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/hover = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/pressed = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("5_rxojm")
|
||||||
|
theme_override_styles/normal = ExtResource("5_rxojm")
|
||||||
|
text = "Confirm"
|
||||||
@@ -8,11 +8,11 @@ public interface IItemSlot : IControl
|
|||||||
{
|
{
|
||||||
public AutoProp<IBaseInventoryItem> Item { get; }
|
public AutoProp<IBaseInventoryItem> Item { get; }
|
||||||
|
|
||||||
public void SetItemEquipmentStatus(bool isEquipped);
|
public void SetEmpty();
|
||||||
|
|
||||||
public void SetAugmentStatus(bool isAugmented);
|
public void SetItemToSlot(IBaseInventoryItem item);
|
||||||
|
|
||||||
public void SetItemCount(int count);
|
public void FocusItem();
|
||||||
|
|
||||||
public event Action<IItemSlot> ItemPressed;
|
public event Action<IItemSlot> ItemPressed;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using Chickensoft.Introspection;
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Zennysoft.Game.Implementation;
|
|
||||||
using Zennysoft.Game.Ma;
|
using Zennysoft.Game.Ma;
|
||||||
using Zennysoft.Ma.Adapter;
|
using Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
@@ -24,285 +23,117 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
|||||||
|
|
||||||
[Node] public Label ItemStats { get; set; }
|
[Node] public Label ItemStats { get; set; }
|
||||||
|
|
||||||
[Node] public Button InteractButton { get; set; }
|
[Node] public ActionPanel ActionPanel { get; set; }
|
||||||
|
|
||||||
[Node] public Button ThrowButton { get; set; }
|
|
||||||
|
|
||||||
[Node] public Button DropButton { get; set; }
|
|
||||||
|
|
||||||
[Node] public Control ActionPanel { get; set; }
|
|
||||||
|
|
||||||
[Node] public VBoxContainer Inventory { get; set; }
|
[Node] public VBoxContainer Inventory { get; set; }
|
||||||
|
|
||||||
|
[Node] public Control MenuPanel { get; set; }
|
||||||
|
|
||||||
|
[Node] public AugmentableItemsMenu AugmentMenu { get; set; }
|
||||||
|
|
||||||
private List<IItemSlot> ItemSlots;
|
private List<IItemSlot> ItemSlots;
|
||||||
|
|
||||||
private IItemSlot _currentlySelected;
|
private IItemSlot _currentlySelected;
|
||||||
|
|
||||||
private bool _augmentMode = false;
|
|
||||||
|
|
||||||
private Jewel _augmentingJewel;
|
|
||||||
|
|
||||||
public void OnResolved()
|
public void OnResolved()
|
||||||
{
|
{
|
||||||
ItemSlots = [];
|
ItemSlots = [.. Inventory.GetChildren().OfType<IItemSlot>()];
|
||||||
|
ItemSlots.ForEach(x => x.ItemPressed += ItemPressed);
|
||||||
|
ItemSlots.ForEach(x => x.ItemSelected += ItemSelected);
|
||||||
VisibilityChanged += ResetInventoryState;
|
VisibilityChanged += ResetInventoryState;
|
||||||
InteractButton.Pressed += InteractButton_Pressed;
|
ActionPanel.ActionPanelClosing += ActionPanel_ActionPanelClosing;
|
||||||
ThrowButton.Pressed += ThrowButton_Pressed;
|
ActionPanel.ReturnToGameAction += ActionPanel_ReturnToGameAction;
|
||||||
DropButton.Pressed += DropButton_Pressed;
|
ActionPanel.AugmentMenuRequested += ActionPanel_AugmentMenuRequested;
|
||||||
}
|
AugmentMenu.AugmentMenuClosing += AugmentMenu_AugmentMenuClosing;
|
||||||
|
AugmentMenu.FocusMode = FocusModeEnum.None;
|
||||||
private void InteractButton_Pressed()
|
ClearDescriptionBox();
|
||||||
{
|
|
||||||
//if (_currentlySelected != null)
|
|
||||||
//{
|
|
||||||
// var item = _currentlySelected.Item.Value;
|
|
||||||
// if (_augmentMode)
|
|
||||||
// {
|
|
||||||
// _player.ApplyNewAugment(_augmentingJewel, item as EquipableItem);
|
|
||||||
// _augmentMode = false;
|
|
||||||
// ResetInventoryState();
|
|
||||||
// }
|
|
||||||
// else if (item is EquipableItem equipable)
|
|
||||||
// {
|
|
||||||
// if (_player.EquipmentComponent.IsItemEquipped(equipable))
|
|
||||||
// _player.Unequip(equipable);
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// _player.Equip(equipable);
|
|
||||||
// }
|
|
||||||
// ResetInventoryState();
|
|
||||||
// }
|
|
||||||
// else if (item is Plastique plastique)
|
|
||||||
// {
|
|
||||||
// _game.SetItem(plastique);
|
|
||||||
// ResetInventoryState();
|
|
||||||
// }
|
|
||||||
// else if (item is Jewel jewel)
|
|
||||||
// {
|
|
||||||
// _augmentMode = true;
|
|
||||||
// AugmentMode(jewel);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// _game.UseItem(_currentlySelected.Item.Value);
|
|
||||||
// ResetInventoryState();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// CloseActionMenu();
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DropButton_Pressed()
|
|
||||||
{
|
|
||||||
//var previousItemInList = Mathf.Max(0, ItemSlots.IndexOf(_currentlySelected) - 1);
|
|
||||||
//_game.DropItem(_currentlySelected.Item.Value);
|
|
||||||
//CloseActionMenu();
|
|
||||||
//_gameRepo.CloseInventory();
|
|
||||||
//if (_currentlySelected != null && !_player.Inventory.Items.Contains(_currentlySelected.Item.Value))
|
|
||||||
// _currentlySelected = ItemSlots[previousItemInList];
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ThrowButton_Pressed()
|
|
||||||
{
|
|
||||||
//var previousItemInList = Mathf.Max(0, ItemSlots.IndexOf(_currentlySelected) - 1);
|
|
||||||
//_game.ThrowItem(_currentlySelected.Item.Value);
|
|
||||||
//CloseActionMenu();
|
|
||||||
//_gameRepo.CloseInventory();
|
|
||||||
//if (_currentlySelected != null && !_player.Inventory.Items.Contains(_currentlySelected.Item.Value))
|
|
||||||
// _currentlySelected = ItemSlots[previousItemInList];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Input(InputEvent @event)
|
public override void _Input(InputEvent @event)
|
||||||
{
|
{
|
||||||
//if (ActionPanel.Visible && Input.IsActionJustPressed(GameInputs.Interact))
|
if (Input.IsActionJustPressed(GameInputs.MoveUp) && _currentlySelected != ItemSlots.First())
|
||||||
//{
|
SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
||||||
// CloseActionMenu();
|
if (Input.IsActionJustPressed(GameInputs.MoveDown) && _currentlySelected != ItemSlots.Last(x => x.Item.Value != null))
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.CancelUI);
|
SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
||||||
// GetViewport().SetInputAsHandled();
|
|
||||||
//}
|
|
||||||
//else if (_augmentMode && !ActionPanel.Visible && Input.IsActionJustPressed(GameInputs.Interact))
|
|
||||||
//{
|
|
||||||
// GetViewport().SetInputAsHandled();
|
|
||||||
// _augmentMode = false;
|
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.CancelUI);
|
|
||||||
// ResetInventoryState();
|
|
||||||
//}
|
|
||||||
//if (!ActionPanel.Visible && Input.IsActionJustPressed(GameInputs.MoveUp))
|
|
||||||
//{
|
|
||||||
// if (ItemSlots.First(x => x.Visible) != _currentlySelected)
|
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
|
||||||
//}
|
|
||||||
//if (!ActionPanel.Visible && Input.IsActionJustPressed(GameInputs.MoveDown))
|
|
||||||
//{
|
|
||||||
// if (ItemSlots.Last(x => x.Visible) != _currentlySelected)
|
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (Input.IsActionJustPressed(GameInputs.MoveDown) && ActionPanel.Visible && InteractButton.HasFocus() && !ThrowButton.Disabled)
|
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
|
||||||
//if (Input.IsActionJustPressed(GameInputs.MoveDown) && ActionPanel.Visible && ThrowButton.HasFocus() && !DropButton.Disabled)
|
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
|
||||||
//if (Input.IsActionJustPressed(GameInputs.MoveUp) && ActionPanel.Visible && ThrowButton.HasFocus() && !InteractButton.Disabled)
|
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
|
||||||
//if (Input.IsActionJustPressed(GameInputs.MoveUp) && ActionPanel.Visible && DropButton.HasFocus() && !ThrowButton.Disabled)
|
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
|
||||||
|
|
||||||
//if (!ActionPanel.Visible && Input.IsActionJustPressed(GameInputs.InventorySort))
|
|
||||||
//{
|
|
||||||
// _player.Inventory.Sort(_player.EquipmentComponent.EquippedWeapon.Value, _player.EquipmentComponent.EquippedArmor.Value, _player.EquipmentComponent.EquippedAccessory.Value, _player.EquipmentComponent.EquippedAmmo.Value);
|
|
||||||
// SfxDatabase.Instance.Play(SoundEffect.SortInventory);
|
|
||||||
// ResetInventoryState();
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Slot_ItemPressed(IItemSlot slot)
|
private void ActionPanel_AugmentMenuRequested()
|
||||||
{
|
{
|
||||||
var item = slot.Item.Value;
|
ReleaseFocus();
|
||||||
|
ItemSlots.ForEach(x => x.ItemPressed -= ItemPressed);
|
||||||
InteractButton.Disabled = false;
|
ItemSlots.ForEach(x => x.ItemSelected -= ItemSelected);
|
||||||
ThrowButton.Disabled = false;
|
MenuPanel.Hide();
|
||||||
DropButton.Disabled = false;
|
MenuPanel.FocusMode = FocusModeEnum.None;
|
||||||
InteractButton.FocusMode = FocusModeEnum.All;
|
AugmentMenu.FocusMode = FocusModeEnum.All;
|
||||||
ThrowButton.FocusMode = FocusModeEnum.All;
|
SetProcessInput(false);
|
||||||
DropButton.FocusMode = FocusModeEnum.All;
|
AugmentMenu.SetProcessInput(true);
|
||||||
|
AugmentMenu.OpenAugmentMenu(_currentlySelected.Item.Value as IAugmentItem);
|
||||||
if (_augmentMode)
|
|
||||||
{
|
|
||||||
InteractButton.Text = "Augment";
|
|
||||||
ThrowButton.Disabled = true;
|
|
||||||
DropButton.Disabled = true;
|
|
||||||
InteractButton.GrabFocus();
|
|
||||||
}
|
|
||||||
else if (item is IEquipableItem equipable)
|
|
||||||
{
|
|
||||||
var itemIsEquipped = _player.EquipmentComponent.IsItemEquipped(equipable);
|
|
||||||
InteractButton.Text = itemIsEquipped ? "Unequip" : "Equip";
|
|
||||||
ThrowButton.Disabled = itemIsEquipped;
|
|
||||||
ThrowButton.FocusMode = itemIsEquipped ? FocusModeEnum.None : FocusModeEnum.All;
|
|
||||||
DropButton.Disabled = itemIsEquipped;
|
|
||||||
DropButton.FocusMode = itemIsEquipped ? FocusModeEnum.None : FocusModeEnum.All;
|
|
||||||
InteractButton.GrabFocus();
|
|
||||||
|
|
||||||
if ((item is Weapon weapon && _player.EquipmentComponent.EquippedWeapon.Value.Glued) ||
|
|
||||||
(item is Armor && _player.EquipmentComponent.EquippedArmor.Value.Glued) ||
|
|
||||||
(item is Accessory && _player.EquipmentComponent.EquippedAccessory.Value.Glued))
|
|
||||||
{
|
|
||||||
InteractButton.Disabled = true;
|
|
||||||
InteractButton.FocusMode = FocusModeEnum.None;
|
|
||||||
ThrowButton.GrabFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (item is Plastique plastique)
|
|
||||||
{
|
|
||||||
InteractButton.Text = "Set";
|
|
||||||
InteractButton.GrabFocus();
|
|
||||||
}
|
|
||||||
else if (item is ThrowableItem throwable)
|
|
||||||
{
|
|
||||||
InteractButton.Disabled = true;
|
|
||||||
InteractButton.FocusMode = FocusModeEnum.None;
|
|
||||||
ThrowButton.GrabFocus();
|
|
||||||
}
|
|
||||||
else if (item is Jewel jewel)
|
|
||||||
{
|
|
||||||
InteractButton.Text = "Augment";
|
|
||||||
InteractButton.GrabFocus();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
InteractButton.Text = "Use";
|
|
||||||
InteractButton.GrabFocus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionPanel.Show();
|
private void ActionPanel_ReturnToGameAction()
|
||||||
|
{
|
||||||
|
_gameRepo.CloseInventory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ItemPressed(IItemSlot selectedItem)
|
||||||
|
{
|
||||||
|
SetProcessInput(false);
|
||||||
|
ActionPanel.SetProcessInput(true);
|
||||||
|
ActionPanel.ShowPanel(selectedItem.Item.Value);
|
||||||
|
ActionPanel.FocusActionPanel();
|
||||||
|
SfxDatabase.Instance.Play(SoundEffect.SelectUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ItemSelected(IItemSlot selectedItem)
|
||||||
|
{
|
||||||
|
_currentlySelected = selectedItem;
|
||||||
|
ItemName.Text = selectedItem.Item.Value.ItemName;
|
||||||
|
ItemFlavor.Text = selectedItem.Item.Value.Description;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ResetInventoryState()
|
private void ResetInventoryState()
|
||||||
{
|
{
|
||||||
var inventory = _player.Inventory.Items;
|
var inventory = _player.Inventory.Items;
|
||||||
foreach (var item in inventory)
|
ItemSlots.ForEach(x => x.SetEmpty());
|
||||||
|
ClearDescriptionBox();
|
||||||
|
|
||||||
|
for (var i = 0; i < inventory.Count; i++)
|
||||||
|
ItemSlots[i].SetItemToSlot(inventory[i]);
|
||||||
|
|
||||||
|
if (_currentlySelected == null && inventory.Any())
|
||||||
|
_currentlySelected = ItemSlots.First();
|
||||||
|
if (inventory.Any())
|
||||||
|
_currentlySelected.FocusItem();
|
||||||
|
ActionPanel.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClearDescriptionBox()
|
||||||
{
|
{
|
||||||
var itemSlot = new ItemSlot();
|
ItemName.Text = string.Empty;
|
||||||
Inventory.AddChild(itemSlot);
|
ItemFlavor.Text = string.Empty;
|
||||||
itemSlot.Item.OnNext(item);
|
ItemStats.Text = string.Empty;
|
||||||
ItemSlots.Add(itemSlot);
|
|
||||||
}
|
|
||||||
//foreach (var item in ItemSlots)
|
|
||||||
//{
|
|
||||||
// item.Hide();
|
|
||||||
// item.Disabled = true;
|
|
||||||
// item.FocusMode = FocusModeEnum.None;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//foreach (var item in ItemCountLabels)
|
|
||||||
// item.Text = string.Empty;
|
|
||||||
|
|
||||||
//ItemName.Text = string.Empty;
|
|
||||||
//ItemFlavor.Text = string.Empty;
|
|
||||||
//ItemStats.Text = string.Empty;
|
|
||||||
|
|
||||||
|
|
||||||
//for (var i = 0; i < _player.Inventory.Items.Count; i++)
|
|
||||||
//{
|
|
||||||
// var item = _player.Inventory.Items[i];
|
|
||||||
// ItemSlots[i].Item.OnNext(item);
|
|
||||||
// ItemSlots[i].Show();
|
|
||||||
// ItemSlots[i].SetItemEquipmentStatus(_player.EquipmentComponent.IsItemEquipped(item));
|
|
||||||
// if (item is IStackable stackable)
|
|
||||||
// ItemCountLabels[i].Text = $"x{stackable.Count.Value:D2}";
|
|
||||||
|
|
||||||
// if (item is EquipableItem equipable && equipable.Glued)
|
|
||||||
// {
|
|
||||||
// ItemSlots[i].FocusMode = FocusModeEnum.None;
|
|
||||||
// ItemSlots[i].Disabled = true;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// ItemSlots[i].FocusMode = FocusModeEnum.All;
|
|
||||||
// ItemSlots[i].Disabled = false;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (_currentlySelected == null || _currentlySelected.Disabled || _currentlySelected.FocusMode == FocusModeEnum.None)
|
|
||||||
// _currentlySelected = ItemSlots.FirstOrDefault(x => !x.Disabled);
|
|
||||||
|
|
||||||
//if (_currentlySelected != null)
|
|
||||||
// _currentlySelected.GrabFocus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Slot_FocusEntered(IItemSlot slot)
|
private void ActionPanel_ActionPanelClosing()
|
||||||
{
|
{
|
||||||
if (_currentlySelected.Item.Value == null)
|
ActionPanel.Hide();
|
||||||
return;
|
SetProcessInput(true);
|
||||||
_currentlySelected = slot;
|
ActionPanel.SetProcessInput(false);
|
||||||
var item = slot.Item.Value;
|
if (!_player.Inventory.Items.Contains(_currentlySelected.Item.Value))
|
||||||
ItemName.Text = item.ItemName;
|
_currentlySelected = null;
|
||||||
ItemFlavor.Text = item.Description;
|
ResetInventoryState();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AugmentMode(Jewel jewel)
|
private void AugmentMenu_AugmentMenuClosing()
|
||||||
{
|
{
|
||||||
//_augmentingJewel = jewel;
|
ItemSlots.ForEach(x => x.ItemPressed += ItemPressed);
|
||||||
|
ItemSlots.ForEach(x => x.ItemSelected += ItemSelected);
|
||||||
//foreach (var item in ItemSlots)
|
MenuPanel.Show();
|
||||||
//{
|
MenuPanel.FocusMode = FocusModeEnum.All;
|
||||||
// item.Disabled = true;
|
AugmentMenu.FocusMode = FocusModeEnum.None;
|
||||||
// item.FocusMode = FocusModeEnum.None;
|
SetProcessInput(true);
|
||||||
// if (item.Item.Value is EquipableItem equipable && equipable is not Ammo && equipable.Augment == null)
|
AugmentMenu.SetProcessInput(false);
|
||||||
// {
|
AugmentMenu.Hide();
|
||||||
// item.Disabled = false;
|
ResetInventoryState();
|
||||||
// item.FocusMode = FocusModeEnum.All;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//var itemToSelect = ItemSlots.First(x => !x.Disabled);
|
|
||||||
//itemToSelect.GrabFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CloseActionMenu()
|
|
||||||
{
|
|
||||||
//if (_currentlySelected != null)
|
|
||||||
// _currentlySelected.GrabFocus();
|
|
||||||
//ActionPanel.Hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
[gd_scene load_steps=17 format=3 uid="uid://cbxw70qa7gifp"]
|
[gd_scene load_steps=15 format=3 uid="uid://cbxw70qa7gifp"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://src/ui/inventory_menu/InventoryMenu2.cs" id="1_unikd"]
|
[ext_resource type="Script" uid="uid://yh8qxmn058w2" path="res://src/ui/inventory_menu/InventoryMenu.cs" id="1_unikd"]
|
||||||
[ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="2_7co7g"]
|
[ext_resource type="PackedScene" uid="uid://b648lhohtue70" path="res://src/ui/inventory_menu/ActionPanel.tscn" id="3_7co7g"]
|
||||||
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="3_b6rkr"]
|
|
||||||
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="4_l0byb"]
|
|
||||||
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="6_ldqki"]
|
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="6_ldqki"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c005nd0m2eim" path="res://src/ui/inventory_menu/ItemSlot.tscn" id="6_unikd"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://tpqh7q0xh63c" path="res://src/ui/inventory_menu/AugmentableItemsMenu.tscn" id="6_xwkpe"]
|
||||||
[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="7_we8a6"]
|
[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="7_we8a6"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7co7g"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7co7g"]
|
||||||
@@ -21,29 +21,19 @@ bg_color = Color(0, 0, 0, 0.745098)
|
|||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_ejvue"]
|
[sub_resource type="LabelSettings" id="LabelSettings_ejvue"]
|
||||||
line_spacing = 1.0
|
line_spacing = 1.0
|
||||||
font = ExtResource("2_7co7g")
|
font = ExtResource("6_ldqki")
|
||||||
font_size = 50
|
font_size = 50
|
||||||
outline_size = 3
|
outline_size = 3
|
||||||
outline_color = Color(0, 0, 0, 1)
|
outline_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g7ag1"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_aiji3"]
|
||||||
bg_color = Color(0, 0, 0, 0.745098)
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7co7g"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7co7g"]
|
||||||
bg_color = Color(0, 0, 0, 0.745098)
|
bg_color = Color(0, 0, 0, 0.745098)
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_unikd"]
|
|
||||||
bg_color = Color(0, 0, 0, 1)
|
|
||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_unikd"]
|
|
||||||
line_spacing = 1.0
|
|
||||||
font = ExtResource("2_7co7g")
|
|
||||||
font_size = 40
|
|
||||||
outline_size = 3
|
|
||||||
outline_color = Color(0, 0, 0, 1)
|
|
||||||
|
|
||||||
[node name="InventoryMenu" type="PanelContainer"]
|
[node name="InventoryMenu" type="PanelContainer"]
|
||||||
process_mode = 2
|
process_mode = 2
|
||||||
|
visible = false
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
@@ -73,19 +63,15 @@ layout_mode = 2
|
|||||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_b6rkr")
|
theme_override_styles/panel = SubResource("StyleBoxEmpty_b6rkr")
|
||||||
|
|
||||||
[node name="MenuPanel" type="Panel" parent="Panel/MarginContainer/PanelContainer"]
|
[node name="MenuPanel" type="Panel" parent="Panel/MarginContainer/PanelContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_unikd")
|
theme_override_styles/panel = SubResource("StyleBoxEmpty_unikd")
|
||||||
|
|
||||||
[node name="TitlePanelContainer" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
|
[node name="TitlePanelContainer" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
|
||||||
custom_minimum_size = Vector2(400, 100)
|
custom_minimum_size = Vector2(400, 100)
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 5
|
offset_right = 400.0
|
||||||
anchor_left = 0.5
|
offset_bottom = 100.0
|
||||||
anchor_right = 0.5
|
|
||||||
offset_left = -20.0
|
|
||||||
offset_right = 20.0
|
|
||||||
offset_bottom = 40.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
|
|
||||||
[node name="InventoryTitlePanel" type="Panel" parent="Panel/MarginContainer/PanelContainer/MenuPanel/TitlePanelContainer"]
|
[node name="InventoryTitlePanel" type="Panel" parent="Panel/MarginContainer/PanelContainer/MenuPanel/TitlePanelContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -136,111 +122,12 @@ anchor_bottom = 1.0
|
|||||||
offset_top = -200.0
|
offset_top = -200.0
|
||||||
offset_right = 200.0
|
offset_right = 200.0
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxEmpty_aiji3")
|
||||||
|
|
||||||
[node name="ActionPanel" type="Panel" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer"]
|
[node name="ActionPanel" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer" instance=ExtResource("3_7co7g")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(200, 200)
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
focus_mode = 2
|
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_g7ag1")
|
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer/ActionPanel"]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_constants/margin_left = 5
|
|
||||||
theme_override_constants/margin_top = 5
|
|
||||||
theme_override_constants/margin_right = 5
|
|
||||||
theme_override_constants/margin_bottom = 5
|
|
||||||
|
|
||||||
[node name="ReferenceRect" type="ReferenceRect" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer/ActionPanel/MarginContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
border_color = Color(1, 1, 1, 1)
|
|
||||||
border_width = 2.0
|
|
||||||
editor_only = false
|
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer/ActionPanel/MarginContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/margin_left = 20
|
|
||||||
theme_override_constants/margin_top = 10
|
|
||||||
theme_override_constants/margin_right = 10
|
|
||||||
theme_override_constants/margin_bottom = 10
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer/ActionPanel/MarginContainer/MarginContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
alignment = 1
|
|
||||||
|
|
||||||
[node name="InteractButton" type="Button" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer/ActionPanel/MarginContainer/MarginContainer/VBoxContainer"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 0
|
|
||||||
focus_neighbor_left = NodePath(".")
|
|
||||||
focus_neighbor_top = NodePath(".")
|
|
||||||
focus_neighbor_right = NodePath(".")
|
|
||||||
focus_neighbor_bottom = NodePath("../ThrowButton")
|
|
||||||
theme_override_font_sizes/font_size = 25
|
|
||||||
theme_override_styles/focus = ExtResource("3_b6rkr")
|
|
||||||
theme_override_styles/disabled_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/disabled = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal = ExtResource("4_l0byb")
|
|
||||||
text = "Interact"
|
|
||||||
alignment = 0
|
|
||||||
|
|
||||||
[node name="ThrowButton" type="Button" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer/ActionPanel/MarginContainer/MarginContainer/VBoxContainer"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 0
|
|
||||||
focus_neighbor_left = NodePath(".")
|
|
||||||
focus_neighbor_top = NodePath("../InteractButton")
|
|
||||||
focus_neighbor_right = NodePath(".")
|
|
||||||
focus_neighbor_bottom = NodePath("../DropButton")
|
|
||||||
theme_override_font_sizes/font_size = 25
|
|
||||||
theme_override_styles/focus = ExtResource("3_b6rkr")
|
|
||||||
theme_override_styles/disabled_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/disabled = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal = ExtResource("4_l0byb")
|
|
||||||
text = "Throw"
|
|
||||||
alignment = 0
|
|
||||||
|
|
||||||
[node name="DropButton" type="Button" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ActionPanelContainer/ActionPanel/MarginContainer/MarginContainer/VBoxContainer"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 0
|
|
||||||
focus_neighbor_left = NodePath(".")
|
|
||||||
focus_neighbor_top = NodePath("../ThrowButton")
|
|
||||||
focus_neighbor_right = NodePath(".")
|
|
||||||
focus_neighbor_bottom = NodePath(".")
|
|
||||||
theme_override_font_sizes/font_size = 25
|
|
||||||
theme_override_styles/focus = ExtResource("3_b6rkr")
|
|
||||||
theme_override_styles/disabled_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/disabled = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal = ExtResource("4_l0byb")
|
|
||||||
text = "Drop"
|
|
||||||
alignment = 0
|
|
||||||
|
|
||||||
[node name="ItemDescriptionPanelContainer" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
|
[node name="ItemDescriptionPanelContainer" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
|
||||||
custom_minimum_size = Vector2(500, 500)
|
custom_minimum_size = Vector2(500, 500)
|
||||||
@@ -253,6 +140,10 @@ offset_right = 500.0
|
|||||||
offset_bottom = 250.0
|
offset_bottom = 250.0
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="ItemDescriptionBox" type="Panel" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_cq2sk")
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer"]
|
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/margin_left = 5
|
theme_override_constants/margin_left = 5
|
||||||
@@ -266,55 +157,50 @@ border_color = Color(1, 1, 1, 1)
|
|||||||
border_width = 2.0
|
border_width = 2.0
|
||||||
editor_only = false
|
editor_only = false
|
||||||
|
|
||||||
[node name="ItemDescriptionBox" type="Panel" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer"]
|
[node name="MarginContainer2" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_cq2sk")
|
theme_override_constants/margin_left = 20
|
||||||
|
theme_override_constants/margin_top = 20
|
||||||
|
theme_override_constants/margin_right = 20
|
||||||
|
theme_override_constants/margin_bottom = 20
|
||||||
|
|
||||||
[node name="MarginContainer2" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer/ItemDescriptionBox"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer2"]
|
||||||
layout_mode = 2
|
|
||||||
offset_left = -15.0
|
|
||||||
offset_top = 10.0
|
|
||||||
offset_right = 515.0
|
|
||||||
offset_bottom = 490.0
|
|
||||||
theme_override_constants/margin_left = 15
|
|
||||||
theme_override_constants/margin_top = 15
|
|
||||||
theme_override_constants/margin_right = 15
|
|
||||||
theme_override_constants/margin_bottom = 15
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer/ItemDescriptionBox/MarginContainer2"]
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 50
|
theme_override_constants/separation = 50
|
||||||
|
|
||||||
[node name="ItemName" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer/ItemDescriptionBox/MarginContainer2/VBoxContainer"]
|
[node name="ItemName" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer2/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
text = "Text"
|
||||||
label_settings = ExtResource("7_we8a6")
|
label_settings = ExtResource("7_we8a6")
|
||||||
|
|
||||||
[node name="ItemFlavor" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer/ItemDescriptionBox/MarginContainer2/VBoxContainer"]
|
[node name="ItemFlavor" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer2/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(500, 150)
|
custom_minimum_size = Vector2(500, 150)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
text = "More Text"
|
||||||
label_settings = ExtResource("7_we8a6")
|
label_settings = ExtResource("7_we8a6")
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
autowrap_mode = 2
|
autowrap_mode = 2
|
||||||
|
|
||||||
[node name="ItemStats" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer/ItemDescriptionBox/MarginContainer2/VBoxContainer"]
|
[node name="ItemStats" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemDescriptionPanelContainer/MarginContainer2/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
text = "Text Stats"
|
||||||
label_settings = ExtResource("7_we8a6")
|
label_settings = ExtResource("7_we8a6")
|
||||||
|
|
||||||
[node name="InventoryList" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
|
[node name="InventoryList" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
|
||||||
custom_minimum_size = Vector2(500, 100)
|
custom_minimum_size = Vector2(800, 100)
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -95.0
|
offset_left = -120.0
|
||||||
offset_top = -365.0
|
offset_top = -515.0
|
||||||
offset_right = 405.0
|
offset_right = 680.0
|
||||||
offset_bottom = 435.0
|
offset_bottom = 510.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
@@ -329,121 +215,92 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_constants/margin_left = 10
|
|
||||||
theme_override_constants/margin_top = 10
|
|
||||||
theme_override_constants/margin_right = 10
|
|
||||||
theme_override_constants/margin_bottom = 10
|
|
||||||
|
|
||||||
[node name="ReferenceRect" type="ReferenceRect" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
border_color = Color(1, 1, 1, 1)
|
|
||||||
border_width = 2.0
|
|
||||||
editor_only = false
|
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/margin_left = 15
|
|
||||||
theme_override_constants/margin_top = 15
|
|
||||||
theme_override_constants/margin_right = 15
|
|
||||||
theme_override_constants/margin_bottom = 15
|
|
||||||
|
|
||||||
[node name="Inventory" type="VBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer/MarginContainer"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_vertical = 0
|
|
||||||
|
|
||||||
[node name="AugmentItemPanelContainer" type="Panel" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
visible = false
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
|
|
||||||
[node name="CenterContainer" type="CenterContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer"]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_right = -40.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer"]
|
|
||||||
custom_minimum_size = Vector2(400, 250)
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_unikd")
|
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/margin_left = 5
|
theme_override_constants/margin_left = 5
|
||||||
theme_override_constants/margin_top = 5
|
theme_override_constants/margin_top = 5
|
||||||
theme_override_constants/margin_right = 5
|
theme_override_constants/margin_right = 5
|
||||||
theme_override_constants/margin_bottom = 5
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
[node name="ReferenceRect" type="ReferenceRect" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer/MarginContainer"]
|
[node name="ReferenceRect" type="ReferenceRect" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
border_color = Color(1, 1, 1, 1)
|
border_color = Color(1, 1, 1, 1)
|
||||||
editor_only = false
|
editor_only = false
|
||||||
|
|
||||||
[node name="CenterContainer" type="CenterContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer"]
|
[node name="MarginContainer2" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
offset_right = 800.0
|
||||||
|
offset_bottom = 1050.0
|
||||||
|
theme_override_constants/margin_left = 25
|
||||||
|
theme_override_constants/margin_top = 15
|
||||||
|
theme_override_constants/margin_right = 25
|
||||||
|
theme_override_constants/margin_bottom = 15
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer/CenterContainer"]
|
[node name="Inventory" type="VBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2"]
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/separation = 25
|
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer/CenterContainer/VBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Augment Item?"
|
|
||||||
label_settings = SubResource("LabelSettings_unikd")
|
|
||||||
horizontal_alignment = 1
|
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer/CenterContainer/VBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/separation = 20
|
|
||||||
alignment = 1
|
|
||||||
|
|
||||||
[node name="CancelAugmentButton" type="Button" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer/CenterContainer/VBoxContainer/HBoxContainer"]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_fonts/font = ExtResource("6_ldqki")
|
size_flags_vertical = 0
|
||||||
theme_override_font_sizes/font_size = 25
|
theme_override_constants/separation = 0
|
||||||
theme_override_styles/focus = ExtResource("3_b6rkr")
|
|
||||||
theme_override_styles/disabled_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/disabled = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal = ExtResource("4_l0byb")
|
|
||||||
text = "Cancel"
|
|
||||||
|
|
||||||
[node name="ConfirmAugmentButton" type="Button" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer/PanelContainer/CenterContainer/VBoxContainer/HBoxContainer"]
|
[node name="ItemSlot" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot2" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot3" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot4" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot5" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot6" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot7" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot8" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot9" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot10" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot11" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot12" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot13" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot14" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot15" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot16" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot17" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot18" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot19" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemSlot20" parent="Panel/MarginContainer/PanelContainer/MenuPanel/InventoryList/Panel/MarginContainer2/Inventory" instance=ExtResource("6_unikd")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AugmentMenu" parent="Panel/MarginContainer/PanelContainer" instance=ExtResource("6_xwkpe")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
visible = false
|
||||||
theme_override_fonts/font = ExtResource("6_ldqki")
|
|
||||||
theme_override_font_sizes/font_size = 25
|
|
||||||
theme_override_styles/focus = ExtResource("3_b6rkr")
|
|
||||||
theme_override_styles/disabled_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/disabled = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/hover = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/pressed = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal_mirrored = ExtResource("4_l0byb")
|
|
||||||
theme_override_styles/normal = ExtResource("4_l0byb")
|
|
||||||
text = "Confirm"
|
|
||||||
|
|
||||||
[node name="PanelContainer2" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/AugmentItemPanelContainer/CenterContainer"]
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Chickensoft.Collections;
|
|||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
|
using Zennysoft.Game.Implementation;
|
||||||
using Zennysoft.Ma.Adapter;
|
using Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
@@ -35,8 +36,43 @@ public partial class ItemSlot : Control, IItemSlot
|
|||||||
public void OnResolved()
|
public void OnResolved()
|
||||||
{
|
{
|
||||||
Item.Changed += Item_Changed;
|
Item.Changed += Item_Changed;
|
||||||
FocusEntered += ItemSlot_FocusEntered;
|
|
||||||
ItemName.Pressed += ItemSlot_Pressed;
|
ItemName.Pressed += ItemSlot_Pressed;
|
||||||
|
ItemName.FocusEntered += FocusItemInternal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetItemToSlot(IBaseInventoryItem item)
|
||||||
|
{
|
||||||
|
Item.OnNext(item);
|
||||||
|
ItemTexture.Texture = item.GetTexture();
|
||||||
|
ItemName.Disabled = false;
|
||||||
|
ItemName.Text = item.ItemName;
|
||||||
|
|
||||||
|
if (item is IStackable stackable)
|
||||||
|
SetItemCount(stackable.Count.Value);
|
||||||
|
|
||||||
|
if (item is IEquipableItem equipableItem)
|
||||||
|
{
|
||||||
|
SetItemEquipmentStatus(_player.EquipmentComponent.IsItemEquipped(equipableItem));
|
||||||
|
ItemName.Disabled = equipableItem.Glued;
|
||||||
|
ItemName.FocusMode = ItemName.Disabled ? FocusModeEnum.None : FocusModeEnum.All;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item is IAugmentableItem augmentableItem)
|
||||||
|
SetAugmentStatus(augmentableItem.Augment != null);
|
||||||
|
|
||||||
|
Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetEmpty()
|
||||||
|
{
|
||||||
|
Hide();
|
||||||
|
ItemName.Disabled = true;
|
||||||
|
ItemName.Text = string.Empty;
|
||||||
|
Item.Clear();
|
||||||
|
ItemTexture.Texture = null;
|
||||||
|
SetItemEquipmentStatus(false);
|
||||||
|
SetAugmentStatus(false);
|
||||||
|
SetItemCount(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetItemEquipmentStatus(bool isEquipped)
|
public void SetItemEquipmentStatus(bool isEquipped)
|
||||||
@@ -49,13 +85,19 @@ public partial class ItemSlot : Control, IItemSlot
|
|||||||
|
|
||||||
public void SetAugmentStatus(bool isAugmented) => AugmentTexture.Visible = isAugmented;
|
public void SetAugmentStatus(bool isAugmented) => AugmentTexture.Visible = isAugmented;
|
||||||
|
|
||||||
private void ItemSlot_FocusEntered()
|
public void SetItemCount(int count) => ItemCountLabel.Text = count > 0 ? $"x{count:D2}" : string.Empty;
|
||||||
|
|
||||||
|
public void FocusItem()
|
||||||
{
|
{
|
||||||
ItemName.GrabFocus();
|
ItemName.GrabFocus();
|
||||||
ItemSelected?.Invoke(this);
|
ItemSelected?.Invoke(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetItemCount(int count) => ItemCountLabel.Text = count > 0 ? count.ToString("D2") : string.Empty;
|
private void FocusItemInternal()
|
||||||
|
{
|
||||||
|
ItemName.GrabFocus();
|
||||||
|
ItemSelected?.Invoke(this);
|
||||||
|
}
|
||||||
|
|
||||||
private void ItemSlot_Pressed()
|
private void ItemSlot_Pressed()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,62 +1,85 @@
|
|||||||
[gd_scene load_steps=5 format=3 uid="uid://c005nd0m2eim"]
|
[gd_scene load_steps=7 format=3 uid="uid://c005nd0m2eim"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cglxk7v8hpesn" path="res://src/ui/inventory_menu/ItemSlot.cs" id="1_yttxt"]
|
[ext_resource type="Script" uid="uid://cglxk7v8hpesn" path="res://src/ui/inventory_menu/ItemSlot.cs" id="1_yttxt"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dymrg1fmwho35" path="res://src/items/weapons/textures/Cross Sword.png" id="2_rf22b"]
|
[ext_resource type="Texture2D" uid="uid://dymrg1fmwho35" path="res://src/items/weapons/textures/Cross Sword.png" id="2_rf22b"]
|
||||||
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_lt1pw"]
|
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_lt1pw"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="4_rf22b"]
|
||||||
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="4_t6dim"]
|
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="4_t6dim"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d3bx1j5irhdes" path="res://src/items/jewels/texture/Igneous Jewel.png" id="5_lt1pw"]
|
||||||
|
|
||||||
[node name="ItemSlot" type="Button"]
|
[node name="ItemSlot" type="HBoxContainer"]
|
||||||
custom_minimum_size = Vector2(100, 50)
|
anchors_preset = 5
|
||||||
anchors_preset = -1
|
anchor_left = 0.5
|
||||||
anchor_right = 0.885
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.093
|
offset_left = -215.0
|
||||||
offset_left = 123.0
|
offset_right = 215.0
|
||||||
offset_right = -1414.2
|
offset_bottom = 50.0
|
||||||
offset_bottom = -50.44
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
size_flags_horizontal = 3
|
||||||
size_flags_horizontal = 4
|
size_flags_vertical = 0
|
||||||
size_flags_vertical = 4
|
|
||||||
mouse_filter = 2
|
|
||||||
theme_override_constants/h_separation = 20
|
|
||||||
theme_override_fonts/font = ExtResource("4_t6dim")
|
|
||||||
theme_override_font_sizes/font_size = 25
|
|
||||||
theme_override_styles/focus = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/disabled_mirrored = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/disabled = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/hover_pressed_mirrored = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/hover_pressed = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/hover_mirrored = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/hover = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/pressed_mirrored = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/pressed = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/normal_mirrored = ExtResource("4_lt1pw")
|
|
||||||
theme_override_styles/normal = ExtResource("4_lt1pw")
|
|
||||||
button_mask = 0
|
|
||||||
text = "Cross Sword"
|
|
||||||
flat = true
|
|
||||||
alignment = 0
|
|
||||||
script = ExtResource("1_yttxt")
|
script = ExtResource("1_yttxt")
|
||||||
|
|
||||||
[node name="ItemTexture" type="TextureRect" parent="."]
|
[node name="ItemInfo" type="HBoxContainer" parent="."]
|
||||||
unique_name_in_owner = true
|
layout_mode = 2
|
||||||
layout_mode = 0
|
theme_override_constants/separation = 20
|
||||||
offset_left = -65.0
|
alignment = 1
|
||||||
offset_top = 6.0
|
|
||||||
offset_right = -25.0
|
|
||||||
offset_bottom = 46.0
|
|
||||||
texture = ExtResource("2_rf22b")
|
|
||||||
expand_mode = 2
|
|
||||||
stretch_mode = 4
|
|
||||||
|
|
||||||
[node name="Equipped" type="Label" parent="."]
|
[node name="EquippedLabel" type="Label" parent="ItemInfo"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(25, 50)
|
custom_minimum_size = Vector2(25, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
offset_left = -122.0
|
|
||||||
offset_right = -78.0
|
|
||||||
offset_bottom = 50.0
|
|
||||||
theme_override_fonts/font = ExtResource("4_t6dim")
|
theme_override_fonts/font = ExtResource("4_t6dim")
|
||||||
theme_override_font_sizes/font_size = 25
|
theme_override_font_sizes/font_size = 25
|
||||||
text = "E"
|
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="ItemTexture" type="TextureRect" parent="ItemInfo"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(50, 50)
|
||||||
|
layout_mode = 2
|
||||||
|
texture = ExtResource("2_rf22b")
|
||||||
|
|
||||||
|
[node name="Control" type="HBoxContainer" parent="ItemInfo"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 20
|
||||||
|
|
||||||
|
[node name="ItemName" type="Button" parent="ItemInfo/Control"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 4
|
||||||
|
focus_neighbor_left = NodePath(".")
|
||||||
|
focus_neighbor_right = NodePath(".")
|
||||||
|
theme_override_fonts/font = ExtResource("4_t6dim")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
theme_override_styles/focus = ExtResource("4_lt1pw")
|
||||||
|
theme_override_styles/disabled_mirrored = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/disabled = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/hover_pressed_mirrored = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/hover_pressed = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/hover_mirrored = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/hover = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/pressed_mirrored = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/pressed = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/normal_mirrored = ExtResource("4_rf22b")
|
||||||
|
theme_override_styles/normal = ExtResource("4_rf22b")
|
||||||
|
button_mask = 0
|
||||||
|
text = "Cross Sword"
|
||||||
|
|
||||||
|
[node name="AugmentTexture" type="TextureRect" parent="ItemInfo/Control"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(15, 20)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 4
|
||||||
|
texture = ExtResource("5_lt1pw")
|
||||||
|
stretch_mode = 2
|
||||||
|
|
||||||
|
[node name="ItemCountLabel" type="Label" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 10
|
||||||
|
theme_override_fonts/font = ExtResource("4_t6dim")
|
||||||
|
theme_override_font_sizes/font_size = 25
|
||||||
|
text = "x99"
|
||||||
|
horizontal_alignment = 2
|
||||||
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using Chickensoft.Introspection;
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Zennysoft.Game.Abstractions;
|
|
||||||
using Zennysoft.Game.Ma;
|
using Zennysoft.Game.Ma;
|
||||||
using Zennysoft.Ma.Adapter;
|
using Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
@@ -82,16 +81,16 @@ public partial class LoadNextLevel : Control, IFloorClearMenu
|
|||||||
|
|
||||||
private void ExitButton_Pressed()
|
private void ExitButton_Pressed()
|
||||||
{
|
{
|
||||||
ContinueButton.Disabled = true;
|
ContinueButton.FocusMode = FocusModeEnum.None;
|
||||||
ExitButton.Disabled = true;
|
ExitButton.FocusMode = FocusModeEnum.None;
|
||||||
FadeOut();
|
FadeOut();
|
||||||
Exit?.Invoke();
|
Exit?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ContinueButton_Pressed()
|
private void ContinueButton_Pressed()
|
||||||
{
|
{
|
||||||
ContinueButton.Disabled = true;
|
ContinueButton.FocusMode = FocusModeEnum.None;
|
||||||
ExitButton.Disabled = true;
|
ExitButton.FocusMode = FocusModeEnum.None;
|
||||||
GoToNextFloor?.Invoke();
|
GoToNextFloor?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,14 +100,13 @@ public partial class LoadNextLevel : Control, IFloorClearMenu
|
|||||||
{
|
{
|
||||||
_fadingIn = true;
|
_fadingIn = true;
|
||||||
_map.CurrentFloor.FadeOutAudio();
|
_map.CurrentFloor.FadeOutAudio();
|
||||||
ContinueButton.Disabled = true;
|
ContinueButton.FocusMode = FocusModeEnum.None;
|
||||||
ExitButton.Disabled = true;
|
ExitButton.FocusMode = FocusModeEnum.None;
|
||||||
ContinueButton.CallDeferred(MethodName.GrabFocus);
|
|
||||||
}
|
}
|
||||||
if (animName == "fade_out")
|
if (animName == "fade_out")
|
||||||
{
|
{
|
||||||
_fadingIn = false;
|
_fadingIn = false;
|
||||||
CallDeferred(MethodName.ReleaseFocus);
|
ContinueButton.CallDeferred(MethodName.ReleaseFocus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,9 +114,10 @@ public partial class LoadNextLevel : Control, IFloorClearMenu
|
|||||||
{
|
{
|
||||||
if (animName == "fade_in")
|
if (animName == "fade_in")
|
||||||
{
|
{
|
||||||
|
ContinueButton.CallDeferred(MethodName.GrabFocus);
|
||||||
_fadingIn = false;
|
_fadingIn = false;
|
||||||
ContinueButton.Disabled = false;
|
ContinueButton.FocusMode = FocusModeEnum.All;
|
||||||
ExitButton.Disabled = false;
|
ExitButton.FocusMode = FocusModeEnum.All;
|
||||||
}
|
}
|
||||||
if (animName == "fade_out")
|
if (animName == "fade_out")
|
||||||
TransitionCompleted?.Invoke();
|
TransitionCompleted?.Invoke();
|
||||||
|
|||||||