Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(559) |
Nov
(772) |
Dec
(914) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(291) |
Feb
(312) |
Mar
(215) |
Apr
(243) |
May
(150) |
Jun
(18) |
Jul
(131) |
Aug
(436) |
Sep
(171) |
Oct
(233) |
Nov
(222) |
Dec
(141) |
2005 |
Jan
(74) |
Feb
(220) |
Mar
(326) |
Apr
(142) |
May
(165) |
Jun
(187) |
Jul
(246) |
Aug
(116) |
Sep
(10) |
Oct
(30) |
Nov
(257) |
Dec
(247) |
2006 |
Jan
(165) |
Feb
(38) |
Mar
(58) |
Apr
(135) |
May
(18) |
Jun
(102) |
Jul
(228) |
Aug
(250) |
Sep
(47) |
Oct
(26) |
Nov
(69) |
Dec
(263) |
2007 |
Jan
(120) |
Feb
(268) |
Mar
(50) |
Apr
(64) |
May
(49) |
Jun
(39) |
Jul
(22) |
Aug
(56) |
Sep
(9) |
Oct
(2) |
Nov
(47) |
Dec
(115) |
2008 |
Jan
(57) |
Feb
(81) |
Mar
(26) |
Apr
(10) |
May
(19) |
Jun
(69) |
Jul
(10) |
Aug
(6) |
Sep
(111) |
Oct
(105) |
Nov
(11) |
Dec
(19) |
2009 |
Jan
(92) |
Feb
(159) |
Mar
(86) |
Apr
(59) |
May
(320) |
Jun
(443) |
Jul
(103) |
Aug
(315) |
Sep
(221) |
Oct
(122) |
Nov
(13) |
Dec
(46) |
2010 |
Jan
(6) |
Feb
(1) |
Mar
(65) |
Apr
(100) |
May
(83) |
Jun
(171) |
Jul
(145) |
Aug
(223) |
Sep
(107) |
Oct
(89) |
Nov
(123) |
Dec
(86) |
2011 |
Jan
(66) |
Feb
(101) |
Mar
(140) |
Apr
(80) |
May
(68) |
Jun
(45) |
Jul
(97) |
Aug
(119) |
Sep
(46) |
Oct
(45) |
Nov
(74) |
Dec
(89) |
2012 |
Jan
(124) |
Feb
(156) |
Mar
(102) |
Apr
(56) |
May
(25) |
Jun
(16) |
Jul
(73) |
Aug
(82) |
Sep
(53) |
Oct
(59) |
Nov
(90) |
Dec
(112) |
2013 |
Jan
(191) |
Feb
(58) |
Mar
(68) |
Apr
(49) |
May
(28) |
Jun
(42) |
Jul
(25) |
Aug
(15) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
(58) |
2014 |
Jan
(100) |
Feb
(2) |
Mar
(4) |
Apr
(1) |
May
(24) |
Jun
(8) |
Jul
(3) |
Aug
(9) |
Sep
(2) |
Oct
(90) |
Nov
(56) |
Dec
(44) |
2015 |
Jan
(51) |
Feb
(40) |
Mar
(7) |
Apr
(11) |
May
(6) |
Jun
(23) |
Jul
(46) |
Aug
(63) |
Sep
(58) |
Oct
(32) |
Nov
(32) |
Dec
(9) |
2016 |
Jan
(5) |
Feb
(8) |
Mar
(12) |
Apr
(24) |
May
(13) |
Jun
(7) |
Jul
(6) |
Aug
(18) |
Sep
(6) |
Oct
(9) |
Nov
(4) |
Dec
(5) |
2017 |
Jan
(6) |
Feb
(3) |
Mar
(13) |
Apr
(2) |
May
(2) |
Jun
(77) |
Jul
(13) |
Aug
(42) |
Sep
(92) |
Oct
(39) |
Nov
(35) |
Dec
(27) |
2018 |
Jan
(20) |
Feb
(17) |
Mar
(47) |
Apr
(75) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(6) |
2
|
3
(2) |
4
(14) |
5
(12) |
6
(4) |
7
|
8
(7) |
9
(4) |
10
(2) |
11
(3) |
12
(2) |
13
(11) |
14
(5) |
15
(11) |
16
(3) |
17
(1) |
18
(2) |
19
|
20
|
21
(3) |
22
|
23
(2) |
24
(3) |
25
|
26
(5) |
27
|
28
|
29
(3) |
30
|
31
|
|
From: <avenger_teambg@us...> - 2008-10-23 16:00:55
|
Revision: 5466 http://gemrb.svn.sourceforge.net/gemrb/?rev=5466&view=rev Author: avenger_teambg Date: 2008-10-23 16:00:48 +0000 (Thu, 23 Oct 2008) Log Message: ----------- added custom portrait feature (with all the updates to iwd/how) Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/how/CharGen.py gemrb/trunk/gemrb/GUIScripts/iwd/CharGen.py Modified: gemrb/trunk/gemrb/GUIScripts/how/CharGen.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/how/CharGen.py 2008-10-23 14:58:07 UTC (rev 5465) +++ gemrb/trunk/gemrb/GUIScripts/how/CharGen.py 2008-10-23 16:00:48 UTC (rev 5466) @@ -39,7 +39,7 @@ GenderDoneButton = 0 Portrait = 0 -PortraitTable = 0 +PortraitsTable = 0 PortraitPortraitButton = 0 RaceButton = 0 @@ -385,7 +385,11 @@ SetColorStat (MyChar, IE_LEATHER_COLOR, 0x16 ) SetColorStat (MyChar, IE_ARMOR_COLOR, 0x17 ) - GemRB.FillPlayerInfo(MyChar, PortraitName+"L", PortraitName+"S") + #does all the rest + LargePortrait = GemRB.GetToken ("LargePortrait") + SmallPortrait = GemRB.GetToken ("SmallPortrait") + GemRB.FillPlayerInfo (MyChar, LargePortrait, SmallPortrait) + #10 is a weapon slot (see slottype.2da row 10) GemRB.CreateItem(MyChar, "staf01", 10, 1, 0, 0) GemRB.SetEquippedQuickSlot(MyChar, 0) @@ -589,13 +593,13 @@ return def PortraitSelect(): - global CharGenWindow, PortraitWindow, Portrait, PortraitPortraitButton, PortraitTable + global CharGenWindow, PortraitWindow, Portrait, PortraitPortraitButton, PortraitsTable GemRB.SetVisible (CharGenWindow, 0) PortraitWindow = GemRB.LoadWindow (11) # this is not the correct one, but I don't know which is - PortraitTable = GemRB.LoadTable ("PICTURES") + PortraitsTable = GemRB.LoadTable ("PICTURES") Portrait = 0 PortraitPortraitButton = GemRB.GetControl (PortraitWindow, 1) @@ -627,43 +631,155 @@ GemRB.SetEvent (PortraitWindow, PortraitCancelButton, IE_GUI_BUTTON_ON_PRESS, "PortraitCancelPress") GemRB.SetText (PortraitWindow, PortraitCancelButton, 13727) - while GemRB.GetTableValue (PortraitTable, Portrait, 0) != GemRB.GetVar ("Gender"): + while GemRB.GetTableValue (PortraitsTable, Portrait, 0) != GemRB.GetVar ("Gender"): Portrait = Portrait + 1 - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") GemRB.SetVisible (PortraitWindow, 1) return def PortraitLeftPress(): - global PortraitWindow, Portrait, PortraitTable, PortraitPortraitButton + global PortraitWindow, Portrait, PortraitsTable, PortraitPortraitButton while True: Portrait = Portrait - 1 if Portrait < 0: - Portrait = GemRB.GetTableRowCount (PortraitTable) - 1 - if GemRB.GetTableValue (PortraitTable, Portrait, 0) == GemRB.GetVar ("Gender"): - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + Portrait = GemRB.GetTableRowCount (PortraitsTable) - 1 + if GemRB.GetTableValue (PortraitsTable, Portrait, 0) == GemRB.GetVar ("Gender"): + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") return def PortraitRightPress(): - global PortraitWindow, Portrait, PortraitTable, PortraitPortraitButton + global PortraitWindow, Portrait, PortraitsTable, PortraitPortraitButton while True: Portrait = Portrait + 1 - if Portrait == GemRB.GetTableRowCount (PortraitTable): + if Portrait == GemRB.GetTableRowCount (PortraitsTable): Portrait = 0 - if GemRB.GetTableValue (PortraitTable, Portrait, 0) == GemRB.GetVar ("Gender"): - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + if GemRB.GetTableValue (PortraitsTable, Portrait, 0) == GemRB.GetVar ("Gender"): + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") return +def CustomDone(): + global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitsTable, Portrait, GenderButton, RaceButton + + Window = CustomWindow + + PortraitName = GemRB.QueryText (Window, PortraitList2) + GemRB.SetToken ("SmallPortrait", PortraitName) + PortraitName = GemRB.QueryText (Window, PortraitList1) + GemRB.SetToken ("LargePortrait", PortraitName) + GemRB.UnloadWindow (Window) + + GemRB.UnloadWindow (PortraitWindow) + GemRB.SetButtonPicture(CharGenWindow, PortraitButton, PortraitName) + GemRB.SetButtonState (CharGenWindow, GenderButton, IE_GUI_BUTTON_DISABLED) + GemRB.SetButtonFlags (CharGenWindow, GenderButton, IE_GUI_BUTTON_DEFAULT, OP_NAND) + GemRB.SetButtonState (CharGenWindow, RaceButton, IE_GUI_BUTTON_ENABLED) + GemRB.SetButtonFlags (CharGenWindow, RaceButton, IE_GUI_BUTTON_DEFAULT, OP_OR) + CharGenState = 1 + Portrait = -1 + SetCharacterDescription() + GemRB.SetVisible (CharGenWindow, 1) + return + +def CustomAbort(): + GemRB.UnloadWindow (CustomWindow) + return + +def LargeCustomPortrait(): + Window = CustomWindow + + Portrait = GemRB.QueryText (Window, PortraitList1) + #small hack + if GemRB.GetVar ("Row1") == RowCount1: + return + + Label = GemRB.GetControl (Window, 0x10000007) + GemRB.SetText (Window, Label, Portrait) + + Button = GemRB.GetControl (Window, 6) + if Portrait=="": + Portrait = "NOPORTMD" + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + else: + if GemRB.QueryText (Window, PortraitList2)!="": + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) + + Button = GemRB.GetControl (Window, 0) + GemRB.SetButtonPicture (Window, Button, Portrait, "NOPORTMD") + return + +def SmallCustomPortrait(): + Window = CustomWindow + + Portrait = GemRB.QueryText (Window, PortraitList2) + #small hack + if GemRB.GetVar ("Row2") == RowCount2: + return + + Label = GemRB.GetControl (Window, 0x10000008) + GemRB.SetText (Window, Label, Portrait) + + Button = GemRB.GetControl (Window, 6) + if Portrait=="": + Portrait = "NOPORTSM" + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + else: + if GemRB.QueryText (Window, PortraitList1)!="": + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) + + Button = GemRB.GetControl (Window, 1) + GemRB.SetButtonPicture (Window, Button, Portrait, "NOPORTSM") + return + def PortraitCustomPress(): + global PortraitList1, PortraitList2 + global RowCount1, RowCount2 + global CustomWindow + + CustomWindow = Window = GemRB.LoadWindow (18) + PortraitList1 = GemRB.GetControl (Window, 2) + RowCount1 = GemRB.GetPortraits (Window, PortraitList1, 0) + GemRB.SetEvent (Window, PortraitList1, IE_GUI_TEXTAREA_ON_CHANGE, "LargeCustomPortrait") + GemRB.SetVar ("Row1", RowCount1) + GemRB.SetVarAssoc (Window, PortraitList1, "Row1",RowCount1) + + PortraitList2 = GemRB.GetControl (Window, 4) + RowCount2 = GemRB.GetPortraits (Window, PortraitList2, 1) + GemRB.SetEvent (Window, PortraitList2, IE_GUI_TEXTAREA_ON_CHANGE, "SmallCustomPortrait") + GemRB.SetVar ("Row2", RowCount2) + GemRB.SetVarAssoc (Window, PortraitList2, "Row2",RowCount2) + + Button = GemRB.GetControl (Window, 6) + GemRB.SetText (Window, Button, 11973) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CustomDone") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + + Button = GemRB.GetControl (Window, 7) + GemRB.SetText (Window, Button, 15416) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CustomAbort") + + Button = GemRB.GetControl (Window, 0) + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait)+"L" + GemRB.SetButtonPicture (Window, Button, PortraitName, "NOPORTMD") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_LOCKED) + + Button = GemRB.GetControl (Window, 1) + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait)+"S" + GemRB.SetButtonPicture (Window, Button, PortraitName, "NOPORTSM") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_LOCKED) + + GemRB.ShowModal (Window, MODAL_SHADOW_NONE) return def PortraitDonePress(): - global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitTable, Portrait, GenderButton, RaceButton + global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitsTable, Portrait, GenderButton, RaceButton - GemRB.UnloadWindow (PortraitWindow) - GemRB.SetButtonPicture(CharGenWindow, PortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "L") + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait ) + GemRB.SetToken ("SmallPortrait", PortraitName+"S") + GemRB.SetToken ("LargePortrait", PortraitName+"L") + GemRB.SetButtonPicture(CharGenWindow, PortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "L") GemRB.SetButtonState (CharGenWindow, GenderButton, IE_GUI_BUTTON_DISABLED) GemRB.SetButtonFlags (CharGenWindow, GenderButton, IE_GUI_BUTTON_DEFAULT, OP_NAND) GemRB.SetButtonState (CharGenWindow, RaceButton, IE_GUI_BUTTON_ENABLED) @@ -671,6 +787,7 @@ CharGenState = 1 SetCharacterDescription() GemRB.SetVisible (CharGenWindow, 1) + GemRB.UnloadWindow (PortraitWindow) return def PortraitCancelPress(): @@ -2049,16 +2166,21 @@ def AppearancePress(): global CharGenWindow, AppearanceWindow, AppearanceTable - global PortraitTable, Portrait, AppearanceAvatarButton, PortraitName + global PortraitsTable, Portrait, AppearanceAvatarButton, PortraitName global AppearanceHairButton, AppearanceSkinButton global AppearanceMajorButton, AppearanceMinorButton global HairColor, SkinColor, MajorColor, MinorColor GemRB.SetVisible (CharGenWindow, 0) AppearanceWindow = GemRB.LoadWindow (13) - PortraitName = GemRB.GetTableRowName (PortraitTable, Portrait) AppearanceTable = GemRB.LoadTable ("PORTCOLR") - PortraitIndex = GemRB.GetTableRowIndex (AppearanceTable, PortraitName + "L") + + if Portrait<0: + PortraitIndex = 0 + else: + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait) + PortraitIndex = GemRB.GetTableRowIndex (AppearanceTable, PortraitName + "L") + HairColor = GemRB.GetTableValue (AppearanceTable, PortraitIndex, 1) GemRB.SetVar ("HairColor", HairColor) SkinColor = GemRB.GetTableValue (AppearanceTable, PortraitIndex, 2) Modified: gemrb/trunk/gemrb/GUIScripts/iwd/CharGen.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd/CharGen.py 2008-10-23 14:58:07 UTC (rev 5465) +++ gemrb/trunk/gemrb/GUIScripts/iwd/CharGen.py 2008-10-23 16:00:48 UTC (rev 5466) @@ -39,7 +39,7 @@ GenderDoneButton = 0 Portrait = 0 -PortraitTable = 0 +PortraitsTable = 0 PortraitPortraitButton = 0 RaceButton = 0 @@ -385,7 +385,11 @@ SetColorStat (MyChar, IE_LEATHER_COLOR, 0x16 ) SetColorStat (MyChar, IE_ARMOR_COLOR, 0x17 ) - GemRB.FillPlayerInfo(MyChar, PortraitName+"L", PortraitName+"S") + #does all the rest + LargePortrait = GemRB.GetToken ("LargePortrait") + SmallPortrait = GemRB.GetToken ("SmallPortrait") + GemRB.FillPlayerInfo (MyChar, LargePortrait, SmallPortrait) + #10 is a weapon slot (see slottype.2da row 10) GemRB.CreateItem(MyChar, "staf01", 10, 1, 0, 0) GemRB.SetEquippedQuickSlot(MyChar, 0) @@ -589,13 +593,13 @@ return def PortraitSelect(): - global CharGenWindow, PortraitWindow, Portrait, PortraitPortraitButton, PortraitTable + global CharGenWindow, PortraitWindow, Portrait, PortraitPortraitButton, PortraitsTable GemRB.SetVisible (CharGenWindow, 0) PortraitWindow = GemRB.LoadWindow (11) # this is not the correct one, but I don't know which is - PortraitTable = GemRB.LoadTable ("PICTURES") + PortraitsTable = GemRB.LoadTable ("PICTURES") Portrait = 0 PortraitPortraitButton = GemRB.GetControl (PortraitWindow, 1) @@ -627,43 +631,155 @@ GemRB.SetEvent (PortraitWindow, PortraitCancelButton, IE_GUI_BUTTON_ON_PRESS, "PortraitCancelPress") GemRB.SetText (PortraitWindow, PortraitCancelButton, 13727) - while GemRB.GetTableValue (PortraitTable, Portrait, 0) != GemRB.GetVar ("Gender"): + while GemRB.GetTableValue (PortraitsTable, Portrait, 0) != GemRB.GetVar ("Gender"): Portrait = Portrait + 1 - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") GemRB.SetVisible (PortraitWindow, 1) return def PortraitLeftPress(): - global PortraitWindow, Portrait, PortraitTable, PortraitPortraitButton + global PortraitWindow, Portrait, PortraitsTable, PortraitPortraitButton while True: Portrait = Portrait - 1 if Portrait < 0: - Portrait = GemRB.GetTableRowCount (PortraitTable) - 1 - if GemRB.GetTableValue (PortraitTable, Portrait, 0) == GemRB.GetVar ("Gender"): - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + Portrait = GemRB.GetTableRowCount (PortraitsTable) - 1 + if GemRB.GetTableValue (PortraitsTable, Portrait, 0) == GemRB.GetVar ("Gender"): + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") return def PortraitRightPress(): - global PortraitWindow, Portrait, PortraitTable, PortraitPortraitButton + global PortraitWindow, Portrait, PortraitsTable, PortraitPortraitButton while True: Portrait = Portrait + 1 - if Portrait == GemRB.GetTableRowCount (PortraitTable): + if Portrait == GemRB.GetTableRowCount (PortraitsTable): Portrait = 0 - if GemRB.GetTableValue (PortraitTable, Portrait, 0) == GemRB.GetVar ("Gender"): - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + if GemRB.GetTableValue (PortraitsTable, Portrait, 0) == GemRB.GetVar ("Gender"): + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") return +def CustomDone(): + global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitsTable, Portrait, GenderButton, RaceButton + + Window = CustomWindow + + PortraitName = GemRB.QueryText (Window, PortraitList2) + GemRB.SetToken ("SmallPortrait", PortraitName) + PortraitName = GemRB.QueryText (Window, PortraitList1) + GemRB.SetToken ("LargePortrait", PortraitName) + GemRB.UnloadWindow (Window) + + GemRB.UnloadWindow (PortraitWindow) + GemRB.SetButtonPicture(CharGenWindow, PortraitButton, PortraitName) + GemRB.SetButtonState (CharGenWindow, GenderButton, IE_GUI_BUTTON_DISABLED) + GemRB.SetButtonFlags (CharGenWindow, GenderButton, IE_GUI_BUTTON_DEFAULT, OP_NAND) + GemRB.SetButtonState (CharGenWindow, RaceButton, IE_GUI_BUTTON_ENABLED) + GemRB.SetButtonFlags (CharGenWindow, RaceButton, IE_GUI_BUTTON_DEFAULT, OP_OR) + CharGenState = 1 + Portrait = -1 + SetCharacterDescription() + GemRB.SetVisible (CharGenWindow, 1) + return + +def CustomAbort(): + GemRB.UnloadWindow (CustomWindow) + return + +def LargeCustomPortrait(): + Window = CustomWindow + + Portrait = GemRB.QueryText (Window, PortraitList1) + #small hack + if GemRB.GetVar ("Row1") == RowCount1: + return + + Label = GemRB.GetControl (Window, 0x10000007) + GemRB.SetText (Window, Label, Portrait) + + Button = GemRB.GetControl (Window, 6) + if Portrait=="": + Portrait = "NOPORTMD" + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + else: + if GemRB.QueryText (Window, PortraitList2)!="": + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) + + Button = GemRB.GetControl (Window, 0) + GemRB.SetButtonPicture (Window, Button, Portrait, "NOPORTMD") + return + +def SmallCustomPortrait(): + Window = CustomWindow + + Portrait = GemRB.QueryText (Window, PortraitList2) + #small hack + if GemRB.GetVar ("Row2") == RowCount2: + return + + Label = GemRB.GetControl (Window, 0x10000008) + GemRB.SetText (Window, Label, Portrait) + + Button = GemRB.GetControl (Window, 6) + if Portrait=="": + Portrait = "NOPORTSM" + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + else: + if GemRB.QueryText (Window, PortraitList1)!="": + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) + + Button = GemRB.GetControl (Window, 1) + GemRB.SetButtonPicture (Window, Button, Portrait, "NOPORTSM") + return + def PortraitCustomPress(): + global PortraitList1, PortraitList2 + global RowCount1, RowCount2 + global CustomWindow + + CustomWindow = Window = GemRB.LoadWindow (18) + PortraitList1 = GemRB.GetControl (Window, 2) + RowCount1 = GemRB.GetPortraits (Window, PortraitList1, 0) + GemRB.SetEvent (Window, PortraitList1, IE_GUI_TEXTAREA_ON_CHANGE, "LargeCustomPortrait") + GemRB.SetVar ("Row1", RowCount1) + GemRB.SetVarAssoc (Window, PortraitList1, "Row1",RowCount1) + + PortraitList2 = GemRB.GetControl (Window, 4) + RowCount2 = GemRB.GetPortraits (Window, PortraitList2, 1) + GemRB.SetEvent (Window, PortraitList2, IE_GUI_TEXTAREA_ON_CHANGE, "SmallCustomPortrait") + GemRB.SetVar ("Row2", RowCount2) + GemRB.SetVarAssoc (Window, PortraitList2, "Row2",RowCount2) + + Button = GemRB.GetControl (Window, 6) + GemRB.SetText (Window, Button, 11973) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CustomDone") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + + Button = GemRB.GetControl (Window, 7) + GemRB.SetText (Window, Button, 15416) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CustomAbort") + + Button = GemRB.GetControl (Window, 0) + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait)+"L" + GemRB.SetButtonPicture (Window, Button, PortraitName, "NOPORTMD") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_LOCKED) + + Button = GemRB.GetControl (Window, 1) + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait)+"S" + GemRB.SetButtonPicture (Window, Button, PortraitName, "NOPORTSM") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_LOCKED) + + GemRB.ShowModal (Window, MODAL_SHADOW_NONE) return def PortraitDonePress(): - global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitTable, Portrait, GenderButton, RaceButton + global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitsTable, Portrait, GenderButton, RaceButton - GemRB.UnloadWindow (PortraitWindow) - GemRB.SetButtonPicture(CharGenWindow, PortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "L") + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait ) + GemRB.SetToken ("SmallPortrait", PortraitName+"S") + GemRB.SetToken ("LargePortrait", PortraitName+"L") + GemRB.SetButtonPicture(CharGenWindow, PortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "L") GemRB.SetButtonState (CharGenWindow, GenderButton, IE_GUI_BUTTON_DISABLED) GemRB.SetButtonFlags (CharGenWindow, GenderButton, IE_GUI_BUTTON_DEFAULT, OP_NAND) GemRB.SetButtonState (CharGenWindow, RaceButton, IE_GUI_BUTTON_ENABLED) @@ -671,6 +787,7 @@ CharGenState = 1 SetCharacterDescription() GemRB.SetVisible (CharGenWindow, 1) + GemRB.UnloadWindow (PortraitWindow) return def PortraitCancelPress(): @@ -2049,16 +2166,21 @@ def AppearancePress(): global CharGenWindow, AppearanceWindow, AppearanceTable - global PortraitTable, Portrait, AppearanceAvatarButton, PortraitName + global PortraitsTable, Portrait, AppearanceAvatarButton, PortraitName global AppearanceHairButton, AppearanceSkinButton global AppearanceMajorButton, AppearanceMinorButton global HairColor, SkinColor, MajorColor, MinorColor GemRB.SetVisible (CharGenWindow, 0) AppearanceWindow = GemRB.LoadWindow (13) - PortraitName = GemRB.GetTableRowName (PortraitTable, Portrait) AppearanceTable = GemRB.LoadTable ("PORTCOLR") - PortraitIndex = GemRB.GetTableRowIndex (AppearanceTable, PortraitName + "L") + + if Portrait<0: + PortraitIndex = 0 + else: + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait) + PortraitIndex = GemRB.GetTableRowIndex (AppearanceTable, PortraitName + "L") + HairColor = GemRB.GetTableValue (AppearanceTable, PortraitIndex, 1) GemRB.SetVar ("HairColor", HairColor) SkinColor = GemRB.GetTableValue (AppearanceTable, PortraitIndex, 2) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-23 14:58:23
|
Revision: 5465 http://gemrb.svn.sourceforge.net/gemrb/?rev=5465&view=rev Author: avenger_teambg Date: 2008-10-23 14:58:07 +0000 (Thu, 23 Oct 2008) Log Message: ----------- fixed custom portrait problems in bg1/bg2 (portrait sizes/color problem) Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg1/GUICG12.py gemrb/trunk/gemrb/GUIScripts/bg1/GUICG13.py gemrb/trunk/gemrb/GUIScripts/bg2/GUICG12.py gemrb/trunk/gemrb/GUIScripts/bg2/GUICG13.py Modified: gemrb/trunk/gemrb/GUIScripts/bg1/GUICG12.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg1/GUICG12.py 2008-10-21 21:53:43 UTC (rev 5464) +++ gemrb/trunk/gemrb/GUIScripts/bg1/GUICG12.py 2008-10-23 14:58:07 UTC (rev 5465) @@ -88,9 +88,9 @@ Window = CustomWindow Portrait = GemRB.QueryText (Window, PortraitList1) + GemRB.SetToken ("LargePortrait", Portrait) + Portrait = GemRB.QueryText (Window, PortraitList2) GemRB.SetToken ("SmallPortrait", Portrait) - Portrait = GemRB.QueryText (Window, PortraitList2) - GemRB.SetToken ("LargePortrait", Portrait) GemRB.UnloadWindow (Window) GemRB.UnloadWindow (AppearanceWindow) GemRB.SetNextScript ("CharGen2") Modified: gemrb/trunk/gemrb/GUIScripts/bg1/GUICG13.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg1/GUICG13.py 2008-10-21 21:53:43 UTC (rev 5464) +++ gemrb/trunk/gemrb/GUIScripts/bg1/GUICG13.py 2008-10-23 14:58:07 UTC (rev 5465) @@ -28,7 +28,6 @@ AnimID = AnimID+GemRB.GetTableValue(table, GemRB.GetVar("Class"),0) table = GemRB.LoadTable("avprefg") AnimID = AnimID+GemRB.GetTableValue(table, GemRB.GetVar("Gender"),0) - print "AnimID:",hex(AnimID) ResRef = GemRB.GetTableValue(PDollTable,hex(AnimID), "LEVEL1") GemRB.SetButtonPLT(ColorWindow, PDollButton, ResRef, 0, MinorColor, MajorColor, SkinColor, 0, 0, HairColor, 0) @@ -49,11 +48,17 @@ PortraitName = GemRB.GetToken("LargePortrait") PortraitName = PortraitName[0:len(PortraitName)-1] PortraitIndex = GemRB.GetTableRowIndex(PortraitTable, PortraitName) - HairColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,1) - SkinColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,2) - MinorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) - MajorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) - print HairColor, SkinColor, MinorColor, MajorColor + if PortraitIndex<0: + HairColor=GemRB.GetTableValue(PortraitTable,0,1) + SkinColor=GemRB.GetTableValue(PortraitTable,0,2) + MinorColor=GemRB.GetTableValue(PortraitTable,0,3) + MajorColor=GemRB.GetTableValue(PortraitTable,0,4) + else: + HairColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,1) + SkinColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,2) + MinorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) + MajorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) + PDollButton = GemRB.GetControl(ColorWindow, 1) GemRB.SetButtonFlags(ColorWindow, PDollButton, IE_GUI_BUTTON_PICTURE,OP_OR) Modified: gemrb/trunk/gemrb/GUIScripts/bg2/GUICG12.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/GUICG12.py 2008-10-21 21:53:43 UTC (rev 5464) +++ gemrb/trunk/gemrb/GUIScripts/bg2/GUICG12.py 2008-10-23 14:58:07 UTC (rev 5465) @@ -92,9 +92,9 @@ Window = CustomWindow Portrait = GemRB.QueryText (Window, PortraitList1) + GemRB.SetToken ("LargePortrait", Portrait) + Portrait = GemRB.QueryText (Window, PortraitList2) GemRB.SetToken ("SmallPortrait", Portrait) - Portrait = GemRB.QueryText (Window, PortraitList2) - GemRB.SetToken ("LargePortrait", Portrait) GemRB.UnloadWindow (Window) GemRB.UnloadWindow (AppearanceWindow) GemRB.SetNextScript ("CharGen2") Modified: gemrb/trunk/gemrb/GUIScripts/bg2/GUICG13.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/GUICG13.py 2008-10-21 21:53:43 UTC (rev 5464) +++ gemrb/trunk/gemrb/GUIScripts/bg2/GUICG13.py 2008-10-23 14:58:07 UTC (rev 5465) @@ -31,7 +31,6 @@ AnimID = AnimID+GemRB.GetTableValue(table, Class, 0) table = GemRB.LoadTable("avprefg") AnimID = AnimID+GemRB.GetTableValue(table, GemRB.GetVar("Gender"),0) - print "AnimID:",hex(AnimID) ResRef = GemRB.GetTableValue(PDollTable,hex(AnimID), "LEVEL1") GemRB.SetButtonPLT(ColorWindow, PDollButton, ResRef, @@ -52,12 +51,18 @@ PortraitName = GemRB.GetToken("LargePortrait") PortraitName = PortraitName[0:len(PortraitName)-1] PortraitIndex = GemRB.GetTableRowIndex(PortraitTable, PortraitName) - HairColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,1) - SkinColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,2) - MinorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) - MajorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) + if PortraitIndex<0: + HairColor=GemRB.GetTableValue(PortraitTable,0,1) + SkinColor=GemRB.GetTableValue(PortraitTable,0,2) + MinorColor=GemRB.GetTableValue(PortraitTable,0,3) + MajorColor=GemRB.GetTableValue(PortraitTable,0,4) + else: + HairColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,1) + SkinColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,2) + MinorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) + MajorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) + PDollButton = GemRB.GetControl(ColorWindow, 1) - print HairColor, SkinColor, MajorColor, MinorColor GemRB.SetButtonFlags(ColorWindow, PDollButton, IE_GUI_BUTTON_PICTURE,OP_OR) HairButton = GemRB.GetControl(ColorWindow, 2) @@ -193,5 +198,5 @@ GemRB.SetVar("SkinColor",SkinColor) GemRB.SetVar("MinorColor",MinorColor) GemRB.SetVar("MajorColor",MajorColor) - GemRB.SetNextScript("GUICG19") + GemRB.SetNextScript("GUICG19") #sounds return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |