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
* Moved gfceu options data file into .fceux instead of .fceultra
================= version 2.0.3 =================================

19
gfceux
View File

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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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>
<widget class="GtkWindow" id="gamepad_config_window">
<signal name="destroy" handler="gamepad_window_close"/>
@ -187,6 +187,9 @@
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<child>
<widget class="GtkHBox" id="hbox5">
<property name="visible">True</property>
@ -215,6 +218,39 @@
</child>
</widget>
</child>
<child>
<widget class="GtkHBox" id="hbox14">
<property name="visible">True</property>
<child>
<widget class="GtkButton" id="turbo_b_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<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>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>

View File

@ -1,5 +1,5 @@
<?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>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">5</property>
@ -206,6 +206,9 @@
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<child>
<object class="GtkHBox" id="hbox5">
<property name="visible">True</property>
@ -232,6 +235,37 @@
</child>
</object>
</child>
<child>
<object class="GtkHBox" id="hbox14">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="turbo_b_button">
<property name="visible">True</property>
<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>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">