Closed kianzarrin closed 4 years ago
Does anyone know what is the name of that top panel ?
Mod Tools might be able to give some insight in to the panel name. It has a feature that lets you click on any interface element to see details about it. https://steamcommunity.com/sharedfiles/filedetails/?id=450877484
UPDATE 3.2.0 (7/26/2019) Added: Selection Tool (Ctrl+M or UI button) - allows to select anything and show in SceneExplorer
@aubergine10 Added: Selection Tool (Ctrl+M or UI button) - allows to select anything and show in SceneExplorer
Mod tools selection tool only works on segments as far as I can tell. I tried it your way activated mod tools selection tool and clicked on the warning panel. But nothing happened in the scene explorer.
There is also a button in scene explorer to show active tool. but the warning panel is not a tool so that's a dead end too.
try Ctrl+R
I followed the decompiled code and stumbled upon this:
// RoadBaseAI
using ColossalFramework;
public override void UpgradeFailed()
{
GuideController properties = Singleton<GuideManager>.instance.m_properties;
if ((object)properties != null)
{
Singleton<NetManager>.instance.m_upgradeExistingRoad.Activate(properties.m_upgradeExistingRoad);
}
}
Yup, GuideManager
spawns popups, so you should search there how to add new popup/set text. You can use ModTools UI debugger view (Ctrl+R
- pretty slow but does its job) to find out which panel is used
Progress report:
ToolBase.SimulationStep()
override otherwise it might not work.I made my own guide wrapper and made it work with built in messages (see code snippet)
public class GuideWrapper {
private GenericGuide m_guide;
public GuideInfo m_info;
public GuideWrapper() {
m_guide = new GenericGuide();
m_info = new GuideInfo {
m_delayType = GuideInfo.Delay.OccurrenceCount,
m_displayDelay = 1,
m_repeatDelay = 1, //3
m_overrideOptions = true,
m_icon = "ToolbarIconRoads",
m_tag = "Generic",
m_name = "RoadUpgradeNonroad",
};
}
public void Activate() =>m_guide?.Activate(m_info ?? throw new Exception("m_info is null"));
public void Deactivate() => m_guide?.Deactivate();
public static GuideWrapper example = new GuideWrapper();
}
EDIT: i managed to insert my own messages and icon.
I need someone to help me to create new crowdin file for guide messages.
In some circumistances when the user makes a small mistake and we want to explain why TM does not make any changes to traffic rules I think its better to show a message like this:
Rather than an ugly annoying panel like this:
This mostly resolves #594