summaryrefslogtreecommitdiffstats
path: root/Gui/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'Gui/app.c')
-rw-r--r--Gui/app.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/Gui/app.c b/Gui/app.c
index b58e649aa8..346a93131a 100644
--- a/Gui/app.c
+++ b/Gui/app.c
@@ -154,3 +154,41 @@ int appFindMessage( unsigned char * str )
if ( !strcmp( evNames[i].name,str ) ) return evNames[i].msg;
return -1;
}
+
+void btnModify( int event,float state )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+ if ( appMPlayer.Items[j].msg == event )
+ {
+ switch ( appMPlayer.Items[j].type )
+ {
+ case itButton:
+ appMPlayer.Items[j].pressed=(int)state;
+ appMPlayer.Items[j].tmp=(int)state;
+ break;
+ case itPotmeter:
+ case itHPotmeter:
+ if ( state < 0.0f ) state=0.0f;
+ if ( state > 100.f ) state=100.0f;
+ appMPlayer.Items[j].value=state;
+ break;
+ }
+ }
+}
+
+float btnGetValue( int event )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+ if ( appMPlayer.Items[j].msg == event ) return appMPlayer.Items[j].value;
+ return 0;
+}
+
+void btnSet( int event,int set )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+ if ( appMPlayer.Items[j].msg == event ) appMPlayer.Items[j].disabled=set;
+}
+ \ No newline at end of file