MakodFilu
Group: Members
Posts: 65
Joined: Jan. 2006 |
|
Posted: Feb. 03 2007,01:10 |
|
Quote (^thehatsrule^ @ Jan. 13 2007,17:06) | If you want to, why don't you add the bit depth as well while you're at it? |
Finally done
Code Sample | 4c4 < -- resolution selection by MakoFilu from the DSL forums Jan 14, 2007 --- > -- resolution, bit depth selection by Daniel Plata Lorenzo "MakodFilu" 6c6,9 < w = fltk:Fl_Window(320,120, "Rdesktop") --- > width=400 > height=150 > > w = fltk:Fl_Window(width,height, "Rdesktop") 9c12,13 < sel640x480 = fltk:Fl_Round_Button(2,40,75,25,"640x480") --- > frame1=fltk:Fl_Group(1,69,320,27,"Resolution") > sel640x480 = fltk:Fl_Round_Button(2,70,75,25,"640x480") 13c17 < sel800x600 = fltk:Fl_Round_Button(76,40,75,25,"800x600") --- > sel800x600 = fltk:Fl_Round_Button(76,70,75,25,"800x600") 18c22 < sel1024x768 = fltk:Fl_Round_Button(150,40,83,25,"1024x768") --- > sel1024x768 = fltk:Fl_Round_Button(150,70,83,25,"1024x768") 22c26 < selfull = fltk:Fl_Round_Button(232,40,88,25,"Fullscreen") --- > selfull = fltk:Fl_Round_Button(232,70,88,25,"Fullscreen") 24a29,40 > fltk:Fl_End() > > frame2=fltk:Fl_Group(width-70,30,60,100,"Color Depth") > sel8bit = fltk:Fl_Round_Button(width-65,31,45,25,"8bit") > sel8bit:value(1) > sel8bit:type(fltk.FL_RADIO_BUTTON) > sel8bit:selection_color(fltk.FL_RED) > > sel16bit = fltk:Fl_Round_Button(width-65,60,50,25,"16bit") > sel16bit:type(fltk.FL_RADIO_BUTTON) > sel16bit:selection_color(fltk.FL_RED) > fltk:Fl_End() 26c42 < cancel = fltk:Fl_Button(90,80,70,25,"C&ancel") --- > cancel = fltk:Fl_Button(90,height-40,70,25,"C&ancel") 32c48 < connect = fltk:Fl_Button(160,80,70,25,"&Connect") --- > connect = fltk:Fl_Button(160,height-40,70,25,"&Connect") 38,49c54,60 < if sel800x600:value() == 1 then < os.execute('/usr/bin/rdesktop -g 800x600 ' .. input:value()) < end < if sel640x480:value() == 1 then < os.execute('/usr/bin/rdesktop -g 640x480 ' .. input:value()) < end < if sel1024x768:value() == 1 then < os.execute('/usr/bin/rdesktop -g 1024x768 ' .. input:value()) < end < if selfull:value() == 1 then < os.execute('/usr/bin/rdesktop -f ' .. input:value()) < end --- > if sel800x600:value() == 1 then resolution="-g 800x600 " end > if sel640x480:value() == 1 then resolution="-g 640x480 " end > if sel1024x768:value() == 1 then resolution="-g 1024x768 " end > if selfull:value() == 1 then resolution="-f " end > if sel8bit:value() == 1 then depth="-a 8 " end > if sel16bit:value() == 1 then depth="-a 16 " end > os.execute('/usr/bin/rdesktop '..resolution..depth..input:value())
|
|