|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.stellarium.ui.fader.Fader org.stellarium.ui.fader.LinearFader
public class LinearFader
Please note that state is updated instantaneously, so if you need to draw something fading in and out, you need to check the interstate value (!=0) to know to draw when on AND during transitions
Field Summary | |
---|---|
protected int |
counter
|
protected int |
duration
|
protected float |
interstate
|
protected boolean |
is_transiting
|
protected float |
start_value
|
protected float |
target_value
|
Fields inherited from class org.stellarium.ui.fader.Fader |
---|
max_value, min_value, state |
Constructor Summary | |
---|---|
LinearFader()
Create and initialise to default |
|
LinearFader(int _duration,
float _min_value, float _max_value, boolean _state)
Create and initialise to default |
Method Summary | |
---|---|
float |
getInterstate()
Get current switch state |
float |
getInterstatePercentage()
|
boolean |
hasInterstate()
|
Fader |
set(boolean s)
Faders can be used just as bools |
void |
setDuration(int _duration)
|
void |
setMaxValue(float _max)
|
void |
setMinValue(float _min)
|
void |
update(int delta_ticks)
Increments the internal counter of delta_time ticks |
Methods inherited from class org.stellarium.ui.fader.Fader |
---|
booleanValue, equals, getState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean is_transiting
protected int duration
protected float start_value
protected float target_value
protected int counter
protected float interstate
Constructor Detail |
---|
public LinearFader()
public LinearFader(int _duration, float _min_value, float _max_value, boolean _state)
_duration
-
_min_value
-
_max_value
-
_state
-
Method Detail |
---|
public void update(int delta_ticks)
update
in class Fader
public float getInterstate()
getInterstate
in
class Fader
public float getInterstatePercentage()
getInterstatePercentage
in class Fader
public Fader set(boolean s)
set
in class Fader
public void setDuration(int _duration)
setDuration
in
class Fader
public void setMinValue(float _min)
setMinValue
in
class Fader
public void setMaxValue(float _max)
setMaxValue
in
class Fader
public boolean hasInterstate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |