I have taken over a project that utilises the Jssor slider control. It works great, and I've managed to solve all but one of the issues I have with it - hopefully this is a simple one!
What I want to do is adjust the amount of time before a new image slides into the frame. I'm confused by this because it looks to be simple according to the instructions - but they don't seem to work for me.
Right now, the control is rotating images automatically. However, my JavaScript code is as follows:
var options = {
$AutoPlay: false,
$AutoPlaySteps: 1,
$Idle: 3000,
$PauseOnHover: 0,
As you'll see, the 'autoplay' setting as 'false'. I've tried changing it to 'true' and adjecting the 'AutoPlayInterval' setting, but it makes no difference to the performance of the control.
I suspect I'm mssing something blindingly obvious, but I can't see it.
Any ideas?
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
$AutoPlayInterval: 6000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, default value is 1
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
$SlideDuration: 6000,
The $SlideDuration (in milliseconds, default value is 500) option indicates the duration to swipe slide left <-> right.
Related
The status bar shown on the bottom of VSCode is too small as it's hard for me to read vim commands that I'll be typing on there. I don't want to increase the font size of the editor nor the zoom since they're big enough for me.
Basically, I want to increase the size (font, icon, bar size, etc.) of the bottom status bar without changing the size of any other component of VSCode.
Is there a way to do that or an extension I can use to change it?
AFAIK there is no setting to adjust the height of the status bar. A common practice is to set the zoom level and decrease the editor and terminal font size, but this will also increase the activity bar icons and other areas.
In your settings.json add
{
...
"window.zoomLevel": 0.5,
"editor.fontSize": 14,
...
}
Adjust zoomLevel to your liking, by default is 0 you should increment the value by the decimal, e.g. 0.1, 0.15 ...
Or in your Settings Cmd + , search for window zoom level and change the value there
I am working with Unity's UI.Text, where I want to show a counter that goes up by 1 every frame. So in Update(), I simply do
count++;
countText.text = count.ToString();
However, instead of the text field getting replaced by the number, the number is drawn on top of the previous number.
I have used UI.Text multiple times before, and never had this issue. What could possibly be happening? Thanks!
You need to add a Camera to your scene. (It says "Display 1 - No cameras rendering" in your screenshot).
Menu -> GameObject -> Camera
Without a Camera and just a Text, what you described will happen - Text will not be cleared between Update calls.
Edit: as per Pluto's comment, also check that Camera's Clear Flags setting is set to Solid Color or Skybox, and not Don't Clear.
I want to zoom in on the map as much as possible when the app starts.
Right now, I can zoom in only to level 16, and then I have to manually pinch to zoom even more.
SKRoutingService.sharedInstance().mapView?.animateToZoomLevel(16.0)
What I've tried but didn't work out was to set up mapZoomLimitmax to 20.0:
SKRoutingService.sharedInstance().mapView.settings.zoomLimits.mapZoomLimitMax = 20.0
SKRoutingService.sharedInstance().mapView?.animateToZoomLevel(20.0)
But that didn't work.
I see the entire planet Earth after I do this.
I know that there must be a way for zooming in more than level 16, because I can pinch-to-zoom after I zoom it in on level 16 programatically.
How can I achieve that?
The max zoom level is 18.999001 (although in the SkDefinitions header file it's indicated that kMaximumZoomLimit has a value of 19.0f I found that setting the zoom level to 19.0 did not really work, whereas 18.999001 worked).
At most what you can do is:
mapView.animateToZoomLevel(18.999001)
The mapZoomLimitMax should be 19.0 (leaving this property untouched also worked in my case). Setting it to higher values won't change anything.
Does Unity 5 support partial hiding of a UI/Image?
For example, the UI/Image I have in my scene has 100 width and 100 height.
At time = 0, the UI/Image is hidden. When time = 5, the UI/Image only shows the first 50 pixels. When time = 10, the UI/Image is fully drawn.
The answer to the question is in this link
Set the image type to Filled
Set the fill method to horizontal
Set the fill origin to left
From the script, update the fill amount from 0 to 1 over the timespan
On first thought, I can come up with two workarounds for this.
If the background of the image-in-question is a solid color, you can use another image with the same color as background that covers the actual image, so that it looks like the actual image is partially revealed. Then, just reduce the length of this covering image over time to achieve a revealing effect using Coroutines.
You make multiple image files with alpha channels and change the textures of the UI/Image over time. Each image will act like an iteration of revealing effect. Say you have 11 images, the 6th image will have first half revealed, and second half as alpha=0. In this case, if you want smoothness, you will need a higher number of images.
I set background image for a button by:
bg_pixmap[NORMAL] = "img.png"
but most of the times the image is offset with certain x, y when:
there is padding around
there is adjacent widgets at left/top
align the button 0.5, 0.5 of an alignment container of larger size
...
how can I specify the background image to alway start from 0, 0 of the button?
EDIT
it seems bg_pixmap is always tiling start from 0, 0 of the window ( but shown only in the button area )....
but when I use bg_pixmap on widgets not has state changes (only NORMAL image is shown), the image is aligned correctly... (e.g. drawing area, event box, etc...)
Looks that Gdk::Window::set_back_pixmap is the function you are looking for. Point is the parent_relative boolean that change the tiling starting point.
C. F.
WORKAROUND
I worked around this and make an "image button" works with rc style file:
add GtkButton inside an EventBox
EventBox -> Visible Window = Yes ( No won't make it work )