Code Monkey home page Code Monkey logo

Comments (5)

nyfair avatar nyfair commented on August 27, 2024

Which UI plugin are you using?
I just checked with WSH panels progress bar and fb2k's default progress bar, both of them stop at the end.

from foo_thbgm.

CarterLi avatar CarterLi commented on August 27, 2024

(Foobox 4)[http://tieba.baidu.com/p/3238830600?pn=1]. You may download it here:
http://pan.baidu.com/s/1kTIF6wn#path=%252Ffbx_latest_version

default

from foo_thbgm.

nyfair avatar nyfair commented on August 27, 2024

That progress bar is controlled by JScript code, you should ask its author to fix this
FYI
http://www.fooblog2000.com/2007-02/how-to-make-a-progress-bar/

from foo_thbgm.

CarterLi avatar CarterLi commented on August 27, 2024

Althougth the url you gave me doesn't help, I managed to find out where the progress bar is painted myself.

// skin\foobox\guiext.js: 28
this.Paint = function(gr){
    if(this.Enabled){
        var progress = this.Value/(this.MaxValue - this.MinValue);
        if (progress > 1) {
            progress -= progress | 0;
        }
        var pos = (progress*this.Width)|0;
        if(fixedWidth){
            gr.DrawImage(ImgBg,this.X,this.Y,this.Width,h,0,0,ImgBg.Width,h,0);
            gr.DrawImage(ImgOverlay,this.X,this.Y,pos,h,0,0,pos,h,0);
        }
        else{
            DrawThemedBox(gr,this.X,this.Y,this.Width,h,ImgBg,paddingLeft,0,paddingRight,0);
            DrawThemedBox(gr,this.X,this.Y,pos,h,ImgOverlay,paddingLeft,0,paddingRight,0);
        }
        gr.DrawImage(ImgKnob,Math.floor(this.X+pos-(ImgKnob.Width/2)),this.Y,ImgKnob.Width,ImgKnob.Height,0,0,ImgKnob.Width,ImgKnob.Height,0);
    }
}

Simply reset the position to 0 if it exceeds 1. The code is ugly but it works...

from foo_thbgm.

nyfair avatar nyfair commented on August 27, 2024

lol, awesome

from foo_thbgm.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.