Skip to content

Commit

Permalink
Merge pull request #2 from phyohtetarkar/develop
Browse files Browse the repository at this point in the history
add version label
  • Loading branch information
phyohtetarkar authored Nov 5, 2023
2 parents 05f0d24 + 0686a37 commit 0e452f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.badlogic.gdx.utils.Scaling;
import com.kotcrab.vis.ui.VisUI;
import com.kotcrab.vis.ui.util.adapter.ArrayAdapter;
import com.kotcrab.vis.ui.widget.Tooltip;
import com.kotcrab.vis.ui.widget.VisImage;
import com.kotcrab.vis.ui.widget.VisLabel;
import com.kotcrab.vis.ui.widget.VisTable;
Expand All @@ -35,13 +36,15 @@ protected VisTable createView(RigidBodyModel item) {
subtitleLabel.setColor(1, 1, 1, 0.7f);
subtitleLabel.setEllipsis(true);


VisImage image = new VisImage();
image.setScaling(Scaling.fit);
String imgPath = item.getImagePath();



if (imgPath != null) {
new Tooltip.Builder(imgPath).target(subtitleLabel).build();
if (item.isImagePathValid()) {
subtitleLabel.setText(imgPath);
try {
Expand Down
9 changes: 9 additions & 0 deletions core/src/com/phyohtet/bodyeditor/PhysicsBodyEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import com.badlogic.gdx.utils.viewport.Viewport;
import com.kotcrab.vis.ui.VisUI;
import com.kotcrab.vis.ui.widget.VisLabel;
import com.kotcrab.vis.ui.widget.VisScrollPane;
import com.kotcrab.vis.ui.widget.VisTable;
import com.kotcrab.vis.ui.widget.file.FileChooser;
Expand All @@ -27,6 +28,8 @@
*/
public class PhysicsBodyEditor extends Game {

public static final String version = "v1.0.0";

SpriteBatch batch;

Stage stage;
Expand Down Expand Up @@ -62,6 +65,9 @@ public void create() {
RigidBodyListAdapter adapter = new RigidBodyListAdapter(new Array<>());
RigidBodiesListActor rigidBodiesListActor = new RigidBodiesListActor(adapter);

VisLabel versionLabel = new VisLabel(version);
versionLabel.setColor(1, 1, 1, 0.8f);


VisTable rightPanel = new VisTable(false);
rightPanel.top().left();
Expand All @@ -75,6 +81,9 @@ public void create() {
rightPanel.row();
rightPanel.addSeparator();
rightPanel.add(rigidBodiesListActor.getMainTable()).expandY().fill();
rightPanel.row();
rightPanel.addSeparator();
rightPanel.add(versionLabel).right().padRight(10).padTop(8).padBottom(8).expandX();

table.add(optionsPanel).height(Canvas.OFFSET_Y).expandX().fillX().left().top();
table.addSeparator(true);
Expand Down

0 comments on commit 0e452f1

Please sign in to comment.