turbo a and b support forr GUI

This commit is contained in:
punkrockguy318 2008-12-05 07:37:43 +00:00
parent 5eda05d2b4
commit 1fdb739619
4 changed files with 108 additions and 34 deletions

View File

@ -1,3 +1,4 @@
* Turbo A and Turbo B support for gamepad GUI
* Added initial support for a graphical UI for configuring gamepads * Added initial support for a graphical UI for configuring gamepads
* Moved gfceu options data file into .fceux instead of .fceultra * Moved gfceu options data file into .fceux instead of .fceultra
================= version 2.0.3 ================================= ================= version 2.0.3 =================================

19
gfceux
View File

@ -564,14 +564,17 @@ class GfceuxApp:
def button_clicked(self, widget, data=None): def button_clicked(self, widget, data=None):
d = {'right_button' : "SDL.Input.GamePad." + self.gamepad_config + "Right", prefix = "SDL.Input.GamePad" + self.gamepad_config
'left_button' : "SDL.Input.GamePad." + self.gamepad_config + "Left", d = {'right_button' : prefix + "Right",
'up_button' : "SDL.Input.GamePad." + self.gamepad_config + "Up", 'left_button' : prefix + "Left",
'down_button' : "SDL.Input.GamePad." + self.gamepad_config + "Down", 'up_button' : prefix + "Up",
'select_button' : "SDL.Input.GamePad." + self.gamepad_config + "Select", 'down_button' : prefix + "Down",
'start_button' : "SDL.Input.GamePad." + self.gamepad_config + "Start", 'select_button' : prefix + "Select",
'a_button' : "SDL.Input.GamePad." + self.gamepad_config + "A", 'start_button' : prefix + "Start",
'b_button' : "SDL.Input.GamePad." + self.gamepad_config + "B"} 'a_button' : prefix + "A",
'b_button' : prefix + "B",
'turbo_a_button' : prefix + "TurboA",
'turbo_b_button' : prefix + "TurboB"}
kg = KeyGrabber() kg = KeyGrabber()
key = kg.get_key() key = kg.get_key()
cp = FceuxConfigParser(configfile) cp = FceuxConfigParser(configfile)

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.5 on Tue Dec 2 15:32:04 2008 --> <!--Generated with glade3 3.4.5 on Fri Dec 5 02:36:02 2008 -->
<glade-interface> <glade-interface>
<widget class="GtkWindow" id="gamepad_config_window"> <widget class="GtkWindow" id="gamepad_config_window">
<signal name="destroy" handler="gamepad_window_close"/> <signal name="destroy" handler="gamepad_window_close"/>
@ -188,26 +188,62 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="left_padding">12</property> <property name="left_padding">12</property>
<child> <child>
<widget class="GtkHBox" id="hbox5"> <widget class="GtkVBox" id="vbox1">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<widget class="GtkButton" id="b_button"> <widget class="GtkHBox" id="hbox5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <child>
<property name="receives_default">True</property> <widget class="GtkButton" id="b_button">
<property name="label" translatable="yes">B</property> <property name="visible">True</property>
<property name="response_id">0</property> <property name="can_focus">True</property>
<signal name="clicked" handler="button_clicked"/> <property name="receives_default">True</property>
<property name="label" translatable="yes">B</property>
<property name="response_id">0</property>
<signal name="clicked" handler="button_clicked"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="a_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">A</property>
<property name="response_id">0</property>
<signal name="clicked" handler="button_clicked"/>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget> </widget>
</child> </child>
<child> <child>
<widget class="GtkButton" id="a_button"> <widget class="GtkHBox" id="hbox14">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <child>
<property name="receives_default">True</property> <widget class="GtkButton" id="turbo_b_button">
<property name="label" translatable="yes">A</property> <property name="visible">True</property>
<property name="response_id">0</property> <property name="can_focus">True</property>
<signal name="clicked" handler="button_clicked"/> <property name="receives_default">True</property>
<property name="label" translatable="yes">Turbo B</property>
<property name="response_id">0</property>
<signal name="clicked" handler="button_clicked"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="turbo_a_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">Turbo A</property>
<property name="response_id">0</property>
<signal name="clicked" handler="button_clicked"/>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget> </widget>
<packing> <packing>
<property name="position">1</property> <property name="position">1</property>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--Generated with glade3 3.4.5 on Tue Dec 2 15:32:04 2008 --> <!--Generated with glade3 3.4.5 on Fri Dec 5 02:36:02 2008 -->
<interface> <interface>
<object class="GtkAdjustment" id="adjustment1"> <object class="GtkAdjustment" id="adjustment1">
<property name="upper">5</property> <property name="upper">5</property>
@ -207,24 +207,58 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="left_padding">12</property> <property name="left_padding">12</property>
<child> <child>
<object class="GtkHBox" id="hbox5"> <object class="GtkVBox" id="vbox1">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkButton" id="b_button"> <object class="GtkHBox" id="hbox5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <child>
<property name="receives_default">True</property> <object class="GtkButton" id="b_button">
<property name="label" translatable="yes">B</property> <property name="visible">True</property>
<signal handler="button_clicked" name="clicked"/> <property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">B</property>
<signal handler="button_clicked" name="clicked"/>
</object>
</child>
<child>
<object class="GtkButton" id="a_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">A</property>
<signal handler="button_clicked" name="clicked"/>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object> </object>
</child> </child>
<child> <child>
<object class="GtkButton" id="a_button"> <object class="GtkHBox" id="hbox14">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <child>
<property name="receives_default">True</property> <object class="GtkButton" id="turbo_b_button">
<property name="label" translatable="yes">A</property> <property name="visible">True</property>
<signal handler="button_clicked" name="clicked"/> <property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">Turbo B</property>
<signal handler="button_clicked" name="clicked"/>
</object>
</child>
<child>
<object class="GtkButton" id="turbo_a_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">Turbo A</property>
<signal handler="button_clicked" name="clicked"/>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="position">1</property> <property name="position">1</property>