File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
engine/src/main/java/org/terasology/rendering/nui/widgets Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,8 @@ Contributors
256256 [ rezonant] ( https://github.com/rezonant ) ,
257257 [ fishfred] ( https://github.com/fishfred ) ,
258258 [ Snooober] ( https://github.com/Snooober ) ,
259- [ costinvisan] ( https://github.com/costinvisan )
259+ [ costinvisan] ( https://github.com/costinvisan ) ,
260+ [ Vishwaak] ( https://github.com/Vishwaak )
260261* GUI Team:
261262 [ Anton "small-jeeper" Kireev] ( https://github.com/small-jeeper ) ,
262263 [ miniME89] ( https://github.com/miniME89 ) ,
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2014 MovingBlocks
2+ * Copyright 2019 MovingBlocks
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1515 */
1616package org .terasology .rendering .nui .widgets ;
1717
18-
1918import org .terasology .math .geom .Vector2i ;
2019import org .terasology .rendering .assets .texture .TextureRegion ;
2120import org .terasology .rendering .nui .Canvas ;
2726import org .terasology .rendering .nui .databinding .DefaultBinding ;
2827
2928/**
30- * A widget to display an image
29+ * A widget to display an image.
3130 */
3231public class UIImage extends CoreWidget {
3332 @ LayoutConfig
@@ -68,8 +67,7 @@ public void onDraw(Canvas canvas) {
6867 ScaleMode scaleMode = canvas .getCurrentStyle ().getTextureScaleMode ();
6968
7069 if (image .get ().getWidth () > (image .get ().getHeight () * 2 )) {
71-
72- canvas .getCurrentStyle ().setTextureScaleMode (ScaleMode .SCALE_FIT );
70+ canvas .getCurrentStyle ().setTextureScaleMode (ScaleMode .STRETCH );
7371 } else {
7472 canvas .getCurrentStyle ().setTextureScaleMode (ScaleMode .SCALE_FILL );
7573 }
@@ -124,5 +122,4 @@ public void setTint(Color color) {
124122 public void bindTint (Binding <Color > binding ) {
125123 this .tint = binding ;
126124 }
127-
128125}
You can’t perform that action at this time.
0 commit comments