DXItemCell in-front of BeltDialog
//
Closed
I assume this is still an issue which needs fixing? If not please specify the reason for closing it
To reproduce the issue, (atleast for me), Create 10 healthpotions, and assign them to slots 1-4 on your belt, log out and back in.
wait about 5-10 seconds, the slot 1 image seems to fade out (like the fade system text).
https://github.com/user-attachments/assets/39e636db-7a3e-4685-84ee-13282927ba9e
I assume this is still an issue which needs fixing? If not please specify the reason for closing it
Issue's fixed within the provided notepad apologies for closing it
To reproduce the issue, (atleast for me), Create 10 healthpotions, and assign them to slots 1-4 on your belt, log out and back in.
wait about 5-10 seconds, the slot 1 image seems to fade out (like the fade system text).
belt_icon.mp4
You'll need to download the latest files in-order to get the past the error that you're seeing.
I still had an issue with the beltdialog after trying the above changes, but it was specific to when I had 1 slot showing on the beltdialog and only on the initial load of the UI, it self-corrected on resize. I have since fixed this on my code and have left the code here incase it's helpful for fixing the issue in the base source.
I've added in the above changes, and it does indeed bring back the slot 1 transparent issue. I think the previous change just coincidentally fixed it in certain scenarios. Still not sure what's causing that, but will leave this ticket open until its resolved again.
Seems to be fixed now with the addition of @phoenixvdp changes. The invisibility and 1 slot position both seem to be working correctly now.
Reopening as issue has appeared again
private void FadeOutChatHistory() { if (!Panel.FadeOutCheckBox.Checked && chatFade == 1F) return;
// Ensure the chat is visible and active
if (!GameScene.Game.ChatTextBox.Visible || GameScene.Game.ChatTextBox.TextBox != DXTextBox.ActiveTextBox)
return;
if (HideChat && nextFadeCheck < CEnvir.Now && chatFade > 0F)
{
chatFade -= 0.2F;
chatFade = Math.Max(0F, chatFade);
// Only fade chat messages using History
foreach (var item in History)
{
if (item?.Label != null)
{
item.Label.Opacity = chatFade;
}
}
nextFadeCheck = CEnvir.Now.AddMilliseconds(100);
return;
}
bool hideChat = false;
DXTabControl tab = TabButton.Parent as DXTabControl;
if (tab?.SelectedTab == this &&
!GameScene.Game.ChatOptionsBox.Visible &&
GameScene.Game.ChatTextBox.TextBox != DXTextBox.ActiveTextBox &&
Panel.FadeOutCheckBox.Checked &&
Panel.TransparentCheckBox.Checked)
{
var newest = History.LastOrDefault();
if (newest != null && newest.SentDate < CEnvir.Now.AddSeconds(-10))
{
hideChat = true;
}
}
HideChat = hideChat;
}
this partially fixed it, it still discolors when Pressing "options" in the chat settings though
`public void TransparencyChanged() {
if (Panel.TransparentCheckBox.Checked)
{
ScrollBar.Visible = false;
DrawTexture = false;
DrawOtherBorder = false;
AllowResize = false;
if (CurrentTabControl.SelectedTab == this)
{
foreach (DXButton button in CurrentTabControl.TabButtons)
{
// Check if the parent grid of the button is not a Belt grid type
var parentGrid = button.Parent as DXItemGrid;
if (parentGrid != null && parentGrid.GridType != GridType.Belt)
{
button.Opacity = 0.5f; // Apply transparency
}
}
}
// Apply opacity change to labels that are NOT part of the belt
foreach (var label in History.Select(x => x.Label).Where(label => label != null))
{
var parentGrid = label.Parent as DXItemGrid;
if (parentGrid != null && parentGrid.GridType != GridType.Belt)
{
label.Opacity = 0.5f; // Apply transparency to non-belt labels
}
}
}
else
{
ScrollBar.Visible = true;
DrawTexture = true;
AllowResize = true;
DrawOtherBorder = true;
if (CurrentTabControl.SelectedTab == this)
{
// Reset opacity for buttons that are NOT part of the belt
foreach (DXButton button in CurrentTabControl.TabButtons)
{
var parentGrid = button.Parent as DXItemGrid;
if (parentGrid != null && parentGrid.GridType != GridType.Belt)
{
button.Opacity = 1f; // Reset opacity
}
}
}
// Reset opacity for labels that are NOT part of the belt
foreach (var label in History.Select(x => x.Label).Where(label => label != null))
{
var parentGrid = label.Parent as DXItemGrid;
if (parentGrid != null && parentGrid.GridType != GridType.Belt)
{
label.Opacity = 1f; // Reset opacity for non-belt labels
}
}
}
// Update label colors after transparency change
foreach (DXLabel label in History.Select(x => x.Label))
{
UpdateColours(label);
}
}`
This fixes the transparency when pressing "options" but breaks the transparency of the chat tabs , cant find a way to fix both. i think its better not to use this bit, as the belt slot 1 only dims slightly when options is open, and its better then chat tabs with out transparancy