Hello everyone, help me find a solution. In my application I want to use the UISlider. In the examples bundled with the framework, there are I need example code for using UISlider. But it works only in the web version of the app. When I compile a project for ios, UISlider does not appear. I many have tried, but I never managed to get it all to work! Please help me find the problem!
PS: I use a translator, sorry for my “broken” English.
var mnemonicModeInterfaceLayer = cc.Layer.extend({
size: null,
ctor:function () {
this._super();
this.init();
},
init: function() {
this.size = cc.winSize;
var volume_sldr = new ccui.Slider();
volume_sldr.setTouchEnabled(true);
volume_sldr.loadBarTexture(res.volume_slider_path_png);
volume_sldr.loadSlidBallTextures(res.volume_slider_btn_png, res.volume_slider_btn_png, "");
volume_sldr.loadProgressBarTexture(res.volume_slider_path_png);
volume_sldr.x = this.size.width * 955 / 1000;
volume_sldr.y = this.size.height * 17 / 100;
volume_sldr.rotation = -90;
volume_sldr.addEventListener(this.sliderEvent, this);
this.addChild(volume_sldr, 3);
}});