Fixed sensors position and dimension

This commit is contained in:
fgnm
2021-06-09 21:05:02 +02:00
parent 40ad3fd236
commit 1c8e8b98a4
5 changed files with 12 additions and 9 deletions
+3 -1
View File
@@ -4,7 +4,7 @@
- Experimental support to Normal Mapping in lights:
* Simple Images
- Add light `intensity`
- Add Box2D Body Sensors
- Add Physics Sensors
= Editor =
- Use Distance Field fonts for GUI
@@ -15,6 +15,8 @@
* Sprite and Spine animated Tiles
* UI improvements and general refactoring
* Import Tile Set (`Resources -> Import Tile Set`)
* Drop multiple tiles at once
* Sort tiles with drag and drop
= Runtime =
- Fix Lights positioning issues
@@ -33,7 +33,7 @@ import com.kotcrab.vis.ui.widget.VisWindow;
* Created by sargis on 4/29/15.
*/
public class UICollapsibleBox extends VisWindow {
protected static final int BOX_DEFAULT_WIDTH = 240;
protected static final int BOX_DEFAULT_WIDTH = 250;
private final VisImageButton collapsibleButton;
private final VisTable mainTable;
@@ -71,7 +71,7 @@ public class UIBasicItemPropertiesMediator extends UIItemPropertiesMediator<Enti
public static final String POLYGON_COMPONENT_KEY = "Polygon";
public static final String PHYSICS_COMPONENT_KEY = "Physics";
public static final String SENSOR_COMPONENT_KEY = "Sensors";
public static final String SENSOR_COMPONENT_KEY = "Physics Sensors";
public static final String SHADER_COMPONENT_KEY = "Shader";
public static final String LIGHT_COMPONENT_KEY = "Light";
public static final String TYPING_LABEL_COMPONENT_KEY = "Typing Label";
@@ -224,6 +224,7 @@ public class UIBasicItemPropertiesMediator extends UIItemPropertiesMediator<Enti
componentsToAddList.add(componentName);
}
}
componentsToAddList.sort();
viewComponent.setNonExistentComponents(componentsToAddList);
}
@@ -35,7 +35,7 @@ public class UISensorProperties extends UIRemovableProperties {
private VisValidatableTextField sensorSpanPercentTop;
public UISensorProperties() {
super("Sensors");
super("Physics Sensors");
initView();
initTooltip();
@@ -80,10 +80,10 @@ public class UISensorProperties extends UIRemovableProperties {
* Initializes the tooltips.
*/
private void initTooltip() {
StandardWidgetsFactory.addVisTooltip(sensorBottom, "Adds a sensor to the bottom of the body. The value gives the percentage of the body width where 1.0 equals 100 %.");
StandardWidgetsFactory.addVisTooltip(sensorLeft, "Adds a sensor to the left of the body. The value gives the percentage of the body height where 1.0 equals 100 %.");
StandardWidgetsFactory.addVisTooltip(sensorRight, "Adds a sensor to the bottom of the body. The value gives the percentage of the body height where 1.0 equals 100 %.");
StandardWidgetsFactory.addVisTooltip(sensorTop, "Adds a sensor to the bottom of the body. The value gives the percentage of the body width where 1.0 equals 100 %.");
StandardWidgetsFactory.addVisTooltip(sensorBottom, "Adds a sensor to the bottom of the body.\nThe value gives the percentage of\nthe body width where 1.0 equals 100%.");
StandardWidgetsFactory.addVisTooltip(sensorLeft, "Adds a sensor to the left of the body.\nThe value gives the percentage of\nthe body height where 1.0 equals 100%.");
StandardWidgetsFactory.addVisTooltip(sensorRight, "Adds a sensor to the right of the body.\nThe value gives the percentage of\nthe body height where 1.0 equals 100%.");
StandardWidgetsFactory.addVisTooltip(sensorTop, "Adds a sensor to the top of the body.\nThe value gives the percentage of\nthe body width where 1.0 equals 100%.");
}
private void initListeners() {