mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 16:25:47 -04:00
add columns for x/y offsets to patch list
This commit is contained in:
parent
5a6628834b
commit
df4db6ed3c
1 changed files with 12 additions and 2 deletions
|
@ -62,7 +62,7 @@ class HellowWorldGTK:
|
||||||
row = model[path[0]][0]
|
row = model[path[0]][0]
|
||||||
selected_patches = self.wTree.get_widget("selected_patches")
|
selected_patches = self.wTree.get_widget("selected_patches")
|
||||||
model = selected_patches.get_model()
|
model = selected_patches.get_model()
|
||||||
model.append(None, [ row ])
|
model.append(None, [ row, 0, 0 ])
|
||||||
# redraw the rhs. a bit hacky
|
# redraw the rhs. a bit hacky
|
||||||
lhs = self.wTree.get_widget("texture_list")
|
lhs = self.wTree.get_widget("texture_list")
|
||||||
offs,col = lhs.get_cursor()
|
offs,col = lhs.get_cursor()
|
||||||
|
@ -197,7 +197,7 @@ class HellowWorldGTK:
|
||||||
|
|
||||||
# prepare the patch list
|
# prepare the patch list
|
||||||
patch_list = self.wTree.get_widget("selected_patches")
|
patch_list = self.wTree.get_widget("selected_patches")
|
||||||
treestore = gtk.TreeStore(str)
|
treestore = gtk.TreeStore(str,int,int)
|
||||||
column = gtk.TreeViewColumn('Patch name')
|
column = gtk.TreeViewColumn('Patch name')
|
||||||
patch_list.set_model(treestore)
|
patch_list.set_model(treestore)
|
||||||
patch_list.append_column(column)
|
patch_list.append_column(column)
|
||||||
|
@ -205,6 +205,16 @@ class HellowWorldGTK:
|
||||||
column.pack_start(cell, False)
|
column.pack_start(cell, False)
|
||||||
column.add_attribute(cell, "text", 0)
|
column.add_attribute(cell, "text", 0)
|
||||||
|
|
||||||
|
column = gtk.TreeViewColumn('X offset')
|
||||||
|
patch_list.append_column(column)
|
||||||
|
column.pack_start(cell, False)
|
||||||
|
column.add_attribute(cell, "text", 1) # ?
|
||||||
|
|
||||||
|
column = gtk.TreeViewColumn('Y offset')
|
||||||
|
patch_list.append_column(column)
|
||||||
|
column.pack_start(cell, False)
|
||||||
|
column.add_attribute(cell, "text", 2) # ?
|
||||||
|
|
||||||
# populate the RHS list with patch names
|
# populate the RHS list with patch names
|
||||||
# yes, I learnt perl once.
|
# yes, I learnt perl once.
|
||||||
patches = {}
|
patches = {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue