Skip to content

Commit

Permalink
Added missing tooltips to the spawn menu, adjusted some tooltips to b…
Browse files Browse the repository at this point in the history
…etter describe the function of the gui element
  • Loading branch information
8vogt committed Mar 9, 2021
1 parent 044304e commit d086630
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
6 changes: 6 additions & 0 deletions SEWorldGenPlugin/GUI/AdminMenu/MyPluginAdminMenu.SpawnMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private void BuildSpawnMenu()
m_spawnTypeCombo.SelectItemByKey(m_spawnType);
m_spawnTypeCombo.ItemSelected += OnSpawnTypeChange;
m_spawnTypeCombo.Size = new Vector2(m_usableWidth * 0.9f, m_spawnTypeCombo.Size.Y);
m_spawnTypeCombo.SetToolTip(MyPluginTexts.TOOLTIPS.ADMIN_SPAWN_TYPE);

table.AddTableRow(m_spawnTypeCombo);

Expand Down Expand Up @@ -143,6 +144,7 @@ private void CreatePlanetSpawnMenu(MyGuiControlParentTableLayout table)
m_planetSizeSlider = new MyGuiControlClickableSlider(null, 1f, settings.PlanetSettings.PlanetSizeCap, m_usableWidth - 0.1f, intValue: true, showLabel: true, labelSuffix: " m");
m_planetSizeSlider.DefaultValue = Math.Min(120000, settings.PlanetSettings.PlanetSizeCap);
m_planetSizeSlider.Value = m_planetSizeSlider.DefaultValue.Value;
m_planetSizeSlider.SetToolTip(MyPluginTexts.TOOLTIPS.ADMIN_PLANET_DIAM);

table.AddTableRow(m_planetSizeSlider);

Expand All @@ -154,6 +156,7 @@ private void CreatePlanetSpawnMenu(MyGuiControlParentTableLayout table)

m_nameBox = new MyGuiControlTextbox();
m_nameBox.Size = new Vector2(m_usableWidth, m_nameBox.Size.Y);
m_nameBox.SetToolTip(MyPluginTexts.TOOLTIPS.ADMIN_NAME);

table.AddTableRow(m_nameBox);

Expand All @@ -164,6 +167,7 @@ private void CreatePlanetSpawnMenu(MyGuiControlParentTableLayout table)
OnSpawnPlanet();
});
m_spawnPlanetButton.Enabled = false;
m_spawnPlanetButton.SetToolTip(MyPluginTexts.TOOLTIPS.ADMIN_PLANET_SPAWN);

table.AddTableRow(m_spawnPlanetButton);

Expand All @@ -172,6 +176,7 @@ private void CreatePlanetSpawnMenu(MyGuiControlParentTableLayout table)
OnSpawnPlanet(true);
});
m_spawnPlanetCoordsButton.Enabled = false;
m_spawnPlanetCoordsButton.SetToolTip(MyPluginTexts.TOOLTIPS.ADMIN_PLANET_SPAWN_COORD);

table.AddTableRow(m_spawnPlanetCoordsButton);

Expand Down Expand Up @@ -217,6 +222,7 @@ private void CreateAsteroidSpawnMenu(MyGuiControlParentTableLayout table)
RecreateControls(false);
};
m_asteroidTypeCombo.Size = new Vector2(m_usableWidth * 0.9f, m_asteroidTypeCombo.Size.Y);
m_asteroidTypeCombo.SetToolTip(MyPluginTexts.TOOLTIPS.ADMIN_ROID_TYPE);

table.AddTableRow(m_asteroidTypeCombo);

Expand Down
29 changes: 13 additions & 16 deletions SEWorldGenPlugin/Utilities/MyPluginTexts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,30 @@ public class MyPluginTexts
/// </summary>
public class ToolTips
{
public readonly string SYS_GEN_MODE_COMBO = "The mode of the star system generator for this world.";
public readonly string ASTEROID_GEN_MODE_COMBO = "The mode of the asteroid generator for this world.";
public readonly string VANILLA_PLANETS_CHECK = "If vanilla planets can be used for system generation.";
public readonly string PLANET_COUNT_SLIDER = "The minimum and maximum possible amount of planets in this world.";
public readonly string ASTEROID_COUNT_SLIDER = "The minimum and maximum possible amount of asteroid objects in this world.";
public readonly string SYS_GEN_MODE_COMBO = "The generation method for planets and moons to use with this world.";
public readonly string ASTEROID_GEN_MODE_COMBO = "The type of asteroid generator to use for this world.";
public readonly string VANILLA_PLANETS_CHECK = "Whether vanilla planets are allowed to be generated by the plugin.";
public readonly string PLANET_COUNT_SLIDER = "The minimum and maximum amount of planets in the system. The generator will choose a random number in this range. To specify an exact amount, set min and max equal.";
public readonly string ASTEROID_COUNT_SLIDER = "The minimum and maximum amount of asteroid objects, such as asteroid belts, in the system. This does not include asteroid rings around planets currently. " +
"The generator will choose a random number in this range. To specify an exact amount, set min and max equal.";
public readonly string ORBIT_DISTANCE_SLIDER = "The range for orbit distances between the system objects. In KM";
public readonly string ASTEROID_DENS_SLIDER = "The density for asteroid generation. 1 is the densest.";
public readonly string WORLD_SIZE_SLIDER = "The max size of the system. After that nothing will be generated. In KM";
public readonly string PLANET_SIZE_CAP_SLIDER = "The max size a planet can have in this system. In metres";
public readonly string PLANET_SIZE_MULT = "The multiplier for the planets size. 1G planet equals to 120km * this value. A gas giant will be double the size.";
public readonly string PLANET_SIZE_MULT = "The multiplier for the planets size. 1G planet equals to 120km * this value. Gravity is fixed for each planet, only Diameter will be affected. A gas giant will be double the size.";
public readonly string PLANET_MOON_PROP = "The base probability for a planet to generate moons. Scales with gravity, so higher gravity means higher probability.";
public readonly string PLANET_RING_PROP = "The base probability for a planet to generate a ring. Scales with gravity, so higher gravity means higher probability.";
public readonly string PLANET_MOON_COUNT = "The minimum and maximum limits for the amount of moons around a planet.";
public readonly string PLANET_GPS_COMBO = "The generation mode for planet gpss. Discovery means a player needs to be within 50k km to see the dynamic gps.";
public readonly string MOON_GPS_COMBO = "The generation mode for moons gpss. Discovery means a player needs to be within 50k km to see the dynamic gps.";
public readonly string ASTEROID_GPS_COMBO = "The generation mode for asteroid gpss. Discovery means a player needs to be within 50k km to see the dynamic gps.";

public readonly string ADMIN_RING_DISTANCE = "The distance of the ring to the planet in meters";
public readonly string ADMIN_RING_WIDTH = "The width of the ring in meters";
public readonly string ADMIN_RING_ANGLE = "The angle of the ring around the wanted axis in degrees";
public readonly string ADMIN_RING_ROID_SIZE = "The minimum size of the asteroids in the ring in meters";
public readonly string ADMIN_RING_ROID_SIZE_MAX = "The maximum size of the asteroids in the ring in meters.";
public readonly string ADMIN_ADD_RING_BUTTON = "Adds the ring to the planet";
public readonly string ADMIN_REMOVE_RING_BUTTON = "Removes the ring from the planet. All previously generated Asteroids will stay.";
public readonly string ADMIN_TP_RING_BUTTON = "Teleports your player to the ring of the planet";
public readonly string ADMIN_PLANET_SIZE = "The size of the planet in kilometers";
public readonly string ADMIN_SPAWN_PLANET = "Spawns the planet with given size";
public readonly string ADMIN_SPAWN_TYPE = "The type of system object you want to spawn";
public readonly string ADMIN_PLANET_DIAM = "The diameter of the planet";
public readonly string ADMIN_PLANET_SPAWN = "Activates the mode to spawn the planet where you place it";
public readonly string ADMIN_PLANET_SPAWN_COORD = "Opens a message to enter the coordinate, where the planet will be spawned";
public readonly string ADMIN_ROID_TYPE = "The type of asteroid object to spawn";
public readonly string ADMIN_NAME = "The name of this object";
}

/// <summary>
Expand Down

0 comments on commit d086630

Please sign in to comment.