MultipleMaids.Gui.cs 405 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Text;
  8. using UnityEngine;
  9. using UnityEngine.Rendering;
  10. using Object = UnityEngine.Object;
  11. namespace CM3D2.MultipleMaids.Plugin
  12. {
  13. public partial class MultipleMaids
  14. {
  15. public void OnGUI()
  16. {
  17. for (int index1 = 0; index1 < maidCnt; ++index1)
  18. {
  19. if (isPoseIti[index1])
  20. {
  21. Maid maid = maidArray[index1];
  22. isPoseIti[index1] = false;
  23. maid.transform.position = poseIti[index1];
  24. Vector3 eulerAngles = maid.transform.eulerAngles;
  25. for (int index2 = 0; index2 < 10; ++index2)
  26. {
  27. Transform transform1 = maid.transform;
  28. Vector3 position1 = maid.transform.position;
  29. Vector3 right = Vector3.right;
  30. Quaternion rotation = maid.transform.rotation;
  31. double num1 = -rotation.eulerAngles.x;
  32. transform1.RotateAround(position1, right, (float)num1);
  33. Transform transform2 = maid.transform;
  34. Vector3 position2 = maid.transform.position;
  35. Vector3 forward = Vector3.forward;
  36. rotation = maid.transform.rotation;
  37. double num2 = -rotation.eulerAngles.z;
  38. transform2.RotateAround(position2, forward, (float)num2);
  39. }
  40. Transform transform = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01", true);
  41. transform.position = new Vector3(poseIti[index1].x, transform.position.y, poseIti[index1].z);
  42. maid.transform.eulerAngles = eulerAngles;
  43. }
  44. }
  45. GUIStyle style = new GUIStyle(GUI.skin.box);
  46. style.fontSize = GetPix(11);
  47. style.alignment = TextAnchor.UpperRight;
  48. if (isGuiInit || screenSize != new Vector2(Screen.width, Screen.height))
  49. {
  50. screenSize = new Vector2(Screen.width, Screen.height);
  51. isGuiInit = false;
  52. rectWin2.width = Screen.width * 0.4f;
  53. rectWin2.height = Screen.height * 0.15f;
  54. rectWin2.x = (float)(Screen.width / 2.0 - rectWin2.width / 2.0);
  55. rectWin2.y = sceneLevel != 5
  56. ? Screen.height - rectWin2.height
  57. : Screen.height * 0.94f - rectWin2.height;
  58. rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 220 : 180);
  59. rectWin.height = Screen.height * 0.9f;
  60. rectWin.x = Screen.width - rectWin.width;
  61. rectWin.y = GetPix(65);
  62. sceneManagerRect.width = Screen.width * 0.45f;
  63. sceneManagerRect.height = Screen.height * 0.55f;
  64. sceneManagerRect.x = (float)(Screen.width * 0.5f - sceneManagerRect.width * 0.5f);
  65. sceneManagerRect.y = (float)(Screen.height * 0.5f - sceneManagerRect.height * 0.5f);
  66. sceneModalRect.width = Mathf.Min(Screen.width * 0.35f, 480f);
  67. sceneModalRect.height = Mathf.Min(Screen.height * 0.45f, 360f);
  68. sceneModalRect.x = (float)(Screen.width * 0.5f - sceneModalRect.width * 0.5f);
  69. sceneModalRect.y = (float)(Screen.height * 0.5f - sceneModalRect.height * 0.5f);
  70. }
  71. if (bGuiMessage)
  72. {
  73. rectWin2.width = Screen.width * 0.4f;
  74. rectWin2.height = Screen.height * 0.15f;
  75. rectWin2.x = Mathf.Clamp(rectWin2.x, -rectWin2.width + GetPix(20), Screen.width - GetPix(20));
  76. rectWin2.y = Mathf.Clamp(rectWin2.y, -rectWin2.height + GetPix(20), Screen.height - GetPix(20));
  77. rectWin2 = GUI.Window(130, rectWin2, MessageWindow, "", style);
  78. }
  79. if (bGui)
  80. {
  81. rectWin.x = Mathf.Clamp(rectWin.x, 0, Screen.width - rectWin.width);
  82. rectWin.y = Mathf.Clamp(rectWin.y, -rectWin.height + GetPix(20), Screen.height - GetPix(20));
  83. rectWin.height = Screen.height * 0.9f;
  84. rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 220 : 180);
  85. if (sceneLevel == 5 || sceneLevel == 14)
  86. rectWin.height *= 0.85f;
  87. comboBoxControl.height = rectWin.height;
  88. faceCombo.height = rectWin.height;
  89. poseCombo.height = rectWin.height;
  90. poseGroupCombo.height = rectWin.height;
  91. itemCombo.height = rectWin.height;
  92. bgmCombo.height = rectWin.height;
  93. itemCombo2.height = rectWin.height;
  94. bgCombo2.height = rectWin.height;
  95. kankyoCombo.height = rectWin.height;
  96. bgCombo.height = rectWin.height;
  97. slotCombo.height = rectWin.height;
  98. doguCombo.height = rectWin.height;
  99. parCombo.height = rectWin.height;
  100. lightCombo.height = rectWin.height;
  101. if (sceneFlg)
  102. {
  103. if (manageSceneFlag || deleteDirectoryFlag)
  104. {
  105. sceneModalRect = GUI.ModalWindow(9999, sceneModalRect, SceneManagerModal, "", style);
  106. }
  107. sceneManagerRect = GUI.Window(131, sceneManagerRect, SceneManagerWindow, "", style);
  108. int resizeHandleSize = GetPix(15);
  109. resizeManagerRect.x = sceneManagerRect.x + sceneManagerRect.width - resizeHandleSize;
  110. resizeManagerRect.y = sceneManagerRect.y + sceneManagerRect.height - resizeHandleSize;
  111. resizeManagerRect.width = resizeManagerRect.height = resizeHandleSize;
  112. if (!resizeManager && Input.GetMouseButtonDown(0) && resizeManagerRect.Contains(Event.current.mousePosition))
  113. {
  114. resizeManager = true;
  115. }
  116. if (resizeManager)
  117. {
  118. float rectWidth = Event.current.mousePosition.x - sceneManagerRect.x;
  119. float rectHeight = Event.current.mousePosition.y - sceneManagerRect.y;
  120. sceneManagerRect.width = Mathf.Max(GetPix(480), rectWidth);
  121. sceneManagerRect.height = Mathf.Max(GetPix(260), rectHeight);
  122. if (Input.GetMouseButtonUp(0))
  123. {
  124. resizeManager = false;
  125. }
  126. }
  127. }
  128. if (!faceFlg && !poseFlg && !kankyoFlg && !kankyo2Flg && !isF6 && okFlg)
  129. {
  130. rectWin = GUI.Window(129, rectWin, MaidCallWindow, "", style);
  131. }
  132. else if (kankyoFlg)
  133. {
  134. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  135. && rectWin.Contains(Event.current.mousePosition)
  136. && Input.GetMouseButtonDown(0))
  137. {
  138. Input.ResetInputAxes();
  139. }
  140. rectWin = GUI.Window(129, rectWin, BGSelectWindow, "", style);
  141. }
  142. else if (kankyo2Flg)
  143. {
  144. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  145. && rectWin.Contains(Event.current.mousePosition)
  146. && Input.GetMouseButtonDown(0))
  147. {
  148. Input.ResetInputAxes();
  149. }
  150. rectWin = GUI.Window(129, rectWin, BGSelectWindow2, "", style);
  151. }
  152. else if (poseFlg)
  153. {
  154. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  155. && rectWin.Contains(Event.current.mousePosition)
  156. && Input.GetMouseButtonDown(0))
  157. {
  158. Input.ResetInputAxes();
  159. }
  160. rectWin = GUI.Window(129, rectWin, PoseWindow, "", style);
  161. }
  162. else // implies faceFlg == true
  163. {
  164. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  165. && rectWin.Contains(Event.current.mousePosition)
  166. && Input.GetMouseButtonDown(0))
  167. {
  168. Input.ResetInputAxes();
  169. }
  170. rectWin = GUI.Window(129, rectWin, FaceWindow, "", style);
  171. }
  172. GameMain.Instance.MainCamera.SetControl(true);
  173. }
  174. }
  175. private void BGSelectWindow2(int winID)
  176. {
  177. GUIStyle guiStyle1 = "label";
  178. guiStyle1.fontSize = GetPix(12);
  179. guiStyle1.alignment = TextAnchor.UpperLeft;
  180. GUIStyle style1 = "label";
  181. style1.fontSize = GetPix(11);
  182. style1.alignment = TextAnchor.UpperLeft;
  183. GUIStyle style2 = "button";
  184. style2.fontSize = GetPix(20);
  185. GUIStyle buttonStyle = "button";
  186. buttonStyle.fontSize = GetPix(14);
  187. buttonStyle.alignment = TextAnchor.MiddleLeft;
  188. GUIStyle guiStyle2 = "button";
  189. guiStyle2.fontSize = GetPix(12);
  190. guiStyle2.alignment = TextAnchor.MiddleLeft;
  191. GUIStyle style3 = new GUIStyle("toggle")
  192. {
  193. fontSize = GetPix(13)
  194. };
  195. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  196. Maid maid = maidArray[selectMaidIndex];
  197. if (!kankyo2InitFlg)
  198. {
  199. listStyle2.normal.textColor = Color.white;
  200. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  201. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  202. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  203. listStyle2.fontSize = GetPix(11);
  204. listStyle3.normal.textColor = Color.white;
  205. listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  206. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  207. listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(0);
  208. listStyle3.padding.bottom = GetPix(0);
  209. listStyle3.fontSize = GetPix(14);
  210. bgCombo2.selectedItemIndex = bgIndexB;
  211. bgCombo2List = new GUIContent[bgArray.Length];
  212. for (int index = 0; index < bgArray.Length; ++index)
  213. {
  214. bgCombo2List[index] = bgUiNames.TryGetValue(bgArray[index], out string name)
  215. ? new GUIContent(name)
  216. : new GUIContent(bgArray[index]);
  217. }
  218. slotCombo.selectedItemIndex = 0;
  219. slotComboList = slotArray.Select(s => slotUiNames.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  220. itemCombo2.selectedItemIndex = 0;
  221. itemCombo2List = itemBArray.Select(s => itemComboUiName.TryGetValue(s, out string name) ? name : s)
  222. .Select(s => new GUIContent(s)).ToArray();
  223. kankyoCombo.selectedItemIndex = 0;
  224. kankyoComboList = new GUIContent[kankyoMax];
  225. for (int index = 0; index < kankyoMax; ++index)
  226. {
  227. IniKey iniKey = Preferences["kankyo"]["kankyo" + (index + 1)];
  228. kankyoComboList[index] = new GUIContent(iniKey.Value);
  229. }
  230. kankyo2InitFlg = true;
  231. }
  232. listStyle3.padding.top = GetPix(1);
  233. listStyle3.padding.bottom = GetPix(0);
  234. listStyle3.fontSize = GetPix(13);
  235. if (poseCombo.isClickedComboButton)
  236. {
  237. GUI.enabled = false;
  238. }
  239. if (poseGroupCombo.isClickedComboButton)
  240. {
  241. GUI.enabled = false;
  242. }
  243. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  244. {
  245. if (!isF6)
  246. {
  247. bool flag = true;
  248. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  249. {
  250. flag = false;
  251. }
  252. if (GUI.Toggle(new Rect(GetPix(2),
  253. GetPix(2),
  254. GetPix(39),
  255. GetPix(20)),
  256. flag,
  257. "配置",
  258. style3))
  259. {
  260. faceFlg = false;
  261. poseFlg = false;
  262. // sceneFlg = false;
  263. kankyoFlg = false;
  264. kankyo2Flg = false;
  265. bGui = true;
  266. }
  267. }
  268. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(42),
  269. GetPix(2),
  270. GetPix(39),
  271. GetPix(20)),
  272. poseFlg,
  273. "操作",
  274. style3))
  275. {
  276. poseFlg = true;
  277. faceFlg = false;
  278. // sceneFlg = false;
  279. kankyoFlg = false;
  280. kankyo2Flg = false;
  281. }
  282. if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
  283. faceFlg,
  284. "表情",
  285. style3))
  286. {
  287. faceFlg = true;
  288. poseFlg = false;
  289. // sceneFlg = false;
  290. kankyoFlg = false;
  291. kankyo2Flg = false;
  292. if (!faceFlg2)
  293. {
  294. isFaceInit = true;
  295. faceFlg2 = true;
  296. maidArray[selectMaidIndex].boMabataki = false;
  297. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  298. }
  299. isFaceInit = true;
  300. }
  301. if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
  302. kankyoFlg,
  303. "環境",
  304. style3))
  305. {
  306. poseFlg = false;
  307. faceFlg = false;
  308. // sceneFlg = false;
  309. kankyoFlg = true;
  310. kankyo2Flg = false;
  311. }
  312. if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
  313. kankyo2Flg,
  314. "環2",
  315. style3))
  316. {
  317. poseFlg = false;
  318. faceFlg = false;
  319. // sceneFlg = false;
  320. kankyoFlg = false;
  321. kankyo2Flg = true;
  322. }
  323. if (!line1)
  324. {
  325. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  326. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  327. }
  328. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
  329. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
  330. }
  331. if (isDanceStop)
  332. {
  333. isStop[selectMaidIndex] = true;
  334. isDanceStop = false;
  335. }
  336. if (kankyoCombo.isClickedComboButton || slotCombo.isClickedComboButton
  337. || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
  338. {
  339. GUI.enabled = false;
  340. }
  341. characterMgr.GetStockMaidCount();
  342. float pix = GetPix(45);
  343. Rect position1;
  344. Rect viewRect;
  345. if (sceneLevel != 5)
  346. {
  347. position1 = new Rect(GetPix(7),
  348. GetPix(138),
  349. GetPix(44) * 4 + GetPix(20),
  350. rectWin.height - GetPix(148));
  351. viewRect = new Rect(0.0f,
  352. 0.0f,
  353. position1.width * 0.845f,
  354. Mathf.Ceil(sortList.Count / 4 + 1) * pix + GetPix(10));
  355. }
  356. else
  357. {
  358. position1 = new Rect(GetPix(7),
  359. GetPix(138),
  360. GetPix(44) * 4 + GetPix(20),
  361. rectWin.height - GetPix(148));
  362. viewRect = new Rect(0.0f,
  363. 0.0f,
  364. position1.width * 0.845f,
  365. Mathf.Ceil(sortList.Count / 4 + 1) * pix + GetPix(10));
  366. }
  367. bg2ScrollPos = GUI.BeginScrollView(position1, bg2ScrollPos, viewRect);
  368. for (int index = 0; index < sortList.Count; ++index)
  369. {
  370. Rect position2 = new Rect(index % 4 * GetPix(45),
  371. index / 4 * GetPix(45),
  372. GetPix(44),
  373. GetPix(44));
  374. if (GUI.Button(position2, sortList[index].tex))
  375. {
  376. string menu = sortList[index].menu;
  377. byte[] f_byBuf = null;
  378. using (AFileBase afileBase = GameUty.FileOpen(menu, null))
  379. {
  380. NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + menu);
  381. if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
  382. {
  383. f_byBuf = new byte[afileBase.GetSize()];
  384. }
  385. afileBase.Read(ref f_byBuf, afileBase.GetSize());
  386. }
  387. string[] filename2 = ProcScriptBin(maidArray[0], f_byBuf, menu, false);
  388. GameObject gameObject = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, "", maidArray[0].body0.goSlot[8], 1);
  389. doguBObject.Add(gameObject);
  390. gameObject.name = menu;
  391. Vector3 zero1 = Vector3.zero;
  392. Vector3 zero2 = Vector3.zero;
  393. zero1.z = 0.4f;
  394. gameObject.transform.localPosition = zero1;
  395. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  396. doguCnt = doguBObject.Count - 1;
  397. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  398. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  399. gDogu[doguCnt].layer = 8;
  400. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  401. gDogu[doguCnt].SetActive(false);
  402. gDogu[doguCnt].transform.position = gameObject.transform.position;
  403. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  404. mDogu[doguCnt].isScale = false;
  405. mDogu[doguCnt].obj = gDogu[doguCnt];
  406. mDogu[doguCnt].maid = gameObject;
  407. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  408. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  409. mDogu[doguCnt].ido = 1;
  410. }
  411. GUI.DrawTexture(position2, sortList[index].tex);
  412. }
  413. GUI.EndScrollView();
  414. GUI.enabled = true;
  415. GUI.Label(new Rect(GetPix(3), GetPix(108), GetPix(100), GetPix(25)),
  416. "服装",
  417. style1);
  418. style1.fontSize = GetPix(9);
  419. GUI.Label(new Rect(GetPix(3), GetPix(119), GetPix(100), GetPix(25)),
  420. "アクセサリ",
  421. style1);
  422. style1.fontSize = GetPix(11);
  423. GUI.Label(new Rect(GetPix(3), GetPix(58), GetPix(100), GetPix(25)),
  424. "アイテム",
  425. style1);
  426. GUI.Label(new Rect(GetPix(3), GetPix(86), GetPix(100), GetPix(24)),
  427. "背景(小)",
  428. style1);
  429. if (kankyoCombo.isClickedComboButton || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
  430. {
  431. GUI.enabled = false;
  432. }
  433. int num1 =
  434. slotCombo.List(new Rect(GetPix(51),
  435. GetPix(111),
  436. GetPix(100),
  437. GetPix(23)),
  438. slotComboList[slotIndex].text,
  439. slotComboList,
  440. buttonStyle,
  441. "box",
  442. listStyle3);
  443. GUI.enabled = true;
  444. if (kankyoCombo.isClickedComboButton || itemCombo2.isClickedComboButton)
  445. {
  446. GUI.enabled = false;
  447. }
  448. bgIndexB =
  449. bgCombo2.List(new Rect(GetPix(51),
  450. GetPix(83),
  451. GetPix(100),
  452. GetPix(23)),
  453. bgCombo2List[bgIndexB].text,
  454. bgCombo2List,
  455. buttonStyle,
  456. "box",
  457. listStyle3);
  458. if (GUI.Button(new Rect(GetPix(156), GetPix(83), GetPix(38), GetPix(23)),
  459. "追加",
  460. style2))
  461. {
  462. Object original = GameMain.Instance.BgMgr.CreateAssetBundle(bgArray[bgIndexB]);
  463. if (original == null)
  464. {
  465. original = Resources.Load("BG/" + bgArray[bgIndexB]);
  466. }
  467. GameObject gameObject = Instantiate(original) as GameObject;
  468. doguBObject.Add(gameObject);
  469. gameObject.name = "BG_" + bgArray[bgIndexB];
  470. Vector3 zero1 = Vector3.zero;
  471. Vector3 zero2 = Vector3.zero;
  472. zero1.z = 0.4f;
  473. gameObject.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
  474. gameObject.transform.localPosition = zero1;
  475. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  476. doguCnt = doguBObject.Count - 1;
  477. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  478. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  479. gDogu[doguCnt].layer = 8;
  480. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  481. gDogu[doguCnt].SetActive(false);
  482. gDogu[doguCnt].transform.position = gameObject.transform.position;
  483. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  484. mDogu[doguCnt].isScale = false;
  485. mDogu[doguCnt].obj = gDogu[doguCnt];
  486. mDogu[doguCnt].maid = gameObject;
  487. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  488. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  489. mDogu[doguCnt].ido = 1;
  490. }
  491. GUI.enabled = true;
  492. if (kankyoCombo.isClickedComboButton)
  493. {
  494. GUI.enabled = false;
  495. }
  496. itemIndexB =
  497. itemCombo2.List(new Rect(GetPix(51),
  498. GetPix(55),
  499. GetPix(100),
  500. GetPix(23)),
  501. itemCombo2List[itemIndexB].text,
  502. itemCombo2List,
  503. buttonStyle,
  504. "box",
  505. listStyle3);
  506. if (GUI.Button(new Rect(GetPix(156), GetPix(55), GetPix(38), GetPix(23)),
  507. "追加",
  508. style2))
  509. {
  510. string str = itemBArray[itemIndexB].Split(',')[1];
  511. byte[] f_byBuf = null;
  512. using (AFileBase afileBase = GameUty.FileOpen(str, null))
  513. {
  514. NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + str);
  515. if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
  516. {
  517. f_byBuf = new byte[afileBase.GetSize()];
  518. }
  519. afileBase.Read(ref f_byBuf, afileBase.GetSize());
  520. }
  521. string[] filename2 = ProcScriptBin(maidArray[0], f_byBuf, str, false);
  522. GameObject gameObject = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, "", maidArray[0].body0.goSlot[8], 1);
  523. doguBObject.Add(gameObject);
  524. gameObject.name = str;
  525. Vector3 zero1 = Vector3.zero;
  526. Vector3 zero2 = Vector3.zero;
  527. zero1.z = 0.4f;
  528. switch (itemIndexB)
  529. {
  530. case 0:
  531. zero2.z = 90f;
  532. zero1.y = 0.04f;
  533. goto case 19;
  534. case 1:
  535. zero2.z = 90f;
  536. goto case 19;
  537. case 4:
  538. zero2.x = 90f;
  539. goto case 19;
  540. case 19:
  541. case 20:
  542. case 21:
  543. case 22:
  544. case 23:
  545. switch (gameObject.name)
  546. {
  547. case "HandItemL_Etoile_Saucer_I_.menu":
  548. case "HandItemL_Karte_I_.menu":
  549. case "HandItemL_Katuramuki_Daikon_I_.menu":
  550. case "HandItemR_BeerBottle(cap_off)_I_.menu":
  551. case "HandItemR_BeerBottle(cap_on)_I_.menu":
  552. case "HandItemR_BeerGlass_I_.menu":
  553. case "HandItemR_Etoile_Teacup_I_.menu":
  554. case "HandItemR_Jyouro_I_.menu":
  555. case "HandItemR_Ketchup_I_.menu":
  556. case "HandItemR_Kobin_I_.menu":
  557. case "HandItemR_MelonSoda_I_.menu":
  558. case "HandItemR_MilkBottle(cap_off)_I_.menu":
  559. case "HandItemR_MilkBottle(cap_on)_I_.menu":
  560. case "HandItemR_Mugcup_I_.menu":
  561. case "HandItemR_Natumikan_I_.menu":
  562. case "HandItemR_Nei_Heartful_I_.menu":
  563. case "HandItemR_Ochoko_I_.menu":
  564. case "HandItemR_Shaker_I_.menu":
  565. case "HandItemR_SmartPhone_I_.menu":
  566. case "HandItemR_Suika_I_.menu":
  567. case "HandItemR_Tomato_I_.menu":
  568. case "HandItemR_TropicalGlass_I_.menu":
  569. case "HandItemR_cocktail_blue_I_.menu":
  570. case "HandItemR_cocktail_red_I_.menu":
  571. case "HandItemR_cocktail_yellow_I_.menu":
  572. case "HandItemR_smoothie_green_I_.menu":
  573. case "HandItemR_smoothie_red_I_.menu":
  574. zero2.x = 0.0f;
  575. zero2.z = 90f;
  576. break;
  577. case "HandItemL_Karaoke_Mike_I_.menu":
  578. case "HandItemR_Crops_Suika_I_.menu":
  579. case "HandItemR_Curry_I_.menu":
  580. case "HandItemR_DVD1_I_.menu":
  581. case "HandItemR_DVD2_I_.menu":
  582. case "HandItemR_DVD3_I_.menu":
  583. case "HandItemR_DVD4_I_.menu":
  584. case "HandItemR_DVD5_I_.menu":
  585. case "HandItemR_Folk_I_.menu":
  586. case "HandItemR_Hanabi_I_.menu":
  587. case "HandItemR_Kushiyaki_I_.menu":
  588. case "HandItemR_Ninjin_I_.menu":
  589. case "HandItemR_Omurice1_I_.menu":
  590. case "HandItemR_Omurice2_I_.menu":
  591. case "HandItemR_Omurice3_I_.menu":
  592. case "HandItemR_Pasta_I_.menu":
  593. case "HandItemR_Satumaimo_I_.menu":
  594. case "HandItemR_Scoop_I_.menu":
  595. case "HandItemR_Senkouhanabi_I_.menu":
  596. case "HandItemR_Shell_I_.menu":
  597. case "HandItemR_Spoon_Curry_I_.menu":
  598. case "HandItemR_Spoon_Omurice_I_.menu":
  599. case "HandItemR_Tomorokoshi_I_.menu":
  600. case "HandItemR_Tomorokoshi_yaki_I_.menu":
  601. case "HandItemR_Uchiwa_I_.menu":
  602. zero2.z = 90f;
  603. break;
  604. }
  605. gameObject.transform.localPosition = zero1;
  606. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  607. doguCnt = doguBObject.Count - 1;
  608. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  609. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  610. gDogu[doguCnt].layer = 8;
  611. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  612. gDogu[doguCnt].SetActive(false);
  613. gDogu[doguCnt].transform.position = gameObject.transform.position;
  614. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  615. mDogu[doguCnt].isScale = false;
  616. mDogu[doguCnt].obj = gDogu[doguCnt];
  617. mDogu[doguCnt].maid = gameObject;
  618. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  619. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  620. mDogu[doguCnt].ido = 1;
  621. break;
  622. case 25:
  623. zero2.z = 90f;
  624. goto case 19;
  625. case 26:
  626. zero2.z = 90f;
  627. goto case 19;
  628. case 27:
  629. zero2.z = 90f;
  630. goto case 19;
  631. default:
  632. zero2.x = -90f;
  633. goto case 19;
  634. }
  635. }
  636. GUI.enabled = true;
  637. if (nameFlg)
  638. {
  639. inName2 = GUI.TextField(new Rect(GetPix(5),
  640. GetPix(27),
  641. GetPix(100),
  642. GetPix(20)),
  643. inName2);
  644. if (GUI.Button(new Rect(GetPix(110),
  645. GetPix(27),
  646. GetPix(35),
  647. GetPix(20)),
  648. "更新",
  649. style2))
  650. {
  651. nameFlg = false;
  652. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  653. Preferences["kankyo"]["kankyo" + (kankyoCombo.selectedItemIndex + 1)].Value = inName2;
  654. SaveConfig();
  655. kankyoComboList = new GUIContent[kankyoMax];
  656. for (int index = 0; index < kankyoMax; ++index)
  657. {
  658. IniKey iniKey = Preferences["kankyo"]["kankyo" + (index + 1)];
  659. kankyoComboList[index] = new GUIContent(iniKey.Value);
  660. }
  661. }
  662. }
  663. // else
  664. // {
  665. // style2.alignment = TextAnchor.MiddleCenter;
  666. // if (GUI.Button(new Rect(
  667. // GetPix(4),
  668. // GetPix(27),
  669. // GetPix(120),
  670. // GetPix(20)
  671. // ), "Scene Manager", style2))
  672. // {
  673. // sceneFlg = false;
  674. // poseFlg = false;
  675. // faceFlg = false;
  676. // sceneFlg = false;
  677. // kankyoFlg = false;
  678. // kankyoModeFlag = true;
  679. // kankyo2Flg = true;
  680. // RefreshSceneManager();
  681. // if (!sceneManagerInitialize) InitializeSceneManager();
  682. // }
  683. // }
  684. GUI.enabled = true;
  685. GUI.DragWindow();
  686. if (num1 == slotIndex)
  687. {
  688. return;
  689. }
  690. slotIndex = num1;
  691. sortList.Clear();
  692. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  693. if (itemDataList.Count == 0)
  694. {
  695. foreach (string menuFile in GameUty.MenuFiles)
  696. {
  697. string fileName = Path.GetFileName(menuFile);
  698. byte[] f_byBuf = null;
  699. using (AFileBase afileBase = GameUty.FileOpen(fileName, null))
  700. {
  701. NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + fileName);
  702. if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
  703. {
  704. f_byBuf = new byte[afileBase.GetSize()];
  705. }
  706. afileBase.Read(ref f_byBuf, afileBase.GetSize());
  707. }
  708. BinaryReader binaryReader = new BinaryReader(new MemoryStream(f_byBuf), Encoding.UTF8);
  709. if (binaryReader.ReadString() != "CM3D2_MENU")
  710. {
  711. binaryReader.Close();
  712. }
  713. else
  714. {
  715. try
  716. {
  717. binaryReader.ReadInt32();
  718. binaryReader.ReadString();
  719. binaryReader.ReadString();
  720. string str1 = binaryReader.ReadString();
  721. string s = "";
  722. binaryReader.ReadString();
  723. binaryReader.ReadInt32();
  724. string str2 = "";
  725. do
  726. {
  727. int num2;
  728. do
  729. {
  730. num2 = binaryReader.ReadByte();
  731. } while (num2 == 0);
  732. for (int index = 0; index < num2; ++index)
  733. {
  734. string str3 = binaryReader.ReadString();
  735. if (str3 == "icons" || str3 == "icon")
  736. {
  737. str2 = binaryReader.ReadString();
  738. break;
  739. }
  740. if (str3 == "priority")
  741. {
  742. s = binaryReader.ReadString();
  743. break;
  744. }
  745. }
  746. } while (str2 == "");
  747. int.TryParse(s, out int result);
  748. itemDataList.Add(new ItemData() { info = str1, name = str2, menu = fileName, order = result, cd = f_byBuf });
  749. }
  750. catch { }
  751. binaryReader.Close();
  752. }
  753. }
  754. }
  755. foreach (ItemData itemData in itemDataList)
  756. {
  757. if (slotIndex != 0 && itemData.info == slotArray[slotIndex] && itemData.order > 0)
  758. {
  759. sortList.Add(new SortItem() { order = itemData.order, name = itemData.name, menu = itemData.menu, tex = itemData.tex });
  760. }
  761. }
  762. IOrderedEnumerable<SortItem> orderedEnumerable = sortList
  763. .OrderBy(p => p.order)
  764. .ThenBy(p => p.name);
  765. List<SortItem> sortItemList = new List<SortItem>();
  766. string str4 = "";
  767. foreach (SortItem sortItem in orderedEnumerable)
  768. {
  769. try
  770. {
  771. if (!(sortItem.menu == str4))
  772. {
  773. if (sortItem.tex == null)
  774. {
  775. byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, sortItem.name, false).data;
  776. Texture2D texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
  777. texture2D.LoadImage(data);
  778. sortItem.tex = texture2D;
  779. }
  780. str4 = sortItem.menu;
  781. sortItemList.Add(sortItem);
  782. }
  783. }
  784. catch { }
  785. }
  786. sortList = sortItemList;
  787. }
  788. private void BGSelectWindow(int winID)
  789. {
  790. GUIStyle guistyle = "label";
  791. guistyle.fontSize = GetPix(12);
  792. guistyle.alignment = TextAnchor.UpperLeft;
  793. GUIStyle guistyle2 = "label";
  794. guistyle2.fontSize = GetPix(11);
  795. guistyle2.alignment = TextAnchor.UpperLeft;
  796. GUIStyle guistyle3 = "button";
  797. guistyle3.fontSize = GetPix(20);
  798. GUIStyle guistyle4 = "button";
  799. guistyle4.fontSize = GetPix(14);
  800. guistyle4.alignment = TextAnchor.MiddleLeft;
  801. GUIStyle guistyle5 = "button";
  802. guistyle5.fontSize = GetPix(12);
  803. guistyle5.alignment = TextAnchor.MiddleLeft;
  804. GUIStyle guistyle6 = new GUIStyle("toggle")
  805. {
  806. fontSize = GetPix(13)
  807. };
  808. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  809. Maid maid = maidArray[selectMaidIndex];
  810. if (!kankyoInitFlg)
  811. {
  812. listStyle2.normal.textColor = Color.white;
  813. listStyle2.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  814. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  815. RectOffset padding = listStyle2.padding;
  816. RectOffset padding2 = listStyle2.padding;
  817. RectOffset padding3 = listStyle2.padding;
  818. int num = listStyle2.padding.bottom = GetPix(0);
  819. num = padding3.top = num;
  820. num = padding2.right = num;
  821. padding.left = num;
  822. listStyle2.fontSize = GetPix(11);
  823. listStyle3.normal.textColor = Color.white;
  824. listStyle3.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  825. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  826. RectOffset padding4 = listStyle3.padding;
  827. RectOffset padding5 = listStyle3.padding;
  828. num = listStyle3.padding.top = GetPix(0);
  829. num = padding5.right = num;
  830. padding4.left = num;
  831. listStyle3.padding.bottom = GetPix(0);
  832. listStyle3.fontSize = GetPix(12);
  833. bgmCombo.selectedItemIndex = bgmIndex;
  834. if (sceneLevel == 5)
  835. {
  836. bgmCombo.selectedItemIndex = 2;
  837. }
  838. bgmComboList = bgmArray.Select(s => dancesDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  839. bgCombo.selectedItemIndex = bgIndex;
  840. bgComboList = new GUIContent[bgArray.Length];
  841. for (int j = 0; j < bgArray.Length; j++)
  842. {
  843. // Dicts merged during init
  844. if (bgDict.TryGetValue(bgArray[j], out string name))
  845. {
  846. bgComboList[j] = new GUIContent(name);
  847. }
  848. else
  849. {
  850. bgComboList[j] = new GUIContent(bgArray[j]);
  851. }
  852. }
  853. doguCombo.selectedItemIndex = 0;
  854. doguComboList = new GUIContent[doguBArray.Length];
  855. for (int j = 0; j < doguComboList.Length; j++)
  856. {
  857. // Dicts merged during init
  858. if (doguUiNames.TryGetValue(doguBArray[j], out string name))
  859. {
  860. doguComboList[j] = new GUIContent(name);
  861. }
  862. else
  863. {
  864. doguComboList[j] = new GUIContent(doguBArray[j]);
  865. }
  866. }
  867. parCombo.selectedItemIndex = 0;
  868. parComboList = parArray.Select(s => parUiDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  869. lightCombo.selectedItemIndex = 0;
  870. lightList = new List<GameObject>
  871. {
  872. GameMain.Instance.MainLight.gameObject
  873. };
  874. lightComboList = new GUIContent[lightList.Count];
  875. for (int i = 0; i < lightList.Count; i++)
  876. {
  877. if (i == 0)
  878. {
  879. lightComboList[i] = new GUIContent("メイン");
  880. }
  881. else
  882. {
  883. lightComboList[i] = new GUIContent("追加" + i);
  884. }
  885. }
  886. kankyoInitFlg = true;
  887. }
  888. listStyle3.padding.top = GetPix(1);
  889. listStyle3.padding.bottom = GetPix(0);
  890. listStyle3.fontSize = GetPix(12);
  891. if (poseCombo.isClickedComboButton)
  892. {
  893. GUI.enabled = false;
  894. }
  895. if (poseGroupCombo.isClickedComboButton)
  896. {
  897. GUI.enabled = false;
  898. }
  899. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  900. {
  901. if (!isF6)
  902. {
  903. bool value = true;
  904. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  905. {
  906. value = false;
  907. }
  908. if (GUI.Toggle(new Rect(GetPix(2),
  909. GetPix(2),
  910. GetPix(39),
  911. GetPix(20)),
  912. value,
  913. "配置",
  914. guistyle6))
  915. {
  916. faceFlg = false;
  917. poseFlg = false;
  918. kankyoFlg = false;
  919. kankyo2Flg = false;
  920. bGui = true;
  921. }
  922. }
  923. if (!yotogiFlg)
  924. {
  925. if (GUI.Toggle(new Rect(GetPix(42),
  926. GetPix(2),
  927. GetPix(39),
  928. GetPix(20)),
  929. poseFlg,
  930. "操作",
  931. guistyle6))
  932. {
  933. poseFlg = true;
  934. faceFlg = false;
  935. kankyoFlg = false;
  936. kankyo2Flg = false;
  937. }
  938. }
  939. if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
  940. faceFlg,
  941. "表情",
  942. guistyle6))
  943. {
  944. faceFlg = true;
  945. poseFlg = false;
  946. kankyoFlg = false;
  947. kankyo2Flg = false;
  948. if (!faceFlg2)
  949. {
  950. isFaceInit = true;
  951. faceFlg2 = true;
  952. maidArray[selectMaidIndex].boMabataki = false;
  953. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  954. }
  955. isFaceInit = true;
  956. }
  957. if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
  958. kankyoFlg,
  959. "環境",
  960. guistyle6))
  961. {
  962. poseFlg = false;
  963. faceFlg = false;
  964. kankyoFlg = true;
  965. kankyo2Flg = false;
  966. }
  967. if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
  968. kankyo2Flg,
  969. "環2",
  970. guistyle6))
  971. {
  972. poseFlg = false;
  973. faceFlg = false;
  974. kankyoFlg = false;
  975. kankyo2Flg = true;
  976. }
  977. if (!line1)
  978. {
  979. line1 = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.3f));
  980. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  981. }
  982. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
  983. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
  984. }
  985. if (isDanceStop)
  986. {
  987. isStop[selectMaidIndex] = true;
  988. isDanceStop = false;
  989. }
  990. yotogiFlg = false;
  991. if (sceneLevel == 14)
  992. {
  993. if (GameObject.Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
  994. {
  995. yotogiFlg = true;
  996. }
  997. }
  998. if (!isF6)
  999. {
  1000. if (GUI.Button(new Rect(GetPix(157),
  1001. GetPix(32),
  1002. GetPix(46),
  1003. GetPix(35)),
  1004. "シーン\n 管 理",
  1005. guistyle3))
  1006. {
  1007. sceneFlg = !sceneFlg;
  1008. faceFlg = false;
  1009. poseFlg = false;
  1010. kankyoFlg = true;
  1011. kankyo2Flg = false;
  1012. bGui = true;
  1013. if (!sceneManagerInitialize) InitializeSceneManager();
  1014. }
  1015. }
  1016. if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
  1017. || bgmCombo.isClickedComboButton || lightCombo.isClickedComboButton)
  1018. {
  1019. GUI.enabled = false;
  1020. }
  1021. int num2 = -1;
  1022. if (lightIndex[selectLightIndex] == 0)
  1023. {
  1024. isIdx1 = true;
  1025. }
  1026. if (lightIndex[selectLightIndex] == 1)
  1027. {
  1028. isIdx2 = true;
  1029. }
  1030. if (lightIndex[selectLightIndex] == 2)
  1031. {
  1032. isIdx3 = true;
  1033. }
  1034. if (lightIndex[selectLightIndex] == 3)
  1035. {
  1036. isIdx4 = true;
  1037. }
  1038. int offsetTop = GetPix(80);
  1039. int UIHeight = GetPix(550);
  1040. Rect BGWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  1041. Rect BGWindowScrollView = new Rect(0, offsetTop, rectWin.width - 20, UIHeight);
  1042. bgScrollPos = GUI.BeginScrollView(BGWindowScrollRect, bgScrollPos, BGWindowScrollView);
  1043. if (GUI.Toggle(new Rect(GetPix(5), GetPix(215), GetPix(45), GetPix(20)),
  1044. isIdx1,
  1045. "通常",
  1046. guistyle6))
  1047. {
  1048. if (lightIndex[selectLightIndex] != 0)
  1049. {
  1050. isIdx1 = true;
  1051. isIdx2 = false;
  1052. isIdx3 = false;
  1053. isIdx4 = false;
  1054. num2 = 0;
  1055. }
  1056. }
  1057. if (GUI.Toggle(new Rect(GetPix(50), GetPix(215), GetPix(45), GetPix(20)),
  1058. isIdx2,
  1059. "Spot",
  1060. guistyle6))
  1061. {
  1062. if (lightIndex[selectLightIndex] != 1)
  1063. {
  1064. isIdx1 = false;
  1065. isIdx2 = true;
  1066. isIdx3 = false;
  1067. isIdx4 = false;
  1068. num2 = 1;
  1069. }
  1070. }
  1071. if (GUI.Toggle(new Rect(GetPix(99), GetPix(215), GetPix(45), GetPix(20)),
  1072. isIdx3,
  1073. "Point",
  1074. guistyle6))
  1075. {
  1076. if (lightIndex[selectLightIndex] != 2)
  1077. {
  1078. isIdx1 = false;
  1079. isIdx2 = false;
  1080. isIdx3 = true;
  1081. isIdx4 = false;
  1082. num2 = 2;
  1083. }
  1084. }
  1085. if (selectLightIndex == 0)
  1086. {
  1087. if (GUI.Toggle(new Rect(GetPix(150),
  1088. GetPix(215),
  1089. GetPix(45),
  1090. GetPix(20)),
  1091. isIdx4,
  1092. "単色",
  1093. guistyle6))
  1094. {
  1095. if (lightIndex[selectLightIndex] != 3)
  1096. {
  1097. isIdx1 = false;
  1098. isIdx2 = false;
  1099. isIdx3 = false;
  1100. isIdx4 = true;
  1101. num2 = 3;
  1102. }
  1103. }
  1104. }
  1105. else if (GUI.Toggle(new Rect(GetPix(150),
  1106. GetPix(215),
  1107. GetPix(45),
  1108. GetPix(20)),
  1109. isIdx4,
  1110. "無効",
  1111. guistyle6))
  1112. {
  1113. if (lightIndex[selectLightIndex] != 3)
  1114. {
  1115. isIdx1 = false;
  1116. isIdx2 = false;
  1117. isIdx3 = false;
  1118. isIdx4 = true;
  1119. num2 = 3;
  1120. }
  1121. }
  1122. if (num2 >= 0)
  1123. {
  1124. lightIndex[selectLightIndex] = num2;
  1125. if (selectLightIndex == 0)
  1126. {
  1127. GameMain.Instance.MainLight.Reset();
  1128. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1129. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1130. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1131. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1132. if (lightIndex[selectLightIndex] == 0)
  1133. {
  1134. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1135. bgObject.SetActive(true);
  1136. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1137. }
  1138. else if (lightIndex[selectLightIndex] == 1)
  1139. {
  1140. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1141. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1142. bgObject.SetActive(true);
  1143. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1144. }
  1145. else if (lightIndex[selectLightIndex] == 2)
  1146. {
  1147. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1148. bgObject.SetActive(true);
  1149. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1150. }
  1151. else if (lightIndex[selectLightIndex] == 3)
  1152. {
  1153. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1154. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1155. bgObject.SetActive(false);
  1156. }
  1157. }
  1158. else
  1159. {
  1160. lightList[selectLightIndex].SetActive(true);
  1161. if (lightIndex[selectLightIndex] == 0)
  1162. {
  1163. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
  1164. }
  1165. else if (lightIndex[selectLightIndex] == 1)
  1166. {
  1167. lightList[selectLightIndex].transform.eulerAngles += Vector3.right * 40f;
  1168. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Spot;
  1169. }
  1170. else if (lightIndex[selectLightIndex] == 2)
  1171. {
  1172. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Point;
  1173. }
  1174. else if (lightIndex[selectLightIndex] == 3)
  1175. {
  1176. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
  1177. lightList[selectLightIndex].SetActive(false);
  1178. }
  1179. }
  1180. lightColorR[selectLightIndex] = 1f;
  1181. lightColorG[selectLightIndex] = 1f;
  1182. lightColorB[selectLightIndex] = 1f;
  1183. lightX[selectLightIndex] = 40f;
  1184. lightY[selectLightIndex] = 180f;
  1185. lightAkarusa[selectLightIndex] = 0.95f;
  1186. lightKage[selectLightIndex] = 0.098f;
  1187. lightRange[selectLightIndex] = 50f;
  1188. if (lightIndex[selectLightIndex] == 1)
  1189. {
  1190. lightX[selectLightIndex] = 90f;
  1191. }
  1192. }
  1193. GUI.Label(new Rect(GetPix(10), GetPix(138), GetPix(100), GetPix(25)),
  1194. "キューブ表示",
  1195. guistyle2);
  1196. guistyle6.fontSize = GetPix(12);
  1197. isCube2 = GUI.Toggle(new Rect(GetPix(5),
  1198. GetPix(153),
  1199. GetPix(55),
  1200. GetPix(20)),
  1201. isCube2,
  1202. "大道具(",
  1203. guistyle6);
  1204. if (!isF6)
  1205. {
  1206. isCube = GUI.Toggle(new Rect(GetPix(102),
  1207. GetPix(153),
  1208. GetPix(54),
  1209. GetPix(20)),
  1210. isCube,
  1211. "メイド",
  1212. guistyle6);
  1213. }
  1214. bool flag = GUI.Toggle(new Rect(GetPix(160),
  1215. GetPix(153),
  1216. GetPix(44),
  1217. GetPix(20)),
  1218. isCube3,
  1219. "背景",
  1220. guistyle6);
  1221. guistyle6.fontSize = GetPix(13);
  1222. bool flag2 = GUI.Toggle(new Rect(GetPix(61),
  1223. GetPix(153),
  1224. GetPix(38),
  1225. GetPix(20)),
  1226. isCubeS,
  1227. "小)",
  1228. guistyle6);
  1229. if (isCubeS != flag2)
  1230. {
  1231. isCubeS = flag2;
  1232. if (isCubeS)
  1233. {
  1234. cubeSize = 0.05f;
  1235. }
  1236. else
  1237. {
  1238. cubeSize = 0.12f;
  1239. }
  1240. for (int i = 0; i < doguBObject.Count; i++)
  1241. {
  1242. gDogu[i].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  1243. }
  1244. }
  1245. if (isCube3 != flag)
  1246. {
  1247. isCube3 = flag;
  1248. if (gBg == null)
  1249. {
  1250. gBg = GameObject.CreatePrimitive(PrimitiveType.Cube);
  1251. gBg.GetComponent<Renderer>().material = m_material;
  1252. gBg.layer = 8;
  1253. gBg.GetComponent<Renderer>().enabled = false;
  1254. gBg.SetActive(false);
  1255. gBg.transform.position = bgObject.transform.position;
  1256. mBg = gBg.AddComponent<MouseDrag6>();
  1257. mBg.obj = gBg;
  1258. mBg.maid = bgObject;
  1259. mBg.angles = bg.eulerAngles;
  1260. gBg.transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  1261. mBg.ido = 1;
  1262. mBg.isScale = false;
  1263. }
  1264. if (isCube3)
  1265. {
  1266. gBg.SetActive(true);
  1267. }
  1268. else
  1269. {
  1270. gBg.SetActive(false);
  1271. }
  1272. }
  1273. int num3 = 0;
  1274. if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 1
  1275. || (selectLightIndex == 0 && lightIndex[selectLightIndex] == 3))
  1276. {
  1277. GUI.Label(new Rect(GetPix(10), GetPix(237), GetPix(100), GetPix(25)),
  1278. "向きX",
  1279. guistyle2);
  1280. lightX[selectLightIndex] =
  1281. GUI.HorizontalSlider(new Rect(GetPix(8),
  1282. GetPix(251),
  1283. GetPix(192),
  1284. GetPix(20)),
  1285. lightX[selectLightIndex],
  1286. 220f,
  1287. -140f);
  1288. GUI.Label(new Rect(GetPix(10), GetPix(261), GetPix(100), GetPix(25)),
  1289. "向きY",
  1290. guistyle2);
  1291. lightY[selectLightIndex] =
  1292. GUI.HorizontalSlider(new Rect(GetPix(8),
  1293. GetPix(275),
  1294. GetPix(192),
  1295. GetPix(20)),
  1296. lightY[selectLightIndex],
  1297. 0f,
  1298. 360f);
  1299. }
  1300. else
  1301. {
  1302. num3 = 50;
  1303. }
  1304. if (lightIndex[selectLightIndex] != 3 || selectLightIndex <= 0)
  1305. {
  1306. GUI.Label(new Rect(GetPix(10),
  1307. GetPix(285 - num3),
  1308. GetPix(100),
  1309. GetPix(25)),
  1310. "明るさ",
  1311. guistyle2);
  1312. lightAkarusa[selectLightIndex] =
  1313. GUI.HorizontalSlider(new Rect(GetPix(8),
  1314. GetPix(299 - num3),
  1315. GetPix(192),
  1316. GetPix(20)),
  1317. lightAkarusa[selectLightIndex],
  1318. 0f,
  1319. 1.9f);
  1320. if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 3)
  1321. {
  1322. if (selectLightIndex == 0)
  1323. {
  1324. GUI.Label(new Rect(GetPix(10),
  1325. GetPix(309 - num3),
  1326. GetPix(100),
  1327. GetPix(25)),
  1328. "影",
  1329. guistyle2);
  1330. lightKage[selectLightIndex] =
  1331. GUI.HorizontalSlider(new Rect(GetPix(8),
  1332. GetPix(323 - num3),
  1333. GetPix(192),
  1334. GetPix(20)),
  1335. lightKage[selectLightIndex],
  1336. 0f,
  1337. 1f);
  1338. }
  1339. else
  1340. {
  1341. num3 = 25;
  1342. }
  1343. }
  1344. else if (lightIndex[selectLightIndex] == 1 || lightIndex[selectLightIndex] == 2)
  1345. {
  1346. GUI.Label(new Rect(GetPix(10),
  1347. GetPix(311 - num3),
  1348. GetPix(100),
  1349. GetPix(25)),
  1350. "範囲",
  1351. guistyle2);
  1352. lightRange[selectLightIndex] =
  1353. GUI.HorizontalSlider(new Rect(GetPix(8),
  1354. GetPix(325 - num3),
  1355. GetPix(192),
  1356. GetPix(20)),
  1357. lightRange[selectLightIndex],
  1358. 0f,
  1359. 150f);
  1360. }
  1361. else
  1362. {
  1363. num3 = 75;
  1364. }
  1365. GUI.Label(new Rect(GetPix(10),
  1366. GetPix(333 - num3),
  1367. GetPix(100),
  1368. GetPix(25)),
  1369. "赤",
  1370. guistyle2);
  1371. lightColorR[selectLightIndex] =
  1372. GUI.HorizontalSlider(new Rect(GetPix(8),
  1373. GetPix(347 - num3),
  1374. GetPix(92),
  1375. GetPix(20)),
  1376. lightColorR[selectLightIndex],
  1377. 0f,
  1378. 1f);
  1379. GUI.Label(new Rect(GetPix(108),
  1380. GetPix(333 - num3),
  1381. GetPix(100),
  1382. GetPix(25)),
  1383. "緑",
  1384. guistyle2);
  1385. lightColorG[selectLightIndex] =
  1386. GUI.HorizontalSlider(new Rect(GetPix(108),
  1387. GetPix(347 - num3),
  1388. GetPix(92),
  1389. GetPix(20)),
  1390. lightColorG[selectLightIndex],
  1391. 0f,
  1392. 1f);
  1393. GUI.Label(new Rect(GetPix(10),
  1394. GetPix(357 - num3),
  1395. GetPix(100),
  1396. GetPix(25)),
  1397. "青",
  1398. guistyle2);
  1399. lightColorB[selectLightIndex] =
  1400. GUI.HorizontalSlider(new Rect(GetPix(8),
  1401. GetPix(371 - num3),
  1402. GetPix(92),
  1403. GetPix(20)),
  1404. lightColorB[selectLightIndex],
  1405. 0f,
  1406. 1f);
  1407. }
  1408. if (GUI.Toggle(new Rect(GetPix(5), GetPix(391), GetPix(67), GetPix(20)),
  1409. isBloomS,
  1410. "ブルーム",
  1411. guistyle6))
  1412. {
  1413. isBloomS = true;
  1414. isDepthS = false;
  1415. isBlurS = false;
  1416. isFogS = false;
  1417. }
  1418. if (isBloomS)
  1419. {
  1420. isBloom = GUI.Toggle(new Rect(GetPix(8),
  1421. GetPix(412),
  1422. GetPix(40),
  1423. GetPix(20)),
  1424. isBloom,
  1425. "有効",
  1426. guistyle6);
  1427. if (!isBloom)
  1428. {
  1429. GUI.enabled = false;
  1430. }
  1431. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1432. "強さ",
  1433. guistyle2);
  1434. bloom1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1435. GetPix(445),
  1436. GetPix(92),
  1437. GetPix(20)),
  1438. bloom1,
  1439. 0f,
  1440. 5.7f);
  1441. GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
  1442. "広さ",
  1443. guistyle2);
  1444. bloom2 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1445. GetPix(445),
  1446. GetPix(92),
  1447. GetPix(20)),
  1448. bloom2,
  1449. 0f,
  1450. 15f);
  1451. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1452. "赤",
  1453. guistyle2);
  1454. bloom3 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1455. GetPix(470),
  1456. GetPix(92),
  1457. GetPix(20)),
  1458. bloom3,
  1459. 0f,
  1460. 0.5f);
  1461. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1462. "緑",
  1463. guistyle2);
  1464. bloom4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1465. GetPix(470),
  1466. GetPix(92),
  1467. GetPix(20)),
  1468. bloom4,
  1469. 0f,
  1470. 0.5f);
  1471. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1472. "青",
  1473. guistyle2);
  1474. bloom5 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1475. GetPix(495),
  1476. GetPix(92),
  1477. GetPix(20)),
  1478. bloom5,
  1479. 0f,
  1480. 0.5f);
  1481. isBloomA = GUI.Toggle(new Rect(GetPix(110),
  1482. GetPix(491),
  1483. GetPix(50),
  1484. GetPix(20)),
  1485. isBloomA,
  1486. "HDR",
  1487. guistyle6);
  1488. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1489. && !bgmCombo.isClickedComboButton)
  1490. {
  1491. GUI.enabled = true;
  1492. }
  1493. }
  1494. if (GUI.Toggle(new Rect(GetPix(73), GetPix(391), GetPix(40), GetPix(20)),
  1495. isDepthS,
  1496. "深度",
  1497. guistyle6))
  1498. {
  1499. isBloomS = false;
  1500. isDepthS = true;
  1501. isBlurS = false;
  1502. isFogS = false;
  1503. }
  1504. if (isDepthS)
  1505. {
  1506. isDepth = GUI.Toggle(new Rect(GetPix(8),
  1507. GetPix(412),
  1508. GetPix(40),
  1509. GetPix(20)),
  1510. isDepth,
  1511. "有効",
  1512. guistyle6);
  1513. if (!isDepth)
  1514. {
  1515. GUI.enabled = false;
  1516. }
  1517. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1518. "焦点距離",
  1519. guistyle2);
  1520. depth1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1521. GetPix(445),
  1522. GetPix(192),
  1523. GetPix(20)),
  1524. depth1,
  1525. 0f,
  1526. 10f);
  1527. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1528. "焦点領域サイズ",
  1529. guistyle2);
  1530. depth2 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1531. GetPix(470),
  1532. GetPix(92),
  1533. GetPix(20)),
  1534. depth2,
  1535. 0f,
  1536. 2f);
  1537. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1538. "カメラ絞り",
  1539. guistyle2);
  1540. depth3 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1541. GetPix(470),
  1542. GetPix(92),
  1543. GetPix(20)),
  1544. depth3,
  1545. 0f,
  1546. 60f);
  1547. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1548. "ブレ",
  1549. guistyle2);
  1550. depth4 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1551. GetPix(495),
  1552. GetPix(92),
  1553. GetPix(20)),
  1554. depth4,
  1555. 0f,
  1556. 10f);
  1557. isDepthA = GUI.Toggle(new Rect(GetPix(110),
  1558. GetPix(491),
  1559. GetPix(100),
  1560. GetPix(20)),
  1561. isDepthA,
  1562. "深度表示",
  1563. guistyle6);
  1564. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1565. && !bgmCombo.isClickedComboButton)
  1566. {
  1567. GUI.enabled = true;
  1568. }
  1569. }
  1570. if (GUI.Toggle(new Rect(GetPix(114), GetPix(391), GetPix(40), GetPix(20)),
  1571. isBlurS,
  1572. "光学",
  1573. guistyle6))
  1574. {
  1575. isBloomS = false;
  1576. isDepthS = false;
  1577. isBlurS = true;
  1578. isFogS = false;
  1579. }
  1580. if (isBlurS)
  1581. {
  1582. isBlur = GUI.Toggle(new Rect(GetPix(8),
  1583. GetPix(412),
  1584. GetPix(40),
  1585. GetPix(20)),
  1586. isBlur,
  1587. "有効",
  1588. guistyle6);
  1589. if (!isBlur)
  1590. {
  1591. GUI.enabled = false;
  1592. }
  1593. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1594. "強さ",
  1595. guistyle2);
  1596. blur1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1597. GetPix(445),
  1598. GetPix(92),
  1599. GetPix(20)),
  1600. blur1,
  1601. -40f,
  1602. 70f);
  1603. GUI.Label(new Rect(GetPix(108), GetPix(430), GetPix(100), GetPix(25)),
  1604. "ブラー",
  1605. guistyle2);
  1606. blur2 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1607. GetPix(445),
  1608. GetPix(92),
  1609. GetPix(20)),
  1610. blur2,
  1611. 0f,
  1612. 5f);
  1613. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1614. "ブレ",
  1615. guistyle2);
  1616. blur3 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1617. GetPix(470),
  1618. GetPix(92),
  1619. GetPix(20)),
  1620. blur3,
  1621. 0f,
  1622. 40f);
  1623. GUI.Label(new Rect(GetPix(108), GetPix(455), GetPix(100), GetPix(25)),
  1624. "色収差",
  1625. guistyle2);
  1626. blur4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1627. GetPix(470),
  1628. GetPix(92),
  1629. GetPix(20)),
  1630. blur4,
  1631. -30f,
  1632. 30f);
  1633. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1634. && !bgmCombo.isClickedComboButton)
  1635. {
  1636. GUI.enabled = true;
  1637. }
  1638. }
  1639. if (GUI.Toggle(new Rect(GetPix(155), GetPix(391), GetPix(60), GetPix(20)),
  1640. isFogS,
  1641. "フォグ",
  1642. guistyle6))
  1643. {
  1644. isBloomS = false;
  1645. isDepthS = false;
  1646. isBlurS = false;
  1647. isFogS = true;
  1648. }
  1649. if (isFogS)
  1650. {
  1651. isFog = GUI.Toggle(new Rect(GetPix(8),
  1652. GetPix(412),
  1653. GetPix(40),
  1654. GetPix(20)),
  1655. isFog,
  1656. "有効",
  1657. guistyle6);
  1658. if (!isFog)
  1659. {
  1660. GUI.enabled = false;
  1661. }
  1662. GUI.Label(new Rect(GetPix(110), GetPix(406), GetPix(100), GetPix(24)),
  1663. "発生距離",
  1664. guistyle2);
  1665. fog1 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1666. GetPix(420),
  1667. GetPix(92),
  1668. GetPix(20)),
  1669. fog1,
  1670. 0f,
  1671. 30f);
  1672. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1673. "密度",
  1674. guistyle2);
  1675. fog2 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1676. GetPix(445),
  1677. GetPix(92),
  1678. GetPix(20)),
  1679. fog2,
  1680. 0f,
  1681. 10f);
  1682. GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
  1683. "強度",
  1684. guistyle2);
  1685. fog3 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1686. GetPix(445),
  1687. GetPix(92),
  1688. GetPix(20)),
  1689. fog3,
  1690. -5f,
  1691. 20f);
  1692. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1693. "高さ",
  1694. guistyle2);
  1695. fog4 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1696. GetPix(470),
  1697. GetPix(92),
  1698. GetPix(20)),
  1699. fog4,
  1700. -10f,
  1701. 10f);
  1702. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1703. "赤",
  1704. guistyle2);
  1705. fog5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1706. GetPix(470),
  1707. GetPix(92),
  1708. GetPix(20)),
  1709. fog5,
  1710. 0f,
  1711. 1f);
  1712. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1713. "緑",
  1714. guistyle2);
  1715. fog6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1716. GetPix(495),
  1717. GetPix(92),
  1718. GetPix(20)),
  1719. fog6,
  1720. 0f,
  1721. 1f);
  1722. GUI.Label(new Rect(GetPix(110), GetPix(480), GetPix(100), GetPix(25)),
  1723. "青",
  1724. guistyle2);
  1725. fog7 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1726. GetPix(495),
  1727. GetPix(92),
  1728. GetPix(20)),
  1729. fog7,
  1730. 0f,
  1731. 1f);
  1732. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1733. && !bgmCombo.isClickedComboButton)
  1734. {
  1735. GUI.enabled = true;
  1736. }
  1737. }
  1738. isSepian = GUI.Toggle(new Rect(GetPix(5),
  1739. GetPix(515),
  1740. GetPix(80),
  1741. GetPix(20)),
  1742. isSepian,
  1743. "セピア",
  1744. guistyle6);
  1745. GUI.Label(new Rect(GetPix(108), GetPix(512), GetPix(100), GetPix(25)),
  1746. "ぼかし",
  1747. guistyle2);
  1748. bokashi = GUI.HorizontalSlider(new Rect(GetPix(108),
  1749. GetPix(527),
  1750. GetPix(92),
  1751. GetPix(20)),
  1752. bokashi,
  1753. 0f,
  1754. 18f);
  1755. if (GUI.Toggle(new Rect(GetPix(5), GetPix(545), GetPix(80), GetPix(20)),
  1756. isHairSetting,
  1757. "髪の設定",
  1758. guistyle6))
  1759. {
  1760. isHairSetting = true;
  1761. isSkirtSetting = false;
  1762. }
  1763. if (isHairSetting)
  1764. {
  1765. bool flag3 = GUI.Toggle(new Rect(GetPix(5),
  1766. GetPix(566),
  1767. GetPix(40),
  1768. GetPix(20)),
  1769. isKamiyure,
  1770. "有効",
  1771. guistyle6);
  1772. if (isKamiyure != flag3)
  1773. {
  1774. isKamiyure = flag3;
  1775. if (isKamiyure)
  1776. {
  1777. Preferences["config"]["hair_setting"].Value = "true";
  1778. Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
  1779. Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
  1780. Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
  1781. SaveConfig();
  1782. }
  1783. else
  1784. {
  1785. Preferences["config"]["hair_setting"].Value = "false";
  1786. SaveConfig();
  1787. for (int j = 0; j < maidCnt; j++)
  1788. {
  1789. for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
  1790. {
  1791. if (k >= 3 && k <= 6)
  1792. {
  1793. if (maidArray[j].body0.goSlot[k].obj != null)
  1794. {
  1795. DynamicBone component = maidArray[j].body0.goSlot[k].obj.GetComponent<DynamicBone>();
  1796. if (component != null)
  1797. {
  1798. component.m_Damping = 0.6f;
  1799. component.m_Elasticity = 1f;
  1800. if (k == 5)
  1801. {
  1802. component.m_Elasticity = 0.05f;
  1803. }
  1804. component.m_Radius = 0.02f;
  1805. component.UpdateParameters();
  1806. }
  1807. }
  1808. }
  1809. }
  1810. }
  1811. }
  1812. }
  1813. if (!isKamiyure)
  1814. {
  1815. GUI.enabled = false;
  1816. }
  1817. GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
  1818. "当たり判定半径",
  1819. guistyle2);
  1820. float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1821. GetPix(579),
  1822. GetPix(92),
  1823. GetPix(20)),
  1824. kamiyure4,
  1825. 0f,
  1826. 0.04f);
  1827. if (kamiyure4 != num4)
  1828. {
  1829. kamiyure4 = num4;
  1830. Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
  1831. SaveConfig();
  1832. }
  1833. GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
  1834. "減衰率",
  1835. guistyle2);
  1836. float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1837. GetPix(604),
  1838. GetPix(92),
  1839. GetPix(20)),
  1840. kamiyure2,
  1841. 0.2f,
  1842. 1f);
  1843. if (kamiyure2 != num5)
  1844. {
  1845. kamiyure2 = num5;
  1846. Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
  1847. SaveConfig();
  1848. }
  1849. GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
  1850. "復元率",
  1851. guistyle2);
  1852. float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1853. GetPix(604),
  1854. GetPix(92),
  1855. GetPix(20)),
  1856. kamiyure3,
  1857. 0f,
  1858. 2f);
  1859. if (kamiyure3 != num6)
  1860. {
  1861. kamiyure3 = num6;
  1862. Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
  1863. SaveConfig();
  1864. }
  1865. GUI.enabled = true;
  1866. }
  1867. if (GUI.Toggle(new Rect(GetPix(105), GetPix(545), GetPix(100), GetPix(20)),
  1868. isSkirtSetting,
  1869. "スカート設定",
  1870. guistyle6))
  1871. {
  1872. isHairSetting = false;
  1873. isSkirtSetting = true;
  1874. }
  1875. if (isSkirtSetting)
  1876. {
  1877. bool flag4 = GUI.Toggle(new Rect(GetPix(5),
  1878. GetPix(566),
  1879. GetPix(40),
  1880. GetPix(20)),
  1881. isSkirtyure,
  1882. "有効",
  1883. guistyle6);
  1884. if (isSkirtyure != flag4)
  1885. {
  1886. isSkirtyure = flag4;
  1887. if (isSkirtyure)
  1888. {
  1889. Preferences["config"]["skirt_setting"].Value = "true";
  1890. Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
  1891. Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
  1892. Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
  1893. SaveConfig();
  1894. }
  1895. else
  1896. {
  1897. Preferences["config"]["skirt_setting"].Value = "false";
  1898. SaveConfig();
  1899. for (int j = 0; j < maidCnt; j++)
  1900. {
  1901. for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
  1902. {
  1903. if (maidArray[j].body0.goSlot[k].obj != null)
  1904. {
  1905. DynamicSkirtBone fieldValue =
  1906. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[k].bonehair3,
  1907. "m_SkirtBone");
  1908. if (fieldValue != null)
  1909. {
  1910. fieldValue.m_fPanierForce = 0.05f;
  1911. fieldValue.m_fPanierForceDistanceThreshold = 0.1f;
  1912. fieldValue.m_fRegDefaultRadius = 0.1f;
  1913. }
  1914. }
  1915. }
  1916. }
  1917. }
  1918. }
  1919. if (!isSkirtyure)
  1920. {
  1921. GUI.enabled = false;
  1922. }
  1923. GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
  1924. "足側カプセル半径",
  1925. guistyle2);
  1926. float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1927. GetPix(579),
  1928. GetPix(92),
  1929. GetPix(20)),
  1930. skirtyure4,
  1931. 0f,
  1932. 0.2f);
  1933. if (skirtyure4 != num4)
  1934. {
  1935. skirtyure4 = num4;
  1936. Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
  1937. SaveConfig();
  1938. }
  1939. GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
  1940. "足との距離パニエ力",
  1941. guistyle2);
  1942. float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1943. GetPix(604),
  1944. GetPix(92),
  1945. GetPix(20)),
  1946. skirtyure2,
  1947. 0f,
  1948. 0.2f);
  1949. if (skirtyure2 != num5)
  1950. {
  1951. skirtyure2 = num5;
  1952. Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
  1953. SaveConfig();
  1954. }
  1955. GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
  1956. "パニエ力",
  1957. guistyle2);
  1958. float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1959. GetPix(604),
  1960. GetPix(92),
  1961. GetPix(20)),
  1962. skirtyure3,
  1963. 0f,
  1964. 0.1f);
  1965. if (skirtyure3 != num6)
  1966. {
  1967. skirtyure3 = num6;
  1968. Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
  1969. SaveConfig();
  1970. }
  1971. GUI.enabled = true;
  1972. }
  1973. GUI.enabled = true;
  1974. GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 2f), line1);
  1975. GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 1f), line2);
  1976. if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
  1977. || bgmCombo.isClickedComboButton)
  1978. {
  1979. GUI.enabled = false;
  1980. }
  1981. GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 2f), line1);
  1982. GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 1f), line2);
  1983. GUI.Label(new Rect(GetPix(8), GetPix(187), GetPix(100), GetPix(25)),
  1984. "照明",
  1985. guistyle2);
  1986. listStyle3.padding.top = GetPix(3);
  1987. listStyle3.padding.bottom = GetPix(2);
  1988. listStyle3.fontSize = GetPix(13);
  1989. int num7 = lightCombo.List(new Rect(GetPix(34),
  1990. GetPix(185),
  1991. GetPix(78),
  1992. GetPix(23)),
  1993. lightComboList[selectLightIndex].text,
  1994. lightComboList,
  1995. guistyle4,
  1996. "box",
  1997. listStyle3);
  1998. if (num7 != selectLightIndex)
  1999. {
  2000. selectLightIndex = num7;
  2001. isIdx1 = false;
  2002. isIdx2 = false;
  2003. isIdx3 = false;
  2004. isIdx4 = false;
  2005. }
  2006. if (GUI.Button(new Rect(GetPix(115), GetPix(185), GetPix(35), GetPix(23)),
  2007. "追加",
  2008. guistyle3))
  2009. {
  2010. GameObject gameObject = new GameObject("Light");
  2011. gameObject.AddComponent<Light>();
  2012. lightList.Add(gameObject);
  2013. lightColorR.Add(1f);
  2014. lightColorG.Add(1f);
  2015. lightColorB.Add(1f);
  2016. lightIndex.Add(0);
  2017. lightX.Add(40f);
  2018. lightY.Add(180f);
  2019. lightAkarusa.Add(0.95f);
  2020. lightKage.Add(0.098f);
  2021. lightRange.Add(50f);
  2022. gameObject.transform.position = GameMain.Instance.MainLight.transform.position;
  2023. selectLightIndex = lightList.Count - 1;
  2024. lightComboList = new GUIContent[lightList.Count];
  2025. for (int i = 0; i < lightList.Count; i++)
  2026. {
  2027. if (i == 0)
  2028. {
  2029. lightComboList[i] = new GUIContent("メイン");
  2030. }
  2031. else
  2032. {
  2033. lightComboList[i] = new GUIContent("追加" + i);
  2034. }
  2035. }
  2036. lightCombo.selectedItemIndex = selectLightIndex;
  2037. gameObject.GetComponent<Light>().intensity = 0.95f;
  2038. gameObject.GetComponent<Light>().spotAngle = 50f;
  2039. gameObject.GetComponent<Light>().range = 10f;
  2040. gameObject.GetComponent<Light>().type = LightType.Directional;
  2041. gameObject.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  2042. if (gLight[selectLightIndex] == null)
  2043. {
  2044. gLight[selectLightIndex] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2045. Material material = new Material(Shader.Find("Transparent/Diffuse"))
  2046. {
  2047. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  2048. };
  2049. gLight[selectLightIndex].GetComponent<Renderer>().material = material;
  2050. gLight[selectLightIndex].layer = 8;
  2051. gLight[selectLightIndex].GetComponent<Renderer>().enabled = false;
  2052. gLight[selectLightIndex].SetActive(false);
  2053. gLight[selectLightIndex].transform.position = gameObject.transform.position;
  2054. mLight[selectLightIndex] = gLight[selectLightIndex].AddComponent<MouseDrag6>();
  2055. mLight[selectLightIndex].obj = gLight[selectLightIndex];
  2056. mLight[selectLightIndex].maid = gameObject.gameObject;
  2057. mLight[selectLightIndex].angles = gameObject.gameObject.transform.eulerAngles;
  2058. gLight[selectLightIndex].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  2059. mLight[selectLightIndex].ido = 1;
  2060. mLight[selectLightIndex].isScale = false;
  2061. }
  2062. }
  2063. if (GUI.Button(new Rect(GetPix(153), GetPix(185), GetPix(23), GetPix(23)),
  2064. "R",
  2065. guistyle3))
  2066. {
  2067. for (int i = 1; i < lightList.Count; i++)
  2068. {
  2069. Destroy(lightList[i]);
  2070. }
  2071. lightIndex = new List<int>
  2072. {
  2073. 0
  2074. };
  2075. lightColorR = new List<float>
  2076. {
  2077. 1f
  2078. };
  2079. lightColorG = new List<float>
  2080. {
  2081. 1f
  2082. };
  2083. lightColorB = new List<float>
  2084. {
  2085. 1f
  2086. };
  2087. lightX = new List<float>
  2088. {
  2089. 40f
  2090. };
  2091. lightY = new List<float>
  2092. {
  2093. 180f
  2094. };
  2095. lightAkarusa = new List<float>
  2096. {
  2097. 0.95f
  2098. };
  2099. lightKage = new List<float>
  2100. {
  2101. 0.098f
  2102. };
  2103. lightRange = new List<float>
  2104. {
  2105. 50f
  2106. };
  2107. lightCombo.selectedItemIndex = 0;
  2108. lightList = new List<GameObject>
  2109. {
  2110. GameMain.Instance.MainLight.gameObject
  2111. };
  2112. lightComboList = new GUIContent[lightList.Count];
  2113. for (int i = 0; i < lightList.Count; i++)
  2114. {
  2115. if (i == 0)
  2116. {
  2117. lightComboList[i] = new GUIContent("メイン");
  2118. }
  2119. else
  2120. {
  2121. lightComboList[i] = new GUIContent("追加" + i);
  2122. }
  2123. }
  2124. selectLightIndex = 0;
  2125. GameMain.Instance.MainLight.Reset();
  2126. GameMain.Instance.MainLight.SetIntensity(0.95f);
  2127. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  2128. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  2129. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  2130. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  2131. bgObject.SetActive(true);
  2132. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  2133. isIdx1 = false;
  2134. isIdx2 = false;
  2135. isIdx3 = false;
  2136. isIdx4 = false;
  2137. }
  2138. GUI.enabled = true;
  2139. if (doguCombo.isClickedComboButton || bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
  2140. {
  2141. GUI.enabled = false;
  2142. }
  2143. listStyle3.padding.top = GetPix(0);
  2144. listStyle3.padding.bottom = GetPix(0);
  2145. listStyle3.fontSize = GetPix(12);
  2146. GUI.Label(new Rect(GetPix(8), GetPix(116), GetPix(150), GetPix(25)),
  2147. "大道具2",
  2148. guistyle2);
  2149. parIndex = parCombo.List(new Rect(GetPix(51),
  2150. GetPix(113),
  2151. GetPix(100),
  2152. GetPix(23)),
  2153. parComboList[parIndex].text,
  2154. parComboList,
  2155. guistyle4,
  2156. "box",
  2157. listStyle3);
  2158. if (GUI.Button(new Rect(GetPix(156), GetPix(113), GetPix(38), GetPix(23)),
  2159. "追加",
  2160. guistyle3))
  2161. {
  2162. GameObject gameObject2 = null;
  2163. bool flag5 = false;
  2164. bool flag6 = false;
  2165. if (parArray[parIndex].Contains("#"))
  2166. {
  2167. string[] array3 = parArray[parIndex].Split(new char[] { '#' });
  2168. gameObject2 = GameMain.Instance.BgMgr.CreateAssetBundle(array3[1]);
  2169. if (gameObject2 != null)
  2170. {
  2171. gameObject2 = Instantiate(gameObject2);
  2172. MeshRenderer[] componentsInChildren = gameObject2.GetComponentsInChildren<MeshRenderer>();
  2173. for (int k = 0; k < componentsInChildren.Length; k++)
  2174. {
  2175. if (componentsInChildren[k] != null)
  2176. {
  2177. componentsInChildren[k].shadowCastingMode = ShadowCastingMode.Off;
  2178. }
  2179. }
  2180. }
  2181. flag5 = true;
  2182. if (!parArray[parIndex].Contains("Odogu_"))
  2183. {
  2184. flag6 = true;
  2185. }
  2186. doguBObject.Add(gameObject2);
  2187. }
  2188. else if (!parArray[parIndex].StartsWith("mirror") && parArray[parIndex].IndexOf(":") < 0)
  2189. {
  2190. Object @object = Resources.Load("Prefab/" + parArray[parIndex]);
  2191. gameObject2 = Instantiate(@object) as GameObject;
  2192. doguBObject.Add(gameObject2);
  2193. }
  2194. else if (parArray[parIndex].StartsWith("mirror"))
  2195. {
  2196. Material material2 = new Material(Shader.Find("Mirror"));
  2197. GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  2198. gameObject3.GetComponent<Renderer>().material = material2;
  2199. gameObject3.AddComponent<MirrorReflection2>();
  2200. MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
  2201. component2.m_TextureSize = 2048;
  2202. component2.m_ClipPlaneOffset = 0.07f;
  2203. gameObject3.GetComponent<Renderer>().enabled = true;
  2204. gameObject2 = gameObject3;
  2205. doguBObject.Add(gameObject2);
  2206. }
  2207. else
  2208. {
  2209. string[] array3 = parArray[parIndex].Split(new char[] { ':' });
  2210. Object @object = GameMain.Instance.BgMgr.CreateAssetBundle(array3[0]);
  2211. if (@object == null)
  2212. {
  2213. @object = Resources.Load("BG/" + array3[0]);
  2214. }
  2215. GameObject gameObject4 = Instantiate(@object) as GameObject;
  2216. int num8 = 0;
  2217. int.TryParse(array3[1], out int num9);
  2218. foreach (object obj in gameObject4.transform)
  2219. {
  2220. Transform transform = (Transform)obj;
  2221. if (num9 == num8)
  2222. {
  2223. gameObject2 = transform.gameObject;
  2224. break;
  2225. }
  2226. num8++;
  2227. }
  2228. doguBObject.Add(gameObject2);
  2229. gameObject2.transform.parent = null;
  2230. Destroy(gameObject4);
  2231. gameObject4.SetActive(false);
  2232. }
  2233. gameObject2.name = parArray[parIndex];
  2234. Vector3 zero = Vector3.zero;
  2235. Vector3 zero2 = Vector3.zero;
  2236. switch (parIndex)
  2237. {
  2238. case 0:
  2239. zero.z = -0.6f;
  2240. zero.y = 0.96f;
  2241. zero2.z = 180f;
  2242. zero2.x = -90f;
  2243. gameObject2.transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  2244. break;
  2245. case 1:
  2246. zero.z = -0.6f;
  2247. zero.y = 0.96f;
  2248. zero2.z = 180f;
  2249. zero2.x = -90f;
  2250. gameObject2.transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  2251. break;
  2252. case 2:
  2253. zero.z = -0.6f;
  2254. zero.y = 0.85f;
  2255. zero2.z = 180f;
  2256. zero2.x = -90f;
  2257. gameObject2.transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  2258. break;
  2259. case 3:
  2260. case 4:
  2261. case 5:
  2262. case 6:
  2263. case 7:
  2264. case 8:
  2265. case 9:
  2266. case 10:
  2267. case 11:
  2268. case 12:
  2269. case 13:
  2270. case 14:
  2271. case 15:
  2272. case 16:
  2273. case 17:
  2274. zero.z = 0.5f;
  2275. zero2.x = -90f;
  2276. break;
  2277. }
  2278. if (flag5)
  2279. {
  2280. zero.z = 0.4f;
  2281. if (flag6)
  2282. {
  2283. zero2.x = -90f;
  2284. }
  2285. }
  2286. if (gameObject2.name == "Salon_Entrance:3" || gameObject2.name == "Salon_Entrance:4"
  2287. || gameObject2.name == "Salon_Entrance:1"
  2288. || gameObject2.name == "Salon_Entrance:2"
  2289. || gameObject2.name == "Salon_Entrance:0" || gameObject2.name == "Shitsumu:23"
  2290. || gameObject2.name == "Shitsumu_Night:23")
  2291. {
  2292. zero.z = 0.5f;
  2293. zero2.x = -90f;
  2294. }
  2295. if (gameObject2.name == "Pool:26")
  2296. {
  2297. zero.z = 0.5f;
  2298. zero2.x = -90f;
  2299. zero2.z = 90f;
  2300. zero.y = 0.15f;
  2301. }
  2302. if (gameObject2.name == "Particle/pstarY_act2")
  2303. {
  2304. zero2.y = 90f;
  2305. }
  2306. gameObject2.transform.localPosition = zero;
  2307. gameObject2.transform.localRotation = Quaternion.Euler(zero2);
  2308. doguCnt = doguBObject.Count - 1;
  2309. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2310. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  2311. gDogu[doguCnt].layer = 8;
  2312. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  2313. gDogu[doguCnt].SetActive(false);
  2314. gDogu[doguCnt].transform.position = gameObject2.transform.position;
  2315. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  2316. mDogu[doguCnt].obj = gDogu[doguCnt];
  2317. mDogu[doguCnt].maid = gameObject2;
  2318. mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
  2319. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  2320. mDogu[doguCnt].ido = 1;
  2321. mDogu[doguCnt].isScale = false;
  2322. if (gameObject2.name == "Particle/pLineY")
  2323. {
  2324. mDogu[doguCnt].count = 180;
  2325. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2326. }
  2327. if (gameObject2.name == "Particle/pLineP02")
  2328. {
  2329. mDogu[doguCnt].count = 115;
  2330. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2331. }
  2332. if (gameObject2.name == "Particle/pLine_act2")
  2333. {
  2334. mDogu[doguCnt].count = 90;
  2335. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2336. }
  2337. if (gameObject2.name == "Particle/pHeart01")
  2338. {
  2339. mDogu[doguCnt].count = 77;
  2340. }
  2341. if (parIndex < 3)
  2342. {
  2343. mDogu[doguCnt].isScale = true;
  2344. mDogu[doguCnt].isScale2 = true;
  2345. mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
  2346. if (parIndex == 0)
  2347. {
  2348. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 5f,
  2349. gameObject2.transform.localScale.y * 5f,
  2350. gameObject2.transform.localScale.z * 5f);
  2351. }
  2352. if (parIndex == 1)
  2353. {
  2354. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 10f,
  2355. gameObject2.transform.localScale.y * 10f,
  2356. gameObject2.transform.localScale.z * 10f);
  2357. }
  2358. if (parIndex == 2)
  2359. {
  2360. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 33f,
  2361. gameObject2.transform.localScale.y * 33f,
  2362. gameObject2.transform.localScale.z * 33f);
  2363. }
  2364. }
  2365. if (gameObject2.GetComponent<Collider>() != null)
  2366. {
  2367. gameObject2.GetComponent<Collider>().enabled = false;
  2368. }
  2369. }
  2370. GUI.enabled = true;
  2371. if (bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
  2372. {
  2373. GUI.enabled = false;
  2374. }
  2375. GUI.Label(new Rect(GetPix(8), GetPix(88), GetPix(100), GetPix(25)),
  2376. "大道具1",
  2377. guistyle2);
  2378. doguBIndex =
  2379. doguCombo.List(new Rect(GetPix(51),
  2380. GetPix(85),
  2381. GetPix(100),
  2382. GetPix(23)),
  2383. doguComboList[doguBIndex].text,
  2384. doguComboList,
  2385. guistyle4,
  2386. "box",
  2387. listStyle3);
  2388. if (GUI.Button(new Rect(GetPix(156), GetPix(85), GetPix(38), GetPix(23)),
  2389. "追加",
  2390. guistyle3))
  2391. {
  2392. GameObject gameObject2 = null;
  2393. if (doguDict.TryGetValue(doguBArray[doguBIndex], out PhotoBGObjectData objResult))
  2394. {
  2395. if (!string.IsNullOrEmpty(objResult.create_prefab_name))
  2396. {
  2397. Object tmpObj = Resources.Load("Prefab/" + objResult.create_prefab_name);
  2398. if (tmpObj == null)
  2399. {
  2400. gameObject2 = null;
  2401. }
  2402. else
  2403. {
  2404. gameObject2 = Instantiate(tmpObj) as GameObject;
  2405. }
  2406. }
  2407. else if (!string.IsNullOrEmpty(objResult.create_asset_bundle_name))
  2408. {
  2409. GameObject gameObject3 = GameMain.Instance.BgMgr.CreateAssetBundle(objResult.create_asset_bundle_name);
  2410. if (gameObject3 == null)
  2411. {
  2412. gameObject2 = null;
  2413. }
  2414. else
  2415. {
  2416. gameObject2 = Instantiate(gameObject3);
  2417. }
  2418. }
  2419. else if (!string.IsNullOrEmpty(objResult.direct_file))
  2420. {
  2421. BasePhotoCustomObject basePhotoCustomObject =
  2422. BasePhotoCustomObject.InstantiateFromFile(transform.gameObject, objResult.direct_file);
  2423. gameObject2 = basePhotoCustomObject.gameObject;
  2424. }
  2425. if (gameObject2 != null)
  2426. {
  2427. doguBObject.Add(gameObject2);
  2428. }
  2429. }
  2430. else if (!doguBArray[doguBIndex].StartsWith("mirror"))
  2431. {
  2432. Object @object;
  2433. if (doguBArray[doguBIndex].StartsWith("BG"))
  2434. {
  2435. string text2 = doguBArray[doguBIndex].Replace("BG", "");
  2436. @object = GameMain.Instance.BgMgr.CreateAssetBundle(text2);
  2437. if (@object == null)
  2438. {
  2439. @object = Resources.Load("BG/" + text2);
  2440. }
  2441. }
  2442. else
  2443. {
  2444. @object = Resources.Load("Prefab/" + doguBArray[doguBIndex]);
  2445. }
  2446. gameObject2 = Instantiate(@object) as GameObject;
  2447. doguBObject.Add(gameObject2);
  2448. }
  2449. else
  2450. {
  2451. Material material2 = new Material(Shader.Find("Mirror"));
  2452. GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  2453. gameObject3.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  2454. gameObject3.GetComponent<Renderer>().material = material2;
  2455. gameObject3.AddComponent<MirrorReflection2>();
  2456. MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
  2457. component2.m_TextureSize = 2048;
  2458. component2.m_ClipPlaneOffset = 0f;
  2459. gameObject3.GetComponent<Renderer>().enabled = true;
  2460. gameObject2 = gameObject3;
  2461. doguBObject.Add(gameObject2);
  2462. }
  2463. gameObject2.name = doguBArray[doguBIndex];
  2464. Vector3 zero = Vector3.zero;
  2465. Vector3 zero2 = Vector3.zero;
  2466. string text = gameObject2.name;
  2467. switch (text)
  2468. {
  2469. case "Odogu_XmasTreeMini_photo_ver":
  2470. zero.z = 0.6f;
  2471. gameObject2.transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  2472. foreach (object obj2 in gameObject2.transform)
  2473. {
  2474. Transform transform2 = (Transform)obj2;
  2475. if (transform2.GetComponent<Collider>() != null)
  2476. {
  2477. transform2.GetComponent<Collider>().enabled = false;
  2478. }
  2479. }
  2480. goto IL_A0BF;
  2481. case "Odogu_KadomatsuMini_photo_ver":
  2482. zero.z = 0.6f;
  2483. gameObject2.transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  2484. foreach (object obj3 in gameObject2.transform)
  2485. {
  2486. Transform transform2 = (Transform)obj3;
  2487. if (transform2.GetComponent<Collider>() != null)
  2488. {
  2489. transform2.GetComponent<Collider>().enabled = false;
  2490. }
  2491. }
  2492. goto IL_A0BF;
  2493. case "Odogu_ClassRoomDesk":
  2494. zero.z = 0.5f;
  2495. zero2.x = -90f;
  2496. goto IL_A0BF;
  2497. case "Odogu_SimpleTable":
  2498. zero.z = 0.5f;
  2499. zero2.x = -90f;
  2500. goto IL_A0BF;
  2501. case "Odogu_DildoBox":
  2502. zero.z = 0.5f;
  2503. zero2.x = -90f;
  2504. goto IL_A0BF;
  2505. case "PlayAreaOut":
  2506. zero.z = 0.5f;
  2507. zero.y = 0.2f;
  2508. goto IL_A0BF;
  2509. case "Odogu_Dresser_photo_ver":
  2510. GameObject.Find("Prim.00000000").GetComponent<Collider>().enabled = false;
  2511. GameObject.Find("Prim.00000001").GetComponent<Collider>().enabled = false;
  2512. GameObject.Find("Prim.00000002").GetComponent<Collider>().enabled = false;
  2513. GameObject.Find("Prim.00000004").GetComponent<Collider>().enabled = false;
  2514. goto IL_A0BF;
  2515. case "BGodogu_bbqgrill":
  2516. case "BGodogu_bucket":
  2517. case "BGodogu_coolerbox":
  2518. case "BGodogu_game_darts":
  2519. case "BGodogu_game_dartsboard":
  2520. case "BGodogu_nabe_huta":
  2521. case "BGodogu_nabe_water":
  2522. case "BGodogu_natumikan":
  2523. case "BGodogu_rb_chair":
  2524. case "BGodogu_rb_duck":
  2525. case "BGodogu_rb_obon":
  2526. case "BGodogu_rb_tokkuri":
  2527. case "BGodogu_saracorn":
  2528. case "BGodogu_saraimo":
  2529. case "BGodogu_saratomato":
  2530. case "BGodogu_sunanoshiro":
  2531. case "BGodogu_sunanoyama":
  2532. case "BGodogu_tsutsuhanabi":
  2533. case "BGodogu_ukiwa":
  2534. case "BGodogu_vf_crops_corn":
  2535. case "BGodogu_vf_crops_gekkabijin":
  2536. case "BGodogu_vf_crops_gekkabijinflower":
  2537. case "BGodogu_vf_crops_himawari":
  2538. case "BGodogu_vf_crops_natsumikan":
  2539. case "BGodogu_vf_crops_suika":
  2540. case "BGodogu_vf_crops_zakuro":
  2541. case "BGodogu_villa_table":
  2542. case "BGodogu_villa_tvrimocon":
  2543. case "BGodogu_villabr_sideboard":
  2544. case "BGOdogu_Game_Nei_USB":
  2545. case "BGOdogu_Game_Wanage":
  2546. case "BGOdogu_Game_Wa":
  2547. case "BGodogu_pafe":
  2548. case "BGodogu_furaidopoteto":
  2549. case "BGodogu_karaoketable":
  2550. case "BGodogu_omuriceh":
  2551. case "BGodogu_omuricekao1":
  2552. case "BGodogu_omuricekao2":
  2553. case "BGodogu_omuriceoppai":
  2554. case "BGodogu_kakigori":
  2555. case "BGodogu_pretzel_sara":
  2556. case "BGodogu_karaoke_box":
  2557. case "Odogu_StandMike":
  2558. case "Odogu_StandMikeBase":
  2559. case "Odogu_HeroineChair_muku":
  2560. case "Odogu_HeroineChair_mazime":
  2561. case "Odogu_HeroineChair_rindere":
  2562. case "Odogu_HeroineChair_tsumdere":
  2563. case "Odogu_HeroineChair_cooldere":
  2564. case "Odogu_HeroineChair_junshin":
  2565. case "Odogu_TabletPC":
  2566. case "Odogu_Styluspen_black":
  2567. case "Odogu_Styluspen_white":
  2568. case "Odogu_Styluspen_red":
  2569. case "Odogu_Styluspen_blue":
  2570. case "Odogu_Styluspen_yellow":
  2571. case "Odogu_Styluspen_green":
  2572. case "Odogu_Omurice1":
  2573. case "Odogu_Omurice3":
  2574. case "Odogu_OmuriceH":
  2575. case "Odogu_OmuriceKao1":
  2576. case "Odogu_OmuriceKao2":
  2577. case "Odogu_OmuriceOppai":
  2578. case "Odogu_AcquaPazza":
  2579. case "Odogu_Sandwich":
  2580. case "Odogu_vichyssoise":
  2581. case "Odogu_BirthdayCake":
  2582. case "Odogu_Shortcake":
  2583. case "Odogu_MontBlanc":
  2584. case "Odogu_Pafe":
  2585. case "Odogu_Smoothie_Red":
  2586. case "Odogu_Smoothie_Green":
  2587. case "Odogu_Cocktail_Red":
  2588. case "Odogu_Cocktail_Blue":
  2589. case "Odogu_Cocktail_Yellow":
  2590. case "Odogu_Coffiecup":
  2591. case "Odogu_WineBottle(cap_off)":
  2592. case "Odogu_WineBottle(cap_on)":
  2593. case "Odogu_Jyouro":
  2594. case "Odogu_Planter_Red":
  2595. case "Odogu_Planter_Lightblue":
  2596. case "Odogu_MariGold":
  2597. case "Odogu_CasinoChip_10":
  2598. case "Odogu_CasinoChip_100":
  2599. case "Odogu_CasinoChip_1000":
  2600. case "Odogu_CardShooter":
  2601. case "Odogu_CardsDeck":
  2602. case "Odogu_Card_s1":
  2603. case "Odogu_Card_s2":
  2604. case "Odogu_Card_s3":
  2605. case "Odogu_Card_s4":
  2606. case "Odogu_Card_s5":
  2607. case "Odogu_Card_s6":
  2608. case "Odogu_Card_s7":
  2609. case "Odogu_Card_s8":
  2610. case "Odogu_Card_s9":
  2611. case "Odogu_Card_s10":
  2612. case "Odogu_Card_s11":
  2613. case "Odogu_Card_s12":
  2614. case "Odogu_Card_s13":
  2615. case "Odogu_Card_h1":
  2616. case "Odogu_Card_h2":
  2617. case "Odogu_Card_h3":
  2618. case "Odogu_Card_h4":
  2619. case "Odogu_Card_h5":
  2620. case "Odogu_Card_h6":
  2621. case "Odogu_Card_h7":
  2622. case "Odogu_Card_h8":
  2623. case "Odogu_Card_h9":
  2624. case "Odogu_Card_h10":
  2625. case "Odogu_Card_h11":
  2626. case "Odogu_Card_h12":
  2627. case "Odogu_Card_h13":
  2628. case "Odogu_Card_d1":
  2629. case "Odogu_Card_d2":
  2630. case "Odogu_Card_d3":
  2631. case "Odogu_Card_d4":
  2632. case "Odogu_Card_d5":
  2633. case "Odogu_Card_d6":
  2634. case "Odogu_Card_d7":
  2635. case "Odogu_Card_d8":
  2636. case "Odogu_Card_d9":
  2637. case "Odogu_Card_d10":
  2638. case "Odogu_Card_d11":
  2639. case "Odogu_Card_d12":
  2640. case "Odogu_Card_d13":
  2641. case "Odogu_Card_c1":
  2642. case "Odogu_Card_c2":
  2643. case "Odogu_Card_c3":
  2644. case "Odogu_Card_c4":
  2645. case "Odogu_Card_c5":
  2646. case "Odogu_Card_c6":
  2647. case "Odogu_Card_c7":
  2648. case "Odogu_Card_c8":
  2649. case "Odogu_Card_c9":
  2650. case "Odogu_Card_c10":
  2651. case "Odogu_Card_c11":
  2652. case "Odogu_Card_c12":
  2653. case "Odogu_Card_c13":
  2654. case "Odogu_Card_joker":
  2655. zero.z = 0.5f;
  2656. zero2.x = -90f;
  2657. goto IL_A0BF;
  2658. }
  2659. zero.z = 0.5f;
  2660. if (gameObject2.name.StartsWith("Odogu_"))
  2661. {
  2662. foreach (object obj4 in gameObject2.transform)
  2663. {
  2664. Transform transform2 = (Transform)obj4;
  2665. if (transform2.GetComponent<Collider>() != null)
  2666. {
  2667. transform2.GetComponent<Collider>().enabled = false;
  2668. }
  2669. }
  2670. }
  2671. else if (gameObject2.GetComponent<Collider>() != null)
  2672. {
  2673. gameObject2.GetComponent<Collider>().enabled = false;
  2674. }
  2675. IL_A0BF:
  2676. gameObject2.transform.localPosition = zero;
  2677. gameObject2.transform.localRotation = Quaternion.Euler(zero2);
  2678. doguCnt = doguBObject.Count - 1;
  2679. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2680. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  2681. gDogu[doguCnt].layer = 8;
  2682. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  2683. gDogu[doguCnt].SetActive(false);
  2684. gDogu[doguCnt].transform.position = gameObject2.transform.position;
  2685. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  2686. mDogu[doguCnt].isScale = false;
  2687. mDogu[doguCnt].obj = gDogu[doguCnt];
  2688. mDogu[doguCnt].maid = gameObject2;
  2689. mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
  2690. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  2691. mDogu[doguCnt].ido = 1;
  2692. if (doguBIndex == 6 || doguBIndex == 7)
  2693. {
  2694. mDogu[doguCnt].isScale2 = true;
  2695. mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
  2696. }
  2697. }
  2698. GUI.EndScrollView();
  2699. GUI.enabled = true;
  2700. if (bgmCombo.isClickedComboButton)
  2701. {
  2702. GUI.enabled = false;
  2703. }
  2704. listStyle3.padding.top = GetPix(1);
  2705. listStyle3.padding.bottom = GetPix(0);
  2706. listStyle3.fontSize = GetPix(12);
  2707. int num10 = bgCombo.List(new Rect(GetPix(31),
  2708. GetPix(53),
  2709. GetPix(95),
  2710. GetPix(23)),
  2711. bgComboList[bgIndex].text,
  2712. bgComboList,
  2713. guistyle4,
  2714. "box",
  2715. listStyle3);
  2716. if (GUI.Button(new Rect(GetPix(5), GetPix(53), GetPix(23), GetPix(23)),
  2717. "<",
  2718. guistyle3))
  2719. {
  2720. num10--;
  2721. if (num10 <= -1)
  2722. {
  2723. num10 = bgArray.Length - 1;
  2724. }
  2725. }
  2726. if (GUI.Button(new Rect(GetPix(129), GetPix(53), GetPix(23), GetPix(23)),
  2727. ">",
  2728. guistyle3))
  2729. {
  2730. num10++;
  2731. if (num10 == bgArray.Length)
  2732. {
  2733. num10 = 0;
  2734. }
  2735. }
  2736. if (bgIndex != num10)
  2737. {
  2738. bgIndex = num10;
  2739. bg.localScale = new Vector3(1f, 1f, 1f);
  2740. if (bgArray[bgIndex].Length == 36)
  2741. {
  2742. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  2743. }
  2744. else
  2745. {
  2746. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  2747. }
  2748. bgCombo.selectedItemIndex = bgIndex;
  2749. if (bgArray[bgIndex] == "karaokeroom")
  2750. {
  2751. bg.transform.position = bgObject.transform.position;
  2752. Vector3 zero = Vector3.zero;
  2753. Vector3 zero2 = Vector3.zero;
  2754. zero2.y = 90f;
  2755. zero.z = 4f;
  2756. zero.x = 1f;
  2757. bg.transform.localPosition = zero;
  2758. bg.transform.localRotation = Quaternion.Euler(zero2);
  2759. }
  2760. }
  2761. GUI.enabled = true;
  2762. int num11 = bgmCombo.List(new Rect(GetPix(31),
  2763. GetPix(25),
  2764. GetPix(95),
  2765. GetPix(23)),
  2766. bgmComboList[bgmIndex].text,
  2767. bgmComboList,
  2768. guistyle4,
  2769. "box",
  2770. listStyle3);
  2771. if (GUI.Button(new Rect(GetPix(5), GetPix(25), GetPix(23), GetPix(23)),
  2772. "<",
  2773. guistyle3))
  2774. {
  2775. num11--;
  2776. if (num11 <= -1)
  2777. {
  2778. num11 = bgmArray.Length - 1;
  2779. }
  2780. }
  2781. if (GUI.Button(new Rect(GetPix(129), GetPix(25), GetPix(23), GetPix(23)),
  2782. ">",
  2783. guistyle3))
  2784. {
  2785. num11++;
  2786. if (num11 == bgmArray.Length)
  2787. {
  2788. num11 = 0;
  2789. }
  2790. }
  2791. if (bgmIndex != num11)
  2792. {
  2793. bgmIndex = num11;
  2794. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  2795. bgmCombo.selectedItemIndex = bgmIndex;
  2796. }
  2797. GUI.DragWindow();
  2798. if (bgmCombo.isClickedComboButton)
  2799. {
  2800. GUI.enabled = false;
  2801. }
  2802. }
  2803. private void PoseWindow(int winID)
  2804. {
  2805. GUIStyle style1 = "label";
  2806. style1.fontSize = GetPix(12);
  2807. style1.alignment = TextAnchor.UpperLeft;
  2808. GUIStyle style2 = "label";
  2809. style2.fontSize = GetPix(11);
  2810. style2.alignment = TextAnchor.UpperLeft;
  2811. GUIStyle style3 = "button";
  2812. style3.fontSize = GetPix(20);
  2813. GUIStyle buttonStyle1 = "button";
  2814. buttonStyle1.fontSize = GetPix(14);
  2815. buttonStyle1.alignment = TextAnchor.MiddleLeft;
  2816. GUIStyle buttonStyle2 = "button";
  2817. buttonStyle2.fontSize = GetPix(12);
  2818. buttonStyle2.alignment = TextAnchor.MiddleLeft;
  2819. GUIStyle style4 = new GUIStyle("toggle")
  2820. {
  2821. fontSize = GetPix(13)
  2822. };
  2823. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  2824. Maid maid = maidArray[selectMaidIndex];
  2825. if (!poseInitFlg)
  2826. {
  2827. listStyle2.normal.textColor = Color.white;
  2828. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  2829. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  2830. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  2831. listStyle2.fontSize = GetPix(12);
  2832. listStyle3.normal.textColor = Color.white;
  2833. listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  2834. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  2835. listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(1);
  2836. listStyle3.padding.bottom = GetPix(0);
  2837. listStyle3.fontSize = GetPix(12);
  2838. listStyle4.normal.textColor = Color.white;
  2839. listStyle4.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  2840. listStyle4.onHover.background = listStyle4.hover.background = new Texture2D(2, 2);
  2841. listStyle4.padding.left = listStyle4.padding.right = listStyle4.padding.top = 3;
  2842. listStyle4.padding.bottom = 3;
  2843. listStyle4.fontSize = GetPix(13);
  2844. poseCombo.selectedItemIndex = 0;
  2845. int group = (int)groupList[0];
  2846. poseComboList = new GUIContent[group];
  2847. for (int index = 0; index < group; ++index)
  2848. {
  2849. poseComboList[index] = new GUIContent((index + 1).ToString() + ":" + poseArray[index]);
  2850. }
  2851. poseGroupCombo.selectedItemIndex = 0;
  2852. poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
  2853. poseGroupComboList[0] = new GUIContent("1:通常");
  2854. for (int index = 0; index < poseGroupArray.Length; ++index)
  2855. {
  2856. if (poseGroupArray[index] == "maid_dressroom01")
  2857. {
  2858. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":立ち");
  2859. }
  2860. if (poseGroupArray[index] == "tennis_kamae_f")
  2861. {
  2862. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":中腰");
  2863. }
  2864. if (poseGroupArray[index] == "senakanagasi_f")
  2865. {
  2866. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":膝をつく");
  2867. }
  2868. if (poseGroupArray[index] == "work_hansei")
  2869. {
  2870. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":座り");
  2871. }
  2872. if (poseGroupArray[index] == "inu_taiki_f")
  2873. {
  2874. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":四つん這い");
  2875. }
  2876. if (poseGroupArray[index] == "syagami_pose_f")
  2877. {
  2878. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":床座り");
  2879. }
  2880. if (poseGroupArray[index] == "densyasuwari_taiki_f")
  2881. {
  2882. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":椅子座り");
  2883. }
  2884. if (poseGroupArray[index] == "work_kaiwa")
  2885. {
  2886. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ソファー座り");
  2887. }
  2888. if (poseGroupArray[index] == "dance_cm3d2_001_f1,14.14")
  2889. {
  2890. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ドキドキ☆Fallin' Love");
  2891. }
  2892. if (poseGroupArray[index] == "dance_cm3d_001_f1,39.25")
  2893. {
  2894. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":entrance to you");
  2895. }
  2896. if (poseGroupArray[index] == "dance_cm3d_002_end_f1,50.71")
  2897. {
  2898. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":scarlet leap");
  2899. }
  2900. if (poseGroupArray[index] == "dance_cm3d2_002_smt_f,7.76,")
  2901. {
  2902. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":stellar my tears");
  2903. }
  2904. if (poseGroupArray[index] == "dance_cm3d_003_sp2_f1,90.15")
  2905. {
  2906. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":rhythmix to you");
  2907. }
  2908. if (poseGroupArray[index] == "dance_cm3d2_003_hs_f1,0.01,")
  2909. {
  2910. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":happy!happy!スキャンダル!!");
  2911. }
  2912. if (poseGroupArray[index] == "dance_cm3d_004_kano_f1,124.93")
  2913. {
  2914. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":Can Know Two Close");
  2915. }
  2916. if (poseGroupArray[index] == "dance_cm3d2_004_sse_f1,0.01")
  2917. {
  2918. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":sweet sweet everyday");
  2919. }
  2920. if (poseGroupArray[index] == "turusi_sex_in_taiki_f")
  2921. {
  2922. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":拘束");
  2923. }
  2924. if (poseGroupArray[index] == "rosyutu_pose01_f")
  2925. {
  2926. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ");
  2927. }
  2928. if (poseGroupArray[index] == "rosyutu_aruki_f_once_,1.37")
  2929. {
  2930. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":歩き");
  2931. }
  2932. if (poseGroupArray[index] == "stand_desk1")
  2933. {
  2934. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":その他");
  2935. }
  2936. if (poseGroupArray[index] == poseArray5[0])
  2937. {
  2938. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンスMC");
  2939. }
  2940. if (poseGroupArray[index] == poseArray6[0])
  2941. {
  2942. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンス");
  2943. }
  2944. if (existPose && strS != "")
  2945. {
  2946. if (index == poseGroupArray.Length - 4)
  2947. {
  2948. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  2949. }
  2950. if (index == poseGroupArray.Length - 3)
  2951. {
  2952. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  2953. }
  2954. if (index == poseGroupArray.Length - 2)
  2955. {
  2956. poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
  2957. }
  2958. if (index == poseGroupArray.Length - 1)
  2959. {
  2960. poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
  2961. }
  2962. }
  2963. else if (existPose && strS == "")
  2964. {
  2965. if (index == poseGroupArray.Length - 3)
  2966. {
  2967. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  2968. }
  2969. if (index == poseGroupArray.Length - 2)
  2970. {
  2971. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  2972. }
  2973. if (index == poseGroupArray.Length - 1)
  2974. {
  2975. poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
  2976. }
  2977. }
  2978. else if (!existPose && strS != "")
  2979. {
  2980. if (index == poseGroupArray.Length - 3)
  2981. {
  2982. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  2983. }
  2984. if (index == poseGroupArray.Length - 2)
  2985. {
  2986. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  2987. }
  2988. if (index == poseGroupArray.Length - 1)
  2989. {
  2990. poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
  2991. }
  2992. }
  2993. else
  2994. {
  2995. if (index == poseGroupArray.Length - 2)
  2996. {
  2997. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  2998. }
  2999. if (index == poseGroupArray.Length - 1)
  3000. {
  3001. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3002. }
  3003. }
  3004. }
  3005. poseInitFlg = true;
  3006. itemCombo.selectedItemIndex = 0;
  3007. int length = itemArray.Length;
  3008. itemComboList = new GUIContent[length - 1];
  3009. for (int index = 0; index < length; ++index)
  3010. {
  3011. if (index == 0)
  3012. {
  3013. itemComboList[index] = new GUIContent("アイテム無し");
  3014. }
  3015. else
  3016. {
  3017. switch (itemArray[index])
  3018. {
  3019. case "handitem,HandItemR_WineGlass_I_.menu":
  3020. itemComboList[index] = new GUIContent(index.ToString() + ":ワイングラス");
  3021. break;
  3022. case "handitem,HandItemR_WineBottle_I_.menu":
  3023. itemComboList[index] = new GUIContent(index.ToString() + ":ワインボトル");
  3024. break;
  3025. case "handitem,handitemr_racket_I_.menu":
  3026. itemComboList[index] = new GUIContent(index.ToString() + ":ラケット");
  3027. break;
  3028. case "handitem,HandItemR_Hataki_I_.menu":
  3029. itemComboList[index] = new GUIContent(index.ToString() + ":ハタキ");
  3030. break;
  3031. case "handitem,HandItemR_Mop_I_.menu":
  3032. itemComboList[index] = new GUIContent(index.ToString() + ":モップ");
  3033. break;
  3034. case "handitem,HandItemR_Houki_I_.menu":
  3035. itemComboList[index] = new GUIContent(index.ToString() + ":ほうき");
  3036. break;
  3037. case "handitem,HandItemR_Zoukin2_I_.menu":
  3038. itemComboList[index] = new GUIContent(index.ToString() + ":雑巾");
  3039. break;
  3040. case "handitem,HandItemR_Chu-B_Lip_I_.menu":
  3041. itemComboList[index] = new GUIContent(index.ToString() + ":Chu-B Lip");
  3042. break;
  3043. case "handitem,HandItemR_Mimikaki_I_.menu":
  3044. itemComboList[index] = new GUIContent(index.ToString() + ":耳かき");
  3045. break;
  3046. case "handitem,HandItemR_Pen_I_.menu":
  3047. itemComboList[index] = new GUIContent(index.ToString() + ":ペン");
  3048. break;
  3049. case "handitem,HandItemR_Otama_I_.menu":
  3050. itemComboList[index] = new GUIContent(index.ToString() + ":おたま");
  3051. break;
  3052. case "handitem,HandItemR_Houchou_I_.menu":
  3053. itemComboList[index] = new GUIContent(index.ToString() + ":包丁");
  3054. break;
  3055. case "handitem,HandItemR_Book_I_.menu":
  3056. itemComboList[index] = new GUIContent(index.ToString() + ":本");
  3057. break;
  3058. case "handitem,HandItemR_Puff_I_.menu":
  3059. itemComboList[index] = new GUIContent(index.ToString() + ":パフ");
  3060. break;
  3061. case "handitem,HandItemR_Rip_I_.menu":
  3062. itemComboList[index] = new GUIContent(index.ToString() + ":リップ");
  3063. break;
  3064. case "handitem,HandItemD_Shisyuu_Hari_I_.menu":
  3065. itemComboList[index] = new GUIContent(index.ToString() + ":刺繍");
  3066. break;
  3067. case "handitem,HandItemD_Sara_Sponge_I_.menu":
  3068. itemComboList[index] = new GUIContent(index.ToString() + ":皿・スポンジ");
  3069. break;
  3070. case "kousoku_upper,KousokuU_TekaseOne_I_.menu":
  3071. itemComboList[index] = new GUIContent(index.ToString() + ":手枷1");
  3072. break;
  3073. case "kousoku_upper,KousokuU_TekaseTwo_I_.menu":
  3074. itemComboList[index] = new GUIContent(index.ToString() + ":手枷2");
  3075. break;
  3076. case "kousoku_lower,KousokuL_AshikaseUp_I_.menu":
  3077. itemComboList[index] = new GUIContent(index.ToString() + ":足枷");
  3078. break;
  3079. case "handitem,HandItemR_Usuba_Houchou_I_.menu":
  3080. itemComboList[index] = new GUIContent(index.ToString() + "薄刃包丁");
  3081. break;
  3082. case "handitem,HandItemR_Chusyaki_I_.menu":
  3083. itemComboList[index] = new GUIContent(index.ToString() + "注射器");
  3084. break;
  3085. case "handitem,HandItemR_Nei_Heartful_I_.menu":
  3086. itemComboList[index] = new GUIContent(index.ToString() + "ハートフルねい人形");
  3087. break;
  3088. case "handitem,HandItemR_Shaker_I_.menu":
  3089. itemComboList[index] = new GUIContent(index.ToString() + "シェイカー");
  3090. break;
  3091. case "handitem,HandItemR_SmartPhone_I_.menu":
  3092. itemComboList[index] = new GUIContent(index.ToString() + "スマートフォン");
  3093. break;
  3094. case "kousoku_upper,KousokuU_Ushirode_I_.menu":
  3095. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後ろ手拘束具");
  3096. break;
  3097. case "kousoku_upper,KousokuU_SMRoom_Haritsuke_I_.menu":
  3098. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷");
  3099. break;
  3100. case "kousoku_upper,KousokuU_SMRoom2_Haritsuke_I_.menu":
  3101. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷2");
  3102. break;
  3103. case "handitem,HandItemL_Dance_Hataki_I_.menu":
  3104. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスハタキ");
  3105. break;
  3106. case "handitem,HandItemL_Dance_Mop_I_.menu":
  3107. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスモップ");
  3108. break;
  3109. case "handitem,HandItemL_Dance_Zoukin_I_.menu":
  3110. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンス雑巾");
  3111. break;
  3112. case "handitem,HandItemL_Kozara_I_.menu":
  3113. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":小皿");
  3114. break;
  3115. case "handitem,HandItemR_Teacup_I_.menu":
  3116. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーカップ");
  3117. break;
  3118. case "handitem,HandItemL_Teasaucer_I_.menu":
  3119. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーソーサー");
  3120. break;
  3121. case "handitem,HandItemR_Wholecake_I_.menu":
  3122. itemComboList[index - 1] = new GUIContent("ホールケーキ");
  3123. break;
  3124. case "handitem,HandItemR_Menu_I_.menu":
  3125. itemComboList[index - 1] = new GUIContent("メニュー表");
  3126. break;
  3127. case "handitem,HandItemR_Vibe_I_.menu":
  3128. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":バイブ");
  3129. break;
  3130. case "handitem,HandItemR_VibePink_I_.menu":
  3131. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ピンクバイブ");
  3132. break;
  3133. case "handitem,HandItemR_VibeBig_I_.menu":
  3134. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":太バイブ");
  3135. break;
  3136. case "handitem,HandItemR_AnalVibe_I_.menu":
  3137. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":アナルバイブ");
  3138. break;
  3139. case "handitem,HandItemH_SoutouVibe_I_.menu":
  3140. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:双頭バイブ");
  3141. break;
  3142. case "accvag,accVag_Vibe_I_.menu":
  3143. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:バイブ");
  3144. break;
  3145. case "accvag,accVag_VibeBig_I_.menu":
  3146. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:太バイブ");
  3147. break;
  3148. case "accvag,accVag_VibePink_I_.menu":
  3149. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:ピンクバイブ");
  3150. break;
  3151. case "accanl,accAnl_AnalVibe_I_.menu":
  3152. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:アナルバイブ");
  3153. break;
  3154. case "accanl,accAnl_Photo_NomalVibe_I_.menu":
  3155. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:バイブ");
  3156. break;
  3157. case "accanl,accAnl_Photo_VibeBig_I_.menu":
  3158. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:太バイブ");
  3159. break;
  3160. case "accanl,accAnl_Photo_VibePink_I_.menu":
  3161. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:ピンクバイブ");
  3162. break;
  3163. case "handitem,HandItemL_Etoile_Saucer_I_.menu":
  3164. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーソーサー");
  3165. break;
  3166. case "handitem,HandItemR_Etoile_Teacup_I_.menu":
  3167. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーカップ");
  3168. break;
  3169. case "handitem,HandItemL_Katuramuki_Daikon_I_.menu":
  3170. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "桂むき大根");
  3171. break;
  3172. case "handitem,HandItemL_Karte_I_.menu":
  3173. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "カルテ");
  3174. break;
  3175. case "handitem,HandItemL_Cracker_I_.menu":
  3176. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "クラッカー");
  3177. break;
  3178. }
  3179. if (index == 12)
  3180. {
  3181. itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷");
  3182. }
  3183. if (index == 13)
  3184. {
  3185. itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷(下)");
  3186. }
  3187. if (index == 24)
  3188. {
  3189. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":カップ&ソーサー");
  3190. }
  3191. }
  3192. }
  3193. }
  3194. if (poseCombo.isClickedComboButton)
  3195. {
  3196. GUI.enabled = false;
  3197. }
  3198. if (poseGroupCombo.isClickedComboButton)
  3199. {
  3200. GUI.enabled = false;
  3201. }
  3202. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  3203. {
  3204. if (!isF6)
  3205. {
  3206. bool flag = true;
  3207. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  3208. {
  3209. flag = false;
  3210. }
  3211. if (GUI.Toggle(new Rect(GetPix(2),
  3212. GetPix(2),
  3213. GetPix(39),
  3214. GetPix(20)),
  3215. flag,
  3216. "配置",
  3217. style4))
  3218. {
  3219. faceFlg = false;
  3220. poseFlg = false;
  3221. // sceneFlg = false;
  3222. kankyoFlg = false;
  3223. kankyo2Flg = false;
  3224. bGui = true;
  3225. }
  3226. }
  3227. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  3228. GetPix(2),
  3229. GetPix(39),
  3230. GetPix(20)),
  3231. poseFlg,
  3232. "操作",
  3233. style4))
  3234. {
  3235. poseFlg = true;
  3236. faceFlg = false;
  3237. // sceneFlg = false;
  3238. kankyoFlg = false;
  3239. kankyo2Flg = false;
  3240. }
  3241. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  3242. faceFlg,
  3243. "表情",
  3244. style4))
  3245. {
  3246. faceFlg = true;
  3247. poseFlg = false;
  3248. // sceneFlg = false;
  3249. kankyoFlg = false;
  3250. kankyo2Flg = false;
  3251. if (!faceFlg2)
  3252. {
  3253. isFaceInit = true;
  3254. faceFlg2 = true;
  3255. maidArray[selectMaidIndex].boMabataki = false;
  3256. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  3257. }
  3258. isFaceInit = true;
  3259. }
  3260. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  3261. kankyoFlg,
  3262. "環境",
  3263. style4))
  3264. {
  3265. poseFlg = false;
  3266. faceFlg = false;
  3267. // sceneFlg = false;
  3268. kankyoFlg = true;
  3269. kankyo2Flg = false;
  3270. }
  3271. if (!line1)
  3272. {
  3273. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  3274. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  3275. }
  3276. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  3277. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  3278. style1.fontSize = GetPix(13);
  3279. style1.alignment = TextAnchor.MiddleCenter;
  3280. GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
  3281. string.Concat(selectMaidIndex + 1),
  3282. style1);
  3283. style1.fontSize = GetPix(11);
  3284. style1.alignment = TextAnchor.UpperLeft;
  3285. }
  3286. if (sceneLevel > 0)
  3287. {
  3288. int selectMaidIndex = this.selectMaidIndex;
  3289. if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
  3290. {
  3291. if (GUI.Button(new Rect(GetPix(5),
  3292. GetPix(53),
  3293. GetPix(23),
  3294. GetPix(32)),
  3295. "<",
  3296. style3))
  3297. {
  3298. --this.selectMaidIndex;
  3299. if (this.selectMaidIndex < 0)
  3300. {
  3301. this.selectMaidIndex = selectList.Count - 1;
  3302. }
  3303. isPoseInit = true;
  3304. poseFlg = true;
  3305. copyIndex = 0;
  3306. poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
  3307. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  3308. }
  3309. if (GUI.Button(new Rect(GetPix(135),
  3310. GetPix(53),
  3311. GetPix(23),
  3312. GetPix(32)),
  3313. ">",
  3314. style3))
  3315. {
  3316. ++this.selectMaidIndex;
  3317. if (selectList.Count <= this.selectMaidIndex)
  3318. {
  3319. this.selectMaidIndex = 0;
  3320. }
  3321. isPoseInit = true;
  3322. poseFlg = true;
  3323. copyIndex = 0;
  3324. poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
  3325. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  3326. }
  3327. }
  3328. if (maidArray[this.selectMaidIndex].GetThumIcon())
  3329. {
  3330. GUI.DrawTexture(new Rect(GetPix(30),
  3331. GetPix(25),
  3332. GetPix(60),
  3333. GetPix(60)),
  3334. maidArray[this.selectMaidIndex].GetThumIcon());
  3335. }
  3336. GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
  3337. maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
  3338. style1);
  3339. }
  3340. if (!isF6)
  3341. {
  3342. if (isDanceStop)
  3343. {
  3344. isStop[selectMaidIndex] = true;
  3345. isDanceStop = false;
  3346. }
  3347. if (sceneLevel == 5 && maidCnt > 1)
  3348. {
  3349. bool flag = false;
  3350. if (selectMaidIndex == isEditNo)
  3351. {
  3352. flag = true;
  3353. }
  3354. isEdit[selectMaidIndex] =
  3355. GUI.Toggle(new Rect(GetPix(5),
  3356. GetPix(25),
  3357. GetPix(50),
  3358. GetPix(16)),
  3359. flag,
  3360. "Edit",
  3361. style4);
  3362. if (isEdit[selectMaidIndex] && selectMaidIndex != isEditNo)
  3363. {
  3364. isEditNo = selectMaidIndex;
  3365. for (int index = 0; index < maidCnt; ++index)
  3366. {
  3367. if (index != isEditNo)
  3368. {
  3369. isEdit[index] = false;
  3370. }
  3371. }
  3372. SceneEdit component = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  3373. SetFieldValue<SceneEdit, Maid>(component, "m_maid", maidArray[selectMaidIndex]);
  3374. component.PartsTypeCamera(MPN.stkg);
  3375. editSelectMaid = maidArray[selectMaidIndex];
  3376. if (selectList[selectMaidIndex] != null && goSlot[(int)selectList[selectMaidIndex]] != null)
  3377. {
  3378. maidArray[selectMaidIndex].body0.goSlot =
  3379. new List<TBodySkin>(goSlot[(int)selectList[selectMaidIndex]]);
  3380. for (int index = 0; index < bodyHit[(int)selectList[selectMaidIndex]].Count; ++index)
  3381. {
  3382. maidArray[selectMaidIndex].body0.goSlot[index].bonehair.bodyhit =
  3383. bodyHit[(int)selectList[selectMaidIndex]][index];
  3384. }
  3385. }
  3386. }
  3387. }
  3388. GUI.enabled = !poseGroupCombo.isClickedComboButton;
  3389. if (isLock[selectMaidIndex])
  3390. {
  3391. GUI.enabled = false;
  3392. }
  3393. int result;
  3394. Transform transform;
  3395. if (GUI.Button(new Rect(GetPix(5), GetPix(125), GetPix(23), GetPix(23)),
  3396. "<",
  3397. style3))
  3398. {
  3399. --poseIndex[selectMaidIndex];
  3400. if (poseGroupIndex > 0)
  3401. {
  3402. if ((int)groupList[poseGroupIndex - 1] > poseIndex[selectMaidIndex])
  3403. {
  3404. poseIndex[selectMaidIndex] = poseGroupIndex < groupList.Count
  3405. ? (int)groupList[poseGroupIndex] - 1
  3406. : poseArray.Length - 1;
  3407. }
  3408. }
  3409. else if (poseIndex[selectMaidIndex] < 0)
  3410. {
  3411. poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex] - 1;
  3412. }
  3413. isPoseInit = true;
  3414. poseCombo.selectedItemIndex = poseGroupIndex <= 0
  3415. ? poseIndex[selectMaidIndex]
  3416. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3417. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  3418. {
  3419. string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
  3420. isStop[selectMaidIndex] = false;
  3421. poseCount[selectMaidIndex] = 20;
  3422. if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
  3423. {
  3424. maid.body0.MuneYureL(0.0f);
  3425. maid.body0.MuneYureR(0.0f);
  3426. }
  3427. else
  3428. {
  3429. maid.body0.MuneYureL(1f);
  3430. maid.body0.MuneYureR(1f);
  3431. }
  3432. if (strArray[0].Contains("MultipleMaidsPose"))
  3433. {
  3434. string path = strArray[0].Split('/')[1];
  3435. byte[] numArray = new byte[0];
  3436. try
  3437. {
  3438. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  3439. {
  3440. numArray = new byte[fileStream.Length];
  3441. fileStream.Read(numArray, 0, numArray.Length);
  3442. }
  3443. }
  3444. catch { }
  3445. if (0 < numArray.Length)
  3446. {
  3447. long hashCode = Path.GetFileName(path).GetHashCode();
  3448. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  3449. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  3450. {
  3451. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  3452. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  3453. };
  3454. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  3455. {
  3456. maid.SetAutoTwist(f_eType, true);
  3457. }
  3458. }
  3459. }
  3460. else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
  3461. {
  3462. loadPose[selectMaidIndex] = strArray[0];
  3463. }
  3464. else if (!strArray[0].StartsWith("dance_"))
  3465. {
  3466. maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
  3467. }
  3468. else
  3469. {
  3470. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
  3471. {
  3472. maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
  3473. }
  3474. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
  3475. }
  3476. if (strArray.Length > 1)
  3477. {
  3478. maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
  3479. isDanceStop = true;
  3480. if (strArray.Length > 2)
  3481. {
  3482. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  3483. isPoseIti[selectMaidIndex] = true;
  3484. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  3485. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  3486. }
  3487. }
  3488. }
  3489. }
  3490. if (GUI.Button(new Rect(GetPix(135),
  3491. GetPix(125),
  3492. GetPix(23),
  3493. GetPix(23)),
  3494. ">",
  3495. style3))
  3496. {
  3497. ++poseIndex[selectMaidIndex];
  3498. if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
  3499. {
  3500. if (poseIndex[selectMaidIndex] >= poseArray.Length)
  3501. {
  3502. poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex - 1];
  3503. }
  3504. }
  3505. else if (poseIndex[selectMaidIndex] >= (int)groupList[poseGroupIndex])
  3506. {
  3507. poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
  3508. }
  3509. isPoseInit = true;
  3510. poseCombo.selectedItemIndex = poseGroupIndex <= 0
  3511. ? poseIndex[selectMaidIndex]
  3512. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3513. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  3514. {
  3515. string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
  3516. isStop[selectMaidIndex] = false;
  3517. poseCount[selectMaidIndex] = 20;
  3518. if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
  3519. {
  3520. maid.body0.MuneYureL(0.0f);
  3521. maid.body0.MuneYureR(0.0f);
  3522. }
  3523. else
  3524. {
  3525. maid.body0.MuneYureL(1f);
  3526. maid.body0.MuneYureR(1f);
  3527. }
  3528. if (strArray[0].Contains("MultipleMaidsPose"))
  3529. {
  3530. string path = strArray[0].Split('/')[1];
  3531. byte[] numArray = new byte[0];
  3532. try
  3533. {
  3534. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  3535. {
  3536. numArray = new byte[fileStream.Length];
  3537. fileStream.Read(numArray, 0, numArray.Length);
  3538. }
  3539. }
  3540. catch { }
  3541. if (0 < numArray.Length)
  3542. {
  3543. long hashCode = Path.GetFileName(path).GetHashCode();
  3544. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  3545. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  3546. {
  3547. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  3548. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  3549. };
  3550. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  3551. {
  3552. maid.SetAutoTwist(f_eType, true);
  3553. }
  3554. }
  3555. }
  3556. else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
  3557. {
  3558. loadPose[selectMaidIndex] = strArray[0];
  3559. }
  3560. else if (!strArray[0].StartsWith("dance_"))
  3561. {
  3562. maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
  3563. }
  3564. else
  3565. {
  3566. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
  3567. {
  3568. maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
  3569. }
  3570. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
  3571. }
  3572. if (strArray.Length > 1)
  3573. {
  3574. maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
  3575. isDanceStop = true;
  3576. if (strArray.Length > 2)
  3577. {
  3578. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  3579. isPoseIti[selectMaidIndex] = true;
  3580. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  3581. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  3582. }
  3583. }
  3584. }
  3585. }
  3586. GUI.enabled = true;
  3587. int index1 = -1;
  3588. for (int index2 = 0; index2 < groupList.Count; ++index2)
  3589. {
  3590. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  3591. {
  3592. index1 = index2;
  3593. break;
  3594. }
  3595. }
  3596. int length1 = (int)groupList[0];
  3597. int num1 = 0;
  3598. if (index1 > 0)
  3599. {
  3600. length1 = (int)groupList[index1] - (int)groupList[index1 - 1];
  3601. num1 = (int)groupList[index1 - 1];
  3602. }
  3603. if (index1 < 0)
  3604. {
  3605. index1 = groupList.Count;
  3606. length1 = poseArray.Length - (int)groupList[index1 - 1];
  3607. num1 = (int)groupList[index1 - 1];
  3608. }
  3609. if (poseGroupCombo.selectedItemIndex != index1)
  3610. {
  3611. poseComboList = new GUIContent[length1];
  3612. int index2 = 0;
  3613. for (int index3 = num1; index3 < num1 + length1; ++index3)
  3614. {
  3615. bool flag = false;
  3616. foreach (IniKey key in Preferences["pose"].Keys)
  3617. {
  3618. if (poseArray[index3] == key.Key)
  3619. {
  3620. IniKey iniKey = Preferences["pose"][key.Key];
  3621. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  3622. {
  3623. poseComboList[index2] =
  3624. new GUIContent((index2 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  3625. + "                    " + key.Key);
  3626. flag = true;
  3627. }
  3628. }
  3629. }
  3630. if (!flag)
  3631. {
  3632. poseComboList[index2] = new GUIContent((index2 + 1).ToString() + ":" + poseArray[index3]);
  3633. }
  3634. ++index2;
  3635. }
  3636. poseGroupCombo.selectedItemIndex = index1;
  3637. poseGroupIndex = index1;
  3638. poseCombo.selectedItemIndex = 0;
  3639. }
  3640. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  3641. isLook[selectMaidIndex] =
  3642. GUI.Toggle(new Rect(GetPix(8),
  3643. GetPix(155),
  3644. GetPix(65),
  3645. GetPix(16)),
  3646. isLook[selectMaidIndex],
  3647. "顔の向き",
  3648. style4);
  3649. isPoseEdit = GUI.Toggle(new Rect(GetPix(86),
  3650. GetPix(155),
  3651. GetPix(90),
  3652. GetPix(16)),
  3653. isPoseEdit,
  3654. "ポーズ登録",
  3655. style4);
  3656. if (isPoseEdit)
  3657. {
  3658. inName3 = GUI.TextField(new Rect(GetPix(5),
  3659. GetPix(180),
  3660. GetPix(100),
  3661. GetPix(20)),
  3662. inName3);
  3663. if (GUI.Button(new Rect(GetPix(107),
  3664. GetPix(180),
  3665. GetPix(35),
  3666. GetPix(20)),
  3667. "追加",
  3668. style3))
  3669. {
  3670. isSavePose = true;
  3671. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  3672. existPose = true;
  3673. GUI.FocusControl("");
  3674. }
  3675. if (poseGroupComboList[poseGroupCombo.selectedItemIndex].text != "99:登録ポーズ")
  3676. {
  3677. GUI.enabled = false;
  3678. }
  3679. if (GUI.Button(new Rect(GetPix(144),
  3680. GetPix(180),
  3681. GetPix(24),
  3682. GetPix(20)),
  3683. "削",
  3684. style3))
  3685. {
  3686. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  3687. List<string> stringList1 = new List<string>();
  3688. stringList1.AddRange(poseArray);
  3689. if (poseComboList[poseCombo.selectedItemIndex].text.Contains("MultipleMaidsPose"))
  3690. {
  3691. string pose = poseArray[poseIndex[selectMaidIndex]];
  3692. stringList1.Remove(pose);
  3693. string path = poseArray[poseIndex[selectMaidIndex]].Split('/')[1].Replace("                    ", "");
  3694. if (File.Exists(path))
  3695. {
  3696. File.Delete(path);
  3697. }
  3698. }
  3699. else
  3700. {
  3701. string[] strArray = poseComboList[poseCombo.selectedItemIndex].text.Split('p');
  3702. string str = strArray[strArray.Length - 1];
  3703. IniKey iniKey = Preferences["pose"]["p" + str];
  3704. if (iniKey.Value != "" || iniKey.Value != "del")
  3705. {
  3706. Preferences["pose"]["p" + str].Value = "del";
  3707. SaveConfig();
  3708. }
  3709. stringList1.Remove("p" + str);
  3710. }
  3711. GUI.FocusControl("");
  3712. poseArray = stringList1.ToArray();
  3713. int index2 = -1;
  3714. for (int index3 = 0; index3 < groupList.Count; ++index3)
  3715. {
  3716. if (poseIndex[selectMaidIndex] < (int)groupList[index3])
  3717. {
  3718. index2 = index3;
  3719. break;
  3720. }
  3721. }
  3722. int length2 = (int)groupList[0];
  3723. int num2 = 0;
  3724. if (index2 > 0)
  3725. {
  3726. length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
  3727. num2 = (int)groupList[index2 - 1];
  3728. }
  3729. if (index2 < 0)
  3730. {
  3731. index2 = groupList.Count;
  3732. length2 = poseArray.Length - (int)groupList[index2 - 1];
  3733. num2 = (int)groupList[index2 - 1];
  3734. }
  3735. poseComboList = new GUIContent[length2];
  3736. int index4 = 0;
  3737. bool existEdit = false;
  3738. for (int index3 = num2; index3 < num2 + length2; ++index3)
  3739. {
  3740. bool flag = false;
  3741. foreach (IniKey key in Preferences["pose"].Keys)
  3742. {
  3743. if (poseArray[index3] == key.Key)
  3744. {
  3745. IniKey iniKey = Preferences["pose"][key.Key];
  3746. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  3747. {
  3748. poseComboList[index4] =
  3749. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  3750. + "                    " + key.Key);
  3751. flag = true;
  3752. existEdit = true;
  3753. }
  3754. }
  3755. }
  3756. if (!flag)
  3757. {
  3758. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
  3759. }
  3760. ++index4;
  3761. }
  3762. ((Action<string, List<string>>)((path, result_list) =>
  3763. {
  3764. string[] files = Directory.GetFiles(path);
  3765. countS = 0;
  3766. for (int index = 0; index < files.Length; ++index)
  3767. {
  3768. if (Path.GetExtension(files[index]) == ".anm")
  3769. {
  3770. existEdit = true;
  3771. break;
  3772. }
  3773. }
  3774. }))(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose", new List<string>());
  3775. if (!existEdit)
  3776. {
  3777. poseIniStr = "";
  3778. List<string> stringList2 = new List<string>(50 + poseGroupArray2.Length);
  3779. stringList2.AddRange(poseGroupArray2);
  3780. stringList2.AddRange(poseGroupArrayVP);
  3781. stringList2.AddRange(poseGroupArrayFB);
  3782. stringList2.AddRange(poseGroupArray3);
  3783. stringList2.Add(poseArray5[0]);
  3784. stringList2.Add(poseArray6[0]);
  3785. stringList2.Add(strList2[0]);
  3786. stringList2.Add(strListE2[0]);
  3787. existPose = false;
  3788. poseGroupArray = stringList2.ToArray();
  3789. groupList = new ArrayList();
  3790. for (int index3 = 0; index3 < poseArray.Length; ++index3)
  3791. {
  3792. for (int index5 = 0; index5 < poseGroupArray.Length; ++index5)
  3793. {
  3794. if (poseGroupArray[index5] == poseArray[index3])
  3795. {
  3796. groupList.Add(index3);
  3797. if (poseGroupArray[index5] == strList2[0])
  3798. {
  3799. sPoseCount = index3;
  3800. }
  3801. }
  3802. }
  3803. }
  3804. poseIndex[selectMaidIndex] = 0;
  3805. poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
  3806. poseGroupComboList[0] = new GUIContent("1:通常");
  3807. for (int index3 = 0; index3 < poseGroupArray.Length; ++index3)
  3808. {
  3809. if (poseGroupArray[index3] == "maid_dressroom01")
  3810. {
  3811. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":立ち");
  3812. }
  3813. if (poseGroupArray[index3] == "tennis_kamae_f")
  3814. {
  3815. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":中腰");
  3816. }
  3817. if (poseGroupArray[index3] == "senakanagasi_f")
  3818. {
  3819. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":膝をつく");
  3820. }
  3821. if (poseGroupArray[index3] == "work_hansei")
  3822. {
  3823. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":座り");
  3824. }
  3825. if (poseGroupArray[index3] == "inu_taiki_f")
  3826. {
  3827. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":四つん這い");
  3828. }
  3829. if (poseGroupArray[index3] == "syagami_pose_f")
  3830. {
  3831. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":床座り");
  3832. }
  3833. if (poseGroupArray[index3] == "densyasuwari_taiki_f")
  3834. {
  3835. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":椅子座り");
  3836. }
  3837. if (poseGroupArray[index3] == "work_kaiwa")
  3838. {
  3839. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ソファー座り");
  3840. }
  3841. if (poseGroupArray[index3] == "dance_cm3d2_001_f1,14.14")
  3842. {
  3843. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ドキドキ☆Fallin' Love");
  3844. }
  3845. if (poseGroupArray[index3] == "dance_cm3d_001_f1,39.25")
  3846. {
  3847. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":entrance to you");
  3848. }
  3849. if (poseGroupArray[index3] == "dance_cm3d_002_end_f1,50.71")
  3850. {
  3851. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":scarlet leap");
  3852. }
  3853. if (poseGroupArray[index3] == "dance_cm3d2_002_smt_f,7.76,")
  3854. {
  3855. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":stellar my tears");
  3856. }
  3857. if (poseGroupArray[index3] == "dance_cm3d_003_sp2_f1,90.15")
  3858. {
  3859. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":rhythmix to you");
  3860. }
  3861. if (poseGroupArray[index3] == "dance_cm3d2_003_hs_f1,0.01,")
  3862. {
  3863. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":happy!happy!スキャンダル!!");
  3864. }
  3865. if (poseGroupArray[index3] == "dance_cm3d_004_kano_f1,124.93")
  3866. {
  3867. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":Can Know Two Close");
  3868. }
  3869. if (poseGroupArray[index3] == "dance_cm3d2_004_sse_f1,0.01")
  3870. {
  3871. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":sweet sweet everyday");
  3872. }
  3873. if (poseGroupArray[index3] == "turusi_sex_in_taiki_f")
  3874. {
  3875. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":拘束");
  3876. }
  3877. if (poseGroupArray[index3] == "rosyutu_pose01_f")
  3878. {
  3879. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ");
  3880. }
  3881. if (poseGroupArray[index3] == "rosyutu_aruki_f_once_,1.37")
  3882. {
  3883. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":歩き");
  3884. }
  3885. if (poseGroupArray[index3] == "stand_desk1")
  3886. {
  3887. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":その他");
  3888. }
  3889. if (poseGroupArray[index3] == poseArray5[0])
  3890. {
  3891. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンスMC");
  3892. }
  3893. if (poseGroupArray[index3] == poseArray6[0])
  3894. {
  3895. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンス");
  3896. }
  3897. if (index3 == poseGroupArray.Length - 2)
  3898. {
  3899. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":通常2");
  3900. }
  3901. if (index3 == poseGroupArray.Length - 1)
  3902. {
  3903. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ2");
  3904. }
  3905. }
  3906. }
  3907. else
  3908. {
  3909. poseGroupCombo.selectedItemIndex = index2;
  3910. poseGroupIndex = index2;
  3911. poseCombo.selectedItemIndex = 0;
  3912. poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
  3913. if (poseArray.Length <= poseIndex[selectMaidIndex])
  3914. {
  3915. --poseIndex[selectMaidIndex];
  3916. }
  3917. }
  3918. }
  3919. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  3920. }
  3921. else
  3922. {
  3923. if (!isLook[selectMaidIndex])
  3924. {
  3925. GUI.enabled = false;
  3926. }
  3927. GUI.Label(new Rect(GetPix(8), GetPix(175), GetPix(100), GetPix(25)),
  3928. "顔の向きX",
  3929. style2);
  3930. lookX[selectMaidIndex] =
  3931. GUI.HorizontalSlider(new Rect(GetPix(8),
  3932. GetPix(191),
  3933. GetPix(70),
  3934. GetPix(20)),
  3935. lookX[selectMaidIndex],
  3936. -0.6f,
  3937. 0.6f);
  3938. GUI.Label(new Rect(GetPix(88),
  3939. GetPix(175),
  3940. GetPix(100),
  3941. GetPix(25)),
  3942. "顔の向きY",
  3943. style2);
  3944. lookY[selectMaidIndex] =
  3945. GUI.HorizontalSlider(new Rect(GetPix(88),
  3946. GetPix(191),
  3947. GetPix(70),
  3948. GetPix(20)),
  3949. lookY[selectMaidIndex],
  3950. 0.5f,
  3951. -0.55f);
  3952. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  3953. }
  3954. int index6 = poseGroupIndex <= 0
  3955. ? poseIndex[selectMaidIndex]
  3956. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3957. string[] strArray1;
  3958. if (GUI.Button(new Rect(GetPix(5), GetPix(215), GetPix(23), GetPix(23)),
  3959. "<",
  3960. style3))
  3961. {
  3962. --itemIndex[selectMaidIndex];
  3963. if (itemIndex[selectMaidIndex] <= -1)
  3964. {
  3965. itemIndex[selectMaidIndex] = itemArray.Length - 2;
  3966. }
  3967. strArray1 = new string[2];
  3968. string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  3969. if (itemIndex[selectMaidIndex] > 13)
  3970. {
  3971. strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  3972. }
  3973. maid.DelProp(MPN.handitem, true);
  3974. maid.DelProp(MPN.accvag, true);
  3975. maid.DelProp(MPN.accanl, true);
  3976. bool flag = false;
  3977. if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13 || itemIndex[selectMaidIndex] == 23)
  3978. {
  3979. flag = true;
  3980. }
  3981. if (!flag)
  3982. {
  3983. maid.DelProp(MPN.kousoku_upper, true);
  3984. maid.DelProp(MPN.kousoku_lower, true);
  3985. }
  3986. if (strArray2[0] != "")
  3987. {
  3988. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  3989. }
  3990. if (itemIndex[selectMaidIndex] == 12)
  3991. {
  3992. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
  3993. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  3994. }
  3995. if (itemIndex[selectMaidIndex] == 13)
  3996. {
  3997. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  3998. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  3999. }
  4000. if (itemIndex[selectMaidIndex] == 23)
  4001. {
  4002. string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4003. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4004. cafeFlg[selectMaidIndex] = true;
  4005. }
  4006. maid.AllProcPropSeqStart();
  4007. itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
  4008. }
  4009. if (GUI.Button(new Rect(GetPix(135),
  4010. GetPix(215),
  4011. GetPix(23),
  4012. GetPix(23)),
  4013. ">",
  4014. style3))
  4015. {
  4016. ++itemIndex[selectMaidIndex];
  4017. if (itemIndex[selectMaidIndex] >= itemArray.Length - 1)
  4018. {
  4019. itemIndex[selectMaidIndex] = 0;
  4020. }
  4021. strArray1 = new string[2];
  4022. string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4023. if (itemIndex[selectMaidIndex] > 13)
  4024. {
  4025. strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4026. }
  4027. maid.DelProp(MPN.handitem, true);
  4028. maid.DelProp(MPN.accvag, true);
  4029. maid.DelProp(MPN.accanl, true);
  4030. bool flag = false;
  4031. if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13)
  4032. {
  4033. flag = true;
  4034. }
  4035. if (!flag)
  4036. {
  4037. maid.DelProp(MPN.kousoku_upper, true);
  4038. maid.DelProp(MPN.kousoku_lower, true);
  4039. }
  4040. if (strArray2[0] != "")
  4041. {
  4042. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  4043. }
  4044. if (itemIndex[selectMaidIndex] == 12)
  4045. {
  4046. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
  4047. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4048. }
  4049. if (itemIndex[selectMaidIndex] == 13)
  4050. {
  4051. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4052. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4053. }
  4054. if (itemIndex[selectMaidIndex] == 23)
  4055. {
  4056. string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4057. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4058. cafeFlg[selectMaidIndex] = true;
  4059. }
  4060. maid.AllProcPropSeqStart();
  4061. itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
  4062. }
  4063. if (itemCombo.isClickedComboButton)
  4064. {
  4065. GUI.enabled = false;
  4066. }
  4067. int offsetTop = GetPix(240);
  4068. int UIHeight = GetPix(330);
  4069. Rect poseWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  4070. Rect poseWindowScrollView = new Rect(0, offsetTop, rectWin.width - 20, UIHeight);
  4071. poseScrollPos = GUI.BeginScrollView(poseWindowScrollRect, poseScrollPos, poseWindowScrollView);
  4072. isWear = GUI.Toggle(new Rect(GetPix(5),
  4073. GetPix(248),
  4074. GetPix(70),
  4075. GetPix(20)),
  4076. isWear,
  4077. "トップス",
  4078. style4);
  4079. isSkirt = GUI.Toggle(new Rect(GetPix(90),
  4080. GetPix(248),
  4081. GetPix(70),
  4082. GetPix(20)),
  4083. isSkirt,
  4084. "ボトムス",
  4085. style4);
  4086. isBra = GUI.Toggle(new Rect(GetPix(5),
  4087. GetPix(273),
  4088. GetPix(80),
  4089. GetPix(20)),
  4090. isBra,
  4091. "ブラジャー",
  4092. style4);
  4093. isPanz = GUI.Toggle(new Rect(GetPix(90),
  4094. GetPix(273),
  4095. GetPix(60),
  4096. GetPix(20)),
  4097. isPanz,
  4098. "パンツ",
  4099. style4);
  4100. isHeadset = GUI.Toggle(new Rect(GetPix(5),
  4101. GetPix(298),
  4102. GetPix(70),
  4103. GetPix(20)),
  4104. isHeadset,
  4105. "ヘッド",
  4106. style4);
  4107. isMegane = GUI.Toggle(new Rect(GetPix(95),
  4108. GetPix(298),
  4109. GetPix(70),
  4110. GetPix(20)),
  4111. isMegane,
  4112. "メガネ",
  4113. style4);
  4114. isAccUde = GUI.Toggle(new Rect(GetPix(5),
  4115. GetPix(323),
  4116. GetPix(40),
  4117. GetPix(20)),
  4118. isAccUde,
  4119. "腕",
  4120. style4);
  4121. isGlove = GUI.Toggle(new Rect(GetPix(50),
  4122. GetPix(323),
  4123. GetPix(40),
  4124. GetPix(20)),
  4125. isGlove,
  4126. "手袋",
  4127. style4);
  4128. isAccSenaka = GUI.Toggle(new Rect(GetPix(95),
  4129. GetPix(323),
  4130. GetPix(40),
  4131. GetPix(20)),
  4132. isAccSenaka,
  4133. "背中",
  4134. style4);
  4135. isStkg = GUI.Toggle(new Rect(GetPix(5),
  4136. GetPix(348),
  4137. GetPix(40),
  4138. GetPix(20)),
  4139. isStkg,
  4140. "靴下",
  4141. style4);
  4142. isShoes = GUI.Toggle(new Rect(GetPix(50),
  4143. GetPix(348),
  4144. GetPix(40),
  4145. GetPix(20)),
  4146. isShoes,
  4147. "靴",
  4148. style4);
  4149. isMaid = GUI.Toggle(new Rect(GetPix(95),
  4150. GetPix(348),
  4151. GetPix(70),
  4152. GetPix(20)),
  4153. isMaid,
  4154. "メイド",
  4155. style4);
  4156. mekure1[selectMaidIndex] =
  4157. GUI.Toggle(new Rect(GetPix(5),
  4158. GetPix(373),
  4159. GetPix(62),
  4160. GetPix(20)),
  4161. mekure1[selectMaidIndex],
  4162. "めくれ前",
  4163. style4);
  4164. mekure2[selectMaidIndex] =
  4165. GUI.Toggle(new Rect(GetPix(67),
  4166. GetPix(373),
  4167. GetPix(40),
  4168. GetPix(20)),
  4169. mekure2[selectMaidIndex],
  4170. "後ろ",
  4171. style4);
  4172. zurasi[selectMaidIndex] =
  4173. GUI.Toggle(new Rect(GetPix(105),
  4174. GetPix(373),
  4175. GetPix(50),
  4176. GetPix(20)),
  4177. zurasi[selectMaidIndex],
  4178. "ずらし",
  4179. style4);
  4180. voice1[selectMaidIndex] =
  4181. GUI.Toggle(new Rect(GetPix(5),
  4182. GetPix(530),
  4183. GetPix(70),
  4184. GetPix(20)),
  4185. zFlg[selectMaidIndex],
  4186. "ボイス",
  4187. style4);
  4188. voice2[selectMaidIndex] =
  4189. GUI.Toggle(new Rect(GetPix(70),
  4190. GetPix(530),
  4191. GetPix(70),
  4192. GetPix(20)),
  4193. xFlg[selectMaidIndex],
  4194. "Hボイス",
  4195. style4);
  4196. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4197. GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 2f), line1);
  4198. GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 1f), line2);
  4199. isIK[selectMaidIndex] =
  4200. GUI.Toggle(new Rect(GetPix(5),
  4201. GetPix(411),
  4202. GetPix(30),
  4203. GetPix(20)),
  4204. isIK[selectMaidIndex],
  4205. "IK",
  4206. style4);
  4207. if (!isLock[selectMaidIndex])
  4208. {
  4209. GUI.enabled = false;
  4210. }
  4211. isLock[selectMaidIndex] =
  4212. GUI.Toggle(new Rect(GetPix(45),
  4213. GetPix(411),
  4214. GetPix(40),
  4215. GetPix(20)),
  4216. isLock[selectMaidIndex],
  4217. "解除",
  4218. style4);
  4219. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4220. if (!isIK[selectMaidIndex])
  4221. {
  4222. GUI.enabled = false;
  4223. }
  4224. isBone[selectMaidIndex] =
  4225. GUI.Toggle(new Rect(GetPix(100),
  4226. GetPix(411),
  4227. GetPix(60),
  4228. GetPix(20)),
  4229. isBone[selectMaidIndex],
  4230. "ボーン",
  4231. style4);
  4232. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4233. if (isBone[selectMaidIndex] != isBoneN[selectMaidIndex])
  4234. {
  4235. isBoneN[selectMaidIndex] = isBone[selectMaidIndex];
  4236. isChange[selectMaidIndex] = true;
  4237. }
  4238. if (!isLock[selectMaidIndex] && unLockFlg != isLock[selectMaidIndex])
  4239. {
  4240. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4241. isStop[selectMaidIndex] = false;
  4242. poseCount[selectMaidIndex] = 20;
  4243. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4244. {
  4245. maid.body0.MuneYureL(0.0f);
  4246. maid.body0.MuneYureR(0.0f);
  4247. }
  4248. else
  4249. {
  4250. maid.body0.MuneYureL(1f);
  4251. maid.body0.MuneYureR(1f);
  4252. }
  4253. if (strArray2[0].Contains("MultipleMaidsPose"))
  4254. {
  4255. string path = strArray2[0].Split('/')[1];
  4256. byte[] numArray = new byte[0];
  4257. try
  4258. {
  4259. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4260. {
  4261. numArray = new byte[fileStream.Length];
  4262. fileStream.Read(numArray, 0, numArray.Length);
  4263. }
  4264. }
  4265. catch { }
  4266. if (0 < numArray.Length)
  4267. {
  4268. long hashCode = Path.GetFileName(path).GetHashCode();
  4269. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4270. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4271. {
  4272. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  4273. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4274. };
  4275. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4276. {
  4277. maid.SetAutoTwist(f_eType, true);
  4278. }
  4279. }
  4280. }
  4281. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4282. {
  4283. loadPose[selectMaidIndex] = strArray2[0];
  4284. }
  4285. else if (!strArray2[0].StartsWith("dance_"))
  4286. {
  4287. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4288. }
  4289. else
  4290. {
  4291. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4292. {
  4293. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4294. }
  4295. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4296. }
  4297. if (strArray2.Length > 1)
  4298. {
  4299. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4300. isDanceStop = true;
  4301. if (strArray2.Length > 2)
  4302. {
  4303. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4304. isPoseIti[selectMaidIndex] = true;
  4305. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4306. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4307. }
  4308. }
  4309. mHandL[selectMaidIndex].initFlg = false;
  4310. mHandR[selectMaidIndex].initFlg = false;
  4311. mFootL[selectMaidIndex].initFlg = false;
  4312. mFootR[selectMaidIndex].initFlg = false;
  4313. pHandL[selectMaidIndex] = 0;
  4314. pHandR[selectMaidIndex] = 0;
  4315. hanten[selectMaidIndex] = false;
  4316. hantenn[selectMaidIndex] = false;
  4317. muneIKL[selectMaidIndex] = false;
  4318. muneIKR[selectMaidIndex] = false;
  4319. maid.body0.jbMuneL.enabled = true;
  4320. maid.body0.jbMuneR.enabled = true;
  4321. if (!GameMain.Instance.VRMode)
  4322. {
  4323. maidArray[selectMaidIndex].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[selectMaidIndex]];
  4324. maidArray[selectMaidIndex].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[selectMaidIndex]];
  4325. }
  4326. }
  4327. unLockFlg = isLock[selectMaidIndex];
  4328. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4329. if (!isIK[selectMaidIndex])
  4330. {
  4331. GUI.enabled = false;
  4332. }
  4333. hanten[selectMaidIndex] =
  4334. GUI.Toggle(new Rect(GetPix(5),
  4335. GetPix(479),
  4336. GetPix(70),
  4337. GetPix(20)),
  4338. hanten[selectMaidIndex],
  4339. "左右反転",
  4340. style4);
  4341. bool flag1 = GUI.Toggle(new Rect(GetPix(80),
  4342. GetPix(479),
  4343. GetPix(100),
  4344. GetPix(20)),
  4345. kotei[selectMaidIndex],
  4346. "スカート固定",
  4347. style4);
  4348. if (kotei[selectMaidIndex] != flag1)
  4349. {
  4350. kotei[selectMaidIndex] = flag1;
  4351. if (flag1)
  4352. {
  4353. SkirtListArray[selectMaidIndex] = new DynamicSkirtBone[100];
  4354. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  4355. {
  4356. DynamicSkirtBone fieldValue =
  4357. GetFieldValue<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3, "m_SkirtBone");
  4358. SkirtListArray[selectMaidIndex][index2] = fieldValue;
  4359. SetFieldValue8<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
  4360. "m_SkirtBone",
  4361. null);
  4362. }
  4363. }
  4364. else
  4365. {
  4366. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  4367. {
  4368. SetFieldValue8<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
  4369. "m_SkirtBone",
  4370. SkirtListArray[selectMaidIndex][index2]);
  4371. }
  4372. }
  4373. }
  4374. GUI.Label(new Rect(GetPix(29), GetPix(433), GetPix(100), GetPix(25)),
  4375. "右手",
  4376. style1);
  4377. GUI.Label(new Rect(GetPix(109), GetPix(433), GetPix(100), GetPix(25)),
  4378. "左手",
  4379. style1);
  4380. string text = "未選択";
  4381. if (copyIndex > 0)
  4382. {
  4383. text = copyIndex.ToString() + ":" + maidArray[copyIndex - 1].status.firstName;
  4384. }
  4385. if (maidCnt <= 1)
  4386. {
  4387. GUI.enabled = false;
  4388. }
  4389. GUI.Label(new Rect(GetPix(8), GetPix(505), GetPix(100), GetPix(25)),
  4390. "コピー",
  4391. style1);
  4392. GUI.Label(new Rect(GetPix(70), GetPix(505), GetPix(100), GetPix(25)),
  4393. text,
  4394. style1);
  4395. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton
  4396. && isIK[selectMaidIndex];
  4397. style1.fontSize = GetPix(13);
  4398. style1.alignment = TextAnchor.UpperCenter;
  4399. GUI.Label(new Rect(GetPix(-10), GetPix(449), GetPix(100), GetPix(25)),
  4400. pHandR[selectMaidIndex].ToString(),
  4401. style1);
  4402. GUI.Label(new Rect(GetPix(70), GetPix(449), GetPix(100), GetPix(25)),
  4403. pHandL[selectMaidIndex].ToString(),
  4404. style1);
  4405. style1.fontSize = GetPix(11);
  4406. style1.alignment = TextAnchor.UpperLeft;
  4407. if (GUI.Button(new Rect(GetPix(5), GetPix(448), GetPix(23), GetPix(23)),
  4408. "<",
  4409. style3))
  4410. {
  4411. --pHandR[selectMaidIndex];
  4412. if (pHandR[selectMaidIndex] < 1)
  4413. {
  4414. pHandR[selectMaidIndex] = fingerRArray.GetLength(0);
  4415. }
  4416. for (int index2 = 0; index2 < 20; ++index2)
  4417. {
  4418. string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
  4419. Finger[selectMaidIndex, index2 + 20].localEulerAngles =
  4420. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4421. }
  4422. isStop[selectMaidIndex] = true;
  4423. isLock[selectMaidIndex] = true;
  4424. for (int index2 = 0; index2 < 10; ++index2)
  4425. {
  4426. if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
  4427. {
  4428. mFinger[selectMaidIndex, index2 * 3].reset = true;
  4429. }
  4430. }
  4431. }
  4432. if (GUI.Button(new Rect(GetPix(55),
  4433. GetPix(448),
  4434. GetPix(23),
  4435. GetPix(23)),
  4436. ">",
  4437. style3))
  4438. {
  4439. ++pHandR[selectMaidIndex];
  4440. if (pHandR[selectMaidIndex] > fingerRArray.GetLength(0))
  4441. {
  4442. pHandR[selectMaidIndex] = 1;
  4443. }
  4444. for (int index2 = 0; index2 < 20; ++index2)
  4445. {
  4446. string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
  4447. Finger[selectMaidIndex, index2 + 20].localEulerAngles =
  4448. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4449. }
  4450. isStop[selectMaidIndex] = true;
  4451. isLock[selectMaidIndex] = true;
  4452. for (int index2 = 0; index2 < 10; ++index2)
  4453. {
  4454. if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
  4455. {
  4456. mFinger[selectMaidIndex, index2 * 3].reset = true;
  4457. }
  4458. }
  4459. }
  4460. if (GUI.Button(new Rect(GetPix(85),
  4461. GetPix(448),
  4462. GetPix(23),
  4463. GetPix(23)),
  4464. "<",
  4465. style3))
  4466. {
  4467. --pHandL[selectMaidIndex];
  4468. if (pHandL[selectMaidIndex] < 1)
  4469. {
  4470. pHandL[selectMaidIndex] = fingerLArray.GetLength(0);
  4471. }
  4472. for (int index2 = 0; index2 < 20; ++index2)
  4473. {
  4474. string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
  4475. Finger[selectMaidIndex, index2].localEulerAngles =
  4476. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4477. }
  4478. isStop[selectMaidIndex] = true;
  4479. isLock[selectMaidIndex] = true;
  4480. }
  4481. if (GUI.Button(new Rect(GetPix(135),
  4482. GetPix(448),
  4483. GetPix(23),
  4484. GetPix(23)),
  4485. ">",
  4486. style3))
  4487. {
  4488. ++pHandL[selectMaidIndex];
  4489. if (pHandL[selectMaidIndex] > fingerRArray.GetLength(0))
  4490. {
  4491. pHandL[selectMaidIndex] = 1;
  4492. }
  4493. for (int index2 = 0; index2 < 20; ++index2)
  4494. {
  4495. string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
  4496. Finger[selectMaidIndex, index2].localEulerAngles =
  4497. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4498. }
  4499. isStop[selectMaidIndex] = true;
  4500. isLock[selectMaidIndex] = true;
  4501. }
  4502. if (maidCnt <= 1)
  4503. {
  4504. GUI.enabled = false;
  4505. }
  4506. if (GUI.Button(new Rect(GetPix(45),
  4507. GetPix(504),
  4508. GetPix(22),
  4509. GetPix(20)),
  4510. ">",
  4511. style3))
  4512. {
  4513. ++copyIndex;
  4514. if (copyIndex - 1 == selectMaidIndex)
  4515. {
  4516. ++copyIndex;
  4517. }
  4518. if (copyIndex > maidCnt)
  4519. {
  4520. copyIndex = 0;
  4521. }
  4522. }
  4523. if (isCopy)
  4524. {
  4525. isCopy = false;
  4526. CopyIK2(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
  4527. }
  4528. if (copyIndex == 0)
  4529. {
  4530. GUI.enabled = false;
  4531. }
  4532. if (GUI.Button(new Rect(GetPix(123),
  4533. GetPix(504),
  4534. GetPix(35),
  4535. GetPix(20)),
  4536. "決定",
  4537. style3))
  4538. {
  4539. CopyIK(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
  4540. isCopy = true;
  4541. pHandL[selectMaidIndex] = pHandL[copyIndex - 1];
  4542. pHandR[selectMaidIndex] = pHandR[copyIndex - 1];
  4543. hanten[selectMaidIndex] = hanten[copyIndex - 1];
  4544. hantenn[selectMaidIndex] = hantenn[copyIndex - 1];
  4545. }
  4546. GUI.enabled = true;
  4547. if (poseCombo.isClickedComboButton || poseGroupCombo.isClickedComboButton)
  4548. {
  4549. GUI.enabled = false;
  4550. }
  4551. GUI.EndScrollView();
  4552. itemIndex2[selectMaidIndex] =
  4553. itemCombo.List(new Rect(GetPix(35),
  4554. GetPix(215),
  4555. GetPix(95),
  4556. GetPix(23)),
  4557. itemComboList[itemIndex[selectMaidIndex]].text,
  4558. itemComboList,
  4559. buttonStyle1,
  4560. "box",
  4561. listStyle3);
  4562. GUI.enabled = true;
  4563. if (poseGroupCombo.isClickedComboButton || isLock[selectMaidIndex])
  4564. {
  4565. GUI.enabled = false;
  4566. }
  4567. poseCombo.List(new Rect(GetPix(35),
  4568. GetPix(125),
  4569. GetPix(95),
  4570. GetPix(23)),
  4571. poseComboList[index6].text,
  4572. poseComboList,
  4573. buttonStyle1,
  4574. "box",
  4575. listStyle2);
  4576. if (!isLock[selectMaidIndex])
  4577. {
  4578. GUI.enabled = true;
  4579. }
  4580. int index7 = -1;
  4581. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4582. {
  4583. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4584. {
  4585. index7 = index2;
  4586. break;
  4587. }
  4588. }
  4589. if (index7 < 0)
  4590. {
  4591. index7 = groupList.Count;
  4592. }
  4593. if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
  4594. "<",
  4595. style3))
  4596. {
  4597. isPoseInit = true;
  4598. if (!isLock[selectMaidIndex])
  4599. {
  4600. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4601. {
  4602. if (index2 == 0 && poseIndex[selectMaidIndex] <= (int)groupList[index2])
  4603. {
  4604. poseIndex[selectMaidIndex] = poseIndex[selectMaidIndex] != 0 ? 0 : (int)groupList[groupList.Count - 1];
  4605. break;
  4606. }
  4607. if (index2 > 0 && poseIndex[selectMaidIndex] > (int)groupList[index2 - 1]
  4608. && poseIndex[selectMaidIndex] <= (int)groupList[index2])
  4609. {
  4610. poseIndex[selectMaidIndex] = (int)groupList[index2 - 1];
  4611. break;
  4612. }
  4613. }
  4614. if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
  4615. {
  4616. poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
  4617. }
  4618. if (maid && maid.Visible)
  4619. {
  4620. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4621. isStop[selectMaidIndex] = false;
  4622. poseCount[selectMaidIndex] = 20;
  4623. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4624. {
  4625. maid.body0.MuneYureL(0.0f);
  4626. maid.body0.MuneYureR(0.0f);
  4627. }
  4628. else
  4629. {
  4630. maid.body0.MuneYureL(1f);
  4631. maid.body0.MuneYureR(1f);
  4632. }
  4633. if (strArray2[0].Contains("MultipleMaidsPose"))
  4634. {
  4635. string path = strArray2[0].Split('/')[1];
  4636. byte[] numArray = new byte[0];
  4637. try
  4638. {
  4639. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4640. {
  4641. numArray = new byte[fileStream.Length];
  4642. fileStream.Read(numArray, 0, numArray.Length);
  4643. }
  4644. }
  4645. catch { }
  4646. if (0 < numArray.Length)
  4647. {
  4648. long hashCode = Path.GetFileName(path).GetHashCode();
  4649. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4650. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4651. {
  4652. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  4653. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4654. };
  4655. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4656. {
  4657. maid.SetAutoTwist(f_eType, true);
  4658. }
  4659. }
  4660. }
  4661. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4662. {
  4663. loadPose[selectMaidIndex] = strArray2[0];
  4664. }
  4665. else if (!strArray2[0].StartsWith("dance_"))
  4666. {
  4667. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4668. }
  4669. else
  4670. {
  4671. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4672. {
  4673. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4674. }
  4675. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4676. }
  4677. if (strArray2.Length > 1)
  4678. {
  4679. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4680. isDanceStop = true;
  4681. if (strArray2.Length > 2)
  4682. {
  4683. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4684. isPoseIti[selectMaidIndex] = true;
  4685. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4686. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4687. }
  4688. }
  4689. }
  4690. }
  4691. int index3 = -1;
  4692. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4693. {
  4694. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4695. {
  4696. index3 = index2;
  4697. break;
  4698. }
  4699. }
  4700. int length2 = (int)groupList[0];
  4701. int num2 = 0;
  4702. if (index3 > 0)
  4703. {
  4704. length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
  4705. num2 = (int)groupList[index3 - 1];
  4706. }
  4707. if (index3 < 0)
  4708. {
  4709. index3 = groupList.Count;
  4710. length2 = poseArray.Length - (int)groupList[index3 - 1];
  4711. num2 = (int)groupList[index3 - 1];
  4712. }
  4713. poseComboList = new GUIContent[length2];
  4714. int index4 = 0;
  4715. for (int index2 = num2; index2 < num2 + length2; ++index2)
  4716. {
  4717. bool flag2 = false;
  4718. foreach (IniKey key in Preferences["pose"].Keys)
  4719. {
  4720. if (poseArray[index2] == key.Key)
  4721. {
  4722. IniKey iniKey = Preferences["pose"][key.Key];
  4723. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4724. {
  4725. poseComboList[index4] =
  4726. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4727. + "                    " + key.Key);
  4728. flag2 = true;
  4729. }
  4730. }
  4731. }
  4732. if (!flag2)
  4733. {
  4734. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
  4735. }
  4736. ++index4;
  4737. }
  4738. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  4739. poseGroupCombo.selectedItemIndex = index3;
  4740. poseCombo.selectedItemIndex = 0;
  4741. }
  4742. if (GUI.Button(new Rect(GetPix(135),
  4743. GetPix(95),
  4744. GetPix(23),
  4745. GetPix(23)),
  4746. ">",
  4747. style3))
  4748. {
  4749. isPoseInit = true;
  4750. if (!isLock[selectMaidIndex])
  4751. {
  4752. int num2 = poseIndex[selectMaidIndex];
  4753. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4754. {
  4755. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4756. {
  4757. poseIndex[selectMaidIndex] = (int)groupList[index2];
  4758. break;
  4759. }
  4760. }
  4761. if (num2 == poseIndex[selectMaidIndex] && poseIndex[selectMaidIndex] >= (int)groupList[groupList.Count - 1])
  4762. {
  4763. poseIndex[selectMaidIndex] = 0;
  4764. }
  4765. if (maid && maid.Visible)
  4766. {
  4767. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4768. isStop[selectMaidIndex] = false;
  4769. poseCount[selectMaidIndex] = 20;
  4770. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4771. {
  4772. maid.body0.MuneYureL(0.0f);
  4773. maid.body0.MuneYureR(0.0f);
  4774. }
  4775. else
  4776. {
  4777. maid.body0.MuneYureL(1f);
  4778. maid.body0.MuneYureR(1f);
  4779. }
  4780. if (strArray2[0].Contains("MultipleMaidsPose"))
  4781. {
  4782. string path = strArray2[0].Split('/')[1];
  4783. byte[] numArray = new byte[0];
  4784. try
  4785. {
  4786. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4787. {
  4788. numArray = new byte[fileStream.Length];
  4789. fileStream.Read(numArray, 0, numArray.Length);
  4790. }
  4791. }
  4792. catch { }
  4793. if (0 < numArray.Length)
  4794. {
  4795. long hashCode = Path.GetFileName(path).GetHashCode();
  4796. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4797. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4798. {
  4799. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  4800. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4801. };
  4802. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4803. {
  4804. maid.SetAutoTwist(f_eType, true);
  4805. }
  4806. }
  4807. }
  4808. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4809. {
  4810. loadPose[selectMaidIndex] = strArray2[0];
  4811. }
  4812. else if (!strArray2[0].StartsWith("dance_"))
  4813. {
  4814. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4815. }
  4816. else
  4817. {
  4818. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4819. {
  4820. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4821. }
  4822. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4823. }
  4824. if (strArray2.Length > 1)
  4825. {
  4826. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4827. isDanceStop = true;
  4828. if (strArray2.Length > 2)
  4829. {
  4830. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4831. isPoseIti[selectMaidIndex] = true;
  4832. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4833. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4834. }
  4835. }
  4836. }
  4837. }
  4838. int index3 = -1;
  4839. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4840. {
  4841. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4842. {
  4843. index3 = index2;
  4844. break;
  4845. }
  4846. }
  4847. int length2 = (int)groupList[0];
  4848. int num3 = 0;
  4849. if (index3 > 0)
  4850. {
  4851. length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
  4852. num3 = (int)groupList[index3 - 1];
  4853. }
  4854. if (index3 < 0)
  4855. {
  4856. index3 = groupList.Count;
  4857. length2 = poseArray.Length - (int)groupList[index3 - 1];
  4858. num3 = (int)groupList[index3 - 1];
  4859. }
  4860. poseComboList = new GUIContent[length2];
  4861. int index4 = 0;
  4862. for (int index2 = num3; index2 < num3 + length2; ++index2)
  4863. {
  4864. bool flag2 = false;
  4865. foreach (IniKey key in Preferences["pose"].Keys)
  4866. {
  4867. if (poseArray[index2] == key.Key)
  4868. {
  4869. IniKey iniKey = Preferences["pose"][key.Key];
  4870. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4871. {
  4872. poseComboList[index4] =
  4873. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4874. + "                    " + key.Key);
  4875. flag2 = true;
  4876. }
  4877. }
  4878. }
  4879. if (!flag2)
  4880. {
  4881. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
  4882. }
  4883. ++index4;
  4884. }
  4885. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  4886. poseGroupCombo.selectedItemIndex = index3;
  4887. poseCombo.selectedItemIndex = 0;
  4888. }
  4889. poseGroupIndex =
  4890. poseGroupCombo.List(new Rect(GetPix(35),
  4891. GetPix(95),
  4892. GetPix(95),
  4893. GetPix(23)),
  4894. poseGroupComboList[index7].text,
  4895. poseGroupComboList,
  4896. buttonStyle2,
  4897. "box",
  4898. listStyle4);
  4899. if (poseGroupCombo.isClickedComboButton)
  4900. {
  4901. isCombo2 = true;
  4902. }
  4903. else if (isCombo2)
  4904. {
  4905. isCombo2 = false;
  4906. isPoseInit = true;
  4907. poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
  4908. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  4909. {
  4910. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4911. isStop[selectMaidIndex] = false;
  4912. poseCount[selectMaidIndex] = 20;
  4913. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4914. {
  4915. maid.body0.MuneYureL(0.0f);
  4916. maid.body0.MuneYureR(0.0f);
  4917. }
  4918. else
  4919. {
  4920. maid.body0.MuneYureL(1f);
  4921. maid.body0.MuneYureR(1f);
  4922. }
  4923. if (strArray2[0].Contains("MultipleMaidsPose"))
  4924. {
  4925. string path = strArray2[0].Split('/')[1];
  4926. byte[] numArray = new byte[0];
  4927. try
  4928. {
  4929. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4930. {
  4931. numArray = new byte[fileStream.Length];
  4932. fileStream.Read(numArray, 0, numArray.Length);
  4933. }
  4934. }
  4935. catch { }
  4936. if (0 < numArray.Length)
  4937. {
  4938. long hashCode = Path.GetFileName(path).GetHashCode();
  4939. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4940. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4941. {
  4942. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  4943. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4944. };
  4945. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4946. {
  4947. maid.SetAutoTwist(f_eType, true);
  4948. }
  4949. }
  4950. }
  4951. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4952. {
  4953. loadPose[selectMaidIndex] = strArray2[0];
  4954. }
  4955. else if (!strArray2[0].StartsWith("dance_"))
  4956. {
  4957. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4958. }
  4959. else
  4960. {
  4961. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4962. {
  4963. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4964. }
  4965. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4966. }
  4967. if (strArray2.Length > 1)
  4968. {
  4969. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4970. isDanceStop = true;
  4971. if (strArray2.Length > 2)
  4972. {
  4973. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4974. isPoseIti[selectMaidIndex] = true;
  4975. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4976. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4977. }
  4978. }
  4979. }
  4980. int index2 = -1;
  4981. for (int index3 = 0; index3 < groupList.Count; ++index3)
  4982. {
  4983. if (poseIndex[selectMaidIndex] < (int)groupList[index3])
  4984. {
  4985. index2 = index3;
  4986. break;
  4987. }
  4988. }
  4989. int length2 = (int)groupList[0];
  4990. int num2 = 0;
  4991. if (index2 > 0)
  4992. {
  4993. length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
  4994. num2 = (int)groupList[index2 - 1];
  4995. }
  4996. if (index2 < 0)
  4997. {
  4998. index2 = groupList.Count;
  4999. length2 = poseArray.Length - (int)groupList[index2 - 1];
  5000. num2 = (int)groupList[index2 - 1];
  5001. }
  5002. poseComboList = new GUIContent[length2];
  5003. int index4 = 0;
  5004. for (int index3 = num2; index3 < num2 + length2; ++index3)
  5005. {
  5006. bool flag2 = false;
  5007. foreach (IniKey key in Preferences["pose"].Keys)
  5008. {
  5009. if (poseArray[index3] == key.Key)
  5010. {
  5011. IniKey iniKey = Preferences["pose"][key.Key];
  5012. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  5013. {
  5014. poseComboList[index4] =
  5015. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  5016. + "                    " + key.Key);
  5017. flag2 = true;
  5018. }
  5019. }
  5020. }
  5021. if (!flag2)
  5022. {
  5023. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
  5024. }
  5025. ++index4;
  5026. }
  5027. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  5028. poseGroupCombo.selectedItemIndex = index2;
  5029. poseCombo.selectedItemIndex = 0;
  5030. }
  5031. if (poseCombo.isClickedComboButton)
  5032. {
  5033. isCombo = true;
  5034. }
  5035. else if (isCombo)
  5036. {
  5037. isCombo = false;
  5038. isPoseInit = true;
  5039. poseIndex[selectMaidIndex] = poseGroupIndex <= 0
  5040. ? poseCombo.selectedItemIndex
  5041. : (int)groupList[poseGroupIndex - 1] + poseCombo.selectedItemIndex;
  5042. if (poseIndex[selectMaidIndex] == poseArray.Length)
  5043. {
  5044. poseIndex[selectMaidIndex] = 0;
  5045. }
  5046. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  5047. {
  5048. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5049. isStop[selectMaidIndex] = false;
  5050. poseCount[selectMaidIndex] = 20;
  5051. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5052. {
  5053. maid.body0.MuneYureL(0.0f);
  5054. maid.body0.MuneYureR(0.0f);
  5055. }
  5056. else
  5057. {
  5058. maid.body0.MuneYureL(1f);
  5059. maid.body0.MuneYureR(1f);
  5060. }
  5061. if (strArray2[0].Contains("MultipleMaidsPose"))
  5062. {
  5063. string path = strArray2[0].Split('/')[1];
  5064. byte[] numArray = new byte[0];
  5065. try
  5066. {
  5067. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5068. {
  5069. numArray = new byte[fileStream.Length];
  5070. fileStream.Read(numArray, 0, numArray.Length);
  5071. }
  5072. }
  5073. catch { }
  5074. if (0 < numArray.Length)
  5075. {
  5076. long hashCode = Path.GetFileName(path).GetHashCode();
  5077. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5078. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5079. {
  5080. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  5081. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5082. };
  5083. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5084. {
  5085. maid.SetAutoTwist(f_eType, true);
  5086. }
  5087. }
  5088. }
  5089. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5090. {
  5091. loadPose[selectMaidIndex] = strArray2[0];
  5092. }
  5093. else if (!strArray2[0].StartsWith("dance_"))
  5094. {
  5095. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5096. }
  5097. else
  5098. {
  5099. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5100. {
  5101. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5102. }
  5103. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5104. }
  5105. if (strArray2.Length > 1)
  5106. {
  5107. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5108. isDanceStop = true;
  5109. if (strArray2.Length > 2)
  5110. {
  5111. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5112. isPoseIti[selectMaidIndex] = true;
  5113. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5114. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5115. }
  5116. }
  5117. }
  5118. }
  5119. if (itemCombo.isClickedComboButton)
  5120. {
  5121. isCombo3 = true;
  5122. }
  5123. else if (isCombo3)
  5124. {
  5125. isCombo3 = false;
  5126. strArray1 = new string[2];
  5127. string[] strArray2 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
  5128. if (itemIndex2[selectMaidIndex] > 13)
  5129. {
  5130. strArray2 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
  5131. }
  5132. maid.DelProp(MPN.handitem, true);
  5133. bool flag2 = false;
  5134. if (itemIndex2[selectMaidIndex] == 0)
  5135. {
  5136. maid.DelProp(MPN.accvag, true);
  5137. maid.DelProp(MPN.accanl, true);
  5138. }
  5139. if (itemIndex2[selectMaidIndex] == 12 || itemIndex2[selectMaidIndex] == 13)
  5140. {
  5141. flag2 = true;
  5142. }
  5143. if (!flag2)
  5144. {
  5145. maid.DelProp(MPN.kousoku_upper, true);
  5146. maid.DelProp(MPN.kousoku_lower, true);
  5147. }
  5148. if (strArray2[0] != "")
  5149. {
  5150. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  5151. }
  5152. if (itemIndex2[selectMaidIndex] == 12)
  5153. {
  5154. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] - 1].Split(',');
  5155. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5156. }
  5157. if (itemIndex2[selectMaidIndex] == 13)
  5158. {
  5159. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
  5160. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5161. }
  5162. if (itemIndex2[selectMaidIndex] == 23)
  5163. {
  5164. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
  5165. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5166. cafeFlg[selectMaidIndex] = true;
  5167. }
  5168. maid.AllProcPropSeqStart();
  5169. itemCombo.selectedItemIndex = itemIndex2[selectMaidIndex];
  5170. itemIndex[selectMaidIndex] = itemIndex2[selectMaidIndex];
  5171. }
  5172. }
  5173. else
  5174. {
  5175. isWear = GUI.Toggle(new Rect(GetPix(5),
  5176. GetPix(98),
  5177. GetPix(70),
  5178. GetPix(20)),
  5179. isWear,
  5180. "トップス",
  5181. style4);
  5182. isSkirt = GUI.Toggle(new Rect(GetPix(90),
  5183. GetPix(98),
  5184. GetPix(70),
  5185. GetPix(20)),
  5186. isSkirt,
  5187. "ボトムス",
  5188. style4);
  5189. isBra = GUI.Toggle(new Rect(GetPix(5),
  5190. GetPix(123),
  5191. GetPix(80),
  5192. GetPix(20)),
  5193. isBra,
  5194. "ブラジャー",
  5195. style4);
  5196. isPanz = GUI.Toggle(new Rect(GetPix(90),
  5197. GetPix(123),
  5198. GetPix(60),
  5199. GetPix(20)),
  5200. isPanz,
  5201. "パンツ",
  5202. style4);
  5203. isHeadset = GUI.Toggle(new Rect(GetPix(5),
  5204. GetPix(148),
  5205. GetPix(70),
  5206. GetPix(20)),
  5207. isHeadset,
  5208. "ヘッド",
  5209. style4);
  5210. isMegane = GUI.Toggle(new Rect(GetPix(90),
  5211. GetPix(148),
  5212. GetPix(70),
  5213. GetPix(20)),
  5214. isMegane,
  5215. "メガネ",
  5216. style4);
  5217. isAccUde = GUI.Toggle(new Rect(GetPix(5),
  5218. GetPix(173),
  5219. GetPix(40),
  5220. GetPix(20)),
  5221. isAccUde,
  5222. "腕",
  5223. style4);
  5224. isGlove = GUI.Toggle(new Rect(GetPix(45),
  5225. GetPix(173),
  5226. GetPix(40),
  5227. GetPix(20)),
  5228. isGlove,
  5229. "手袋",
  5230. style4);
  5231. isAccSenaka = GUI.Toggle(new Rect(GetPix(97),
  5232. GetPix(173),
  5233. GetPix(40),
  5234. GetPix(20)),
  5235. isAccSenaka,
  5236. "背中",
  5237. style4);
  5238. isStkg = GUI.Toggle(new Rect(GetPix(5),
  5239. GetPix(198),
  5240. GetPix(70),
  5241. GetPix(20)),
  5242. isStkg,
  5243. "ソックス",
  5244. style4);
  5245. isShoes = GUI.Toggle(new Rect(GetPix(90),
  5246. GetPix(198),
  5247. GetPix(70),
  5248. GetPix(20)),
  5249. isShoes,
  5250. "シューズ",
  5251. style4);
  5252. mekure1[selectMaidIndex] =
  5253. GUI.Toggle(new Rect(GetPix(5),
  5254. GetPix(223),
  5255. GetPix(62),
  5256. GetPix(20)),
  5257. mekure1[selectMaidIndex],
  5258. "めくれ前",
  5259. style4);
  5260. mekure2[selectMaidIndex] =
  5261. GUI.Toggle(new Rect(GetPix(67),
  5262. GetPix(223),
  5263. GetPix(40),
  5264. GetPix(20)),
  5265. mekure2[selectMaidIndex],
  5266. "後ろ",
  5267. style4);
  5268. zurasi[selectMaidIndex] =
  5269. GUI.Toggle(new Rect(GetPix(105),
  5270. GetPix(223),
  5271. GetPix(50),
  5272. GetPix(20)),
  5273. zurasi[selectMaidIndex],
  5274. "ずらし",
  5275. style4);
  5276. }
  5277. bool state = GUI.enabled;
  5278. GUI.enabled = true;
  5279. GUI.DragWindow();
  5280. GUI.enabled = state;
  5281. }
  5282. private void FaceWindow(int winID)
  5283. {
  5284. GUIStyle style1 = "label";
  5285. style1.fontSize = GetPix(12);
  5286. style1.alignment = TextAnchor.UpperLeft;
  5287. GUIStyle style2 = "label";
  5288. style2.fontSize = GetPix(11);
  5289. style2.alignment = TextAnchor.UpperLeft;
  5290. GUIStyle style3 = "button";
  5291. style3.fontSize = GetPix(20);
  5292. GUIStyle buttonStyle = "button";
  5293. buttonStyle.fontSize = GetPix(12);
  5294. buttonStyle.alignment = TextAnchor.MiddleLeft;
  5295. GUIStyle style4 = new GUIStyle("toggle")
  5296. {
  5297. fontSize = GetPix(13)
  5298. };
  5299. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  5300. if (!faceInitFlg)
  5301. {
  5302. listStyle2.normal.textColor = Color.white;
  5303. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  5304. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  5305. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  5306. listStyle2.fontSize = GetPix(12);
  5307. faceCombo.selectedItemIndex = 0;
  5308. List<string> stringList = new List<string>(300);
  5309. stringList.AddRange(faceArray);
  5310. for (int index = 1; index < 300; ++index)
  5311. {
  5312. IniKey iniKey = Preferences["face"]["f" + index];
  5313. if (iniKey.Value != null)
  5314. {
  5315. string[] strArray = iniKey.Value.Split(':');
  5316. if (strArray.Length > 1)
  5317. {
  5318. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  5319. }
  5320. }
  5321. else
  5322. {
  5323. break;
  5324. }
  5325. }
  5326. faceCombo.selectedItemIndex = 0;
  5327. faceComboList = new GUIContent[stringList.ToArray().Length];
  5328. for (int index = 0; index < stringList.ToArray().Length; ++index)
  5329. {
  5330. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  5331. }
  5332. faceInitFlg = true;
  5333. }
  5334. if (faceCombo.isClickedComboButton)
  5335. {
  5336. GUI.enabled = false;
  5337. }
  5338. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  5339. {
  5340. if (!isF6)
  5341. {
  5342. bool flag = true;
  5343. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  5344. {
  5345. flag = false;
  5346. }
  5347. if (GUI.Toggle(new Rect(GetPix(2),
  5348. GetPix(2),
  5349. GetPix(39),
  5350. GetPix(20)),
  5351. flag,
  5352. "配置",
  5353. style4))
  5354. {
  5355. faceFlg = false;
  5356. poseFlg = false;
  5357. // sceneFlg = false;
  5358. kankyoFlg = false;
  5359. kankyo2Flg = false;
  5360. bGui = true;
  5361. }
  5362. }
  5363. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  5364. GetPix(2),
  5365. GetPix(39),
  5366. GetPix(20)),
  5367. poseFlg,
  5368. "操作",
  5369. style4))
  5370. {
  5371. poseFlg = true;
  5372. faceFlg = false;
  5373. // sceneFlg = false;
  5374. kankyoFlg = false;
  5375. kankyo2Flg = false;
  5376. }
  5377. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  5378. faceFlg,
  5379. "表情",
  5380. style4))
  5381. {
  5382. faceFlg = true;
  5383. poseFlg = false;
  5384. // sceneFlg = false;
  5385. kankyoFlg = false;
  5386. kankyo2Flg = false;
  5387. if (!faceFlg2)
  5388. {
  5389. isFaceInit = true;
  5390. faceFlg2 = true;
  5391. maidArray[selectMaidIndex].boMabataki = false;
  5392. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5393. }
  5394. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5395. }
  5396. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  5397. kankyoFlg,
  5398. "環境",
  5399. style4))
  5400. {
  5401. poseFlg = false;
  5402. faceFlg = false;
  5403. // sceneFlg = false;
  5404. kankyoFlg = true;
  5405. kankyo2Flg = false;
  5406. }
  5407. if (!line1)
  5408. {
  5409. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  5410. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  5411. }
  5412. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  5413. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  5414. style1.fontSize = GetPix(13);
  5415. style1.alignment = TextAnchor.MiddleCenter;
  5416. GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
  5417. string.Concat(selectMaidIndex + 1),
  5418. style1);
  5419. style1.fontSize = GetPix(11);
  5420. style1.alignment = TextAnchor.UpperLeft;
  5421. }
  5422. if (sceneLevel > 0)
  5423. {
  5424. int selectMaidIndex = this.selectMaidIndex;
  5425. if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
  5426. {
  5427. if (GUI.Button(new Rect(GetPix(5),
  5428. GetPix(53),
  5429. GetPix(23),
  5430. GetPix(32)),
  5431. "<",
  5432. style3))
  5433. {
  5434. --this.selectMaidIndex;
  5435. if (this.selectMaidIndex < 0)
  5436. {
  5437. this.selectMaidIndex = selectList.Count - 1;
  5438. }
  5439. isFaceInit = true;
  5440. faceFlg = true;
  5441. copyIndex = 0;
  5442. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  5443. }
  5444. if (GUI.Button(new Rect(GetPix(135),
  5445. GetPix(53),
  5446. GetPix(23),
  5447. GetPix(32)),
  5448. ">",
  5449. style3))
  5450. {
  5451. ++this.selectMaidIndex;
  5452. if (selectList.Count <= this.selectMaidIndex)
  5453. {
  5454. this.selectMaidIndex = 0;
  5455. }
  5456. isFaceInit = true;
  5457. faceFlg = true;
  5458. copyIndex = 0;
  5459. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  5460. }
  5461. }
  5462. if (maidArray[this.selectMaidIndex].GetThumIcon())
  5463. {
  5464. GUI.DrawTexture(new Rect(GetPix(30),
  5465. GetPix(25),
  5466. GetPix(60),
  5467. GetPix(60)),
  5468. maidArray[this.selectMaidIndex].GetThumIcon());
  5469. }
  5470. GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
  5471. maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
  5472. style1);
  5473. if (isFace[selectMaidIndex])
  5474. {
  5475. if (GUI.Button(new Rect(GetPix(5),
  5476. GetPix(25),
  5477. GetPix(23),
  5478. GetPix(23)),
  5479. "有",
  5480. style3))
  5481. {
  5482. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5483. maidArray[selectMaidIndex].boMabataki = false;
  5484. isFace[selectMaidIndex] = false;
  5485. }
  5486. maidArray[selectMaidIndex].boMabataki = false;
  5487. }
  5488. else
  5489. {
  5490. if (GUI.Button(new Rect(GetPix(5),
  5491. GetPix(25),
  5492. GetPix(23),
  5493. GetPix(23)),
  5494. "無",
  5495. style3))
  5496. {
  5497. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5498. maidArray[selectMaidIndex].boMabataki = false;
  5499. morph.EyeMabataki = 0.0f;
  5500. isFaceInit = true;
  5501. isFace[selectMaidIndex] = true;
  5502. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5503. }
  5504. GUI.enabled = false;
  5505. maidArray[selectMaidIndex].boMabataki = true;
  5506. }
  5507. }
  5508. if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
  5509. "<",
  5510. style3))
  5511. {
  5512. --faceIndex[selectMaidIndex];
  5513. if (faceIndex[selectMaidIndex] <= -1)
  5514. {
  5515. faceIndex[selectMaidIndex] = faceComboList.Length - 1;
  5516. }
  5517. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5518. maidArray[selectMaidIndex].boMabataki = false;
  5519. morph.EyeMabataki = 0.0f;
  5520. if (faceIndex[selectMaidIndex] < faceArray.Length)
  5521. {
  5522. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  5523. }
  5524. else
  5525. {
  5526. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  5527. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  5528. if (!isVR)
  5529. {
  5530. maidArray[selectMaidIndex].boMabataki = false;
  5531. }
  5532. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  5533. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  5534. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  5535. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  5536. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  5537. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  5538. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  5539. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  5540. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  5541. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  5542. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  5543. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  5544. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  5545. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  5546. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  5547. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  5548. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  5549. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  5550. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  5551. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  5552. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  5553. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  5554. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  5555. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  5556. try
  5557. {
  5558. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  5559. }
  5560. catch { }
  5561. if (float.Parse(strArray[24]) == 1.0)
  5562. {
  5563. fieldValue1[(int)morph.hash["namida"]] = 1f;
  5564. }
  5565. else
  5566. {
  5567. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  5568. }
  5569. if (float.Parse(strArray[25]) == 1.0)
  5570. {
  5571. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  5572. }
  5573. else
  5574. {
  5575. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  5576. }
  5577. if (float.Parse(strArray[26]) == 1.0)
  5578. {
  5579. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  5580. }
  5581. else
  5582. {
  5583. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  5584. }
  5585. if (float.Parse(strArray[27]) == 1.0)
  5586. {
  5587. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  5588. }
  5589. else
  5590. {
  5591. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  5592. }
  5593. if (float.Parse(strArray[28]) == 1.0)
  5594. {
  5595. fieldValue1[(int)morph.hash["shock"]] = 1f;
  5596. }
  5597. else
  5598. {
  5599. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  5600. }
  5601. if (float.Parse(strArray[29]) == 1.0)
  5602. {
  5603. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  5604. }
  5605. else
  5606. {
  5607. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  5608. }
  5609. if (float.Parse(strArray[30]) == 1.0)
  5610. {
  5611. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  5612. }
  5613. else
  5614. {
  5615. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  5616. }
  5617. if (float.Parse(strArray[31]) == 1.0)
  5618. {
  5619. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  5620. }
  5621. else
  5622. {
  5623. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  5624. }
  5625. if (float.Parse(strArray[32]) == 1.0)
  5626. {
  5627. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  5628. }
  5629. else
  5630. {
  5631. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  5632. }
  5633. if (float.Parse(strArray[33]) == 1.0)
  5634. {
  5635. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  5636. }
  5637. else
  5638. {
  5639. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  5640. }
  5641. if (float.Parse(strArray[34]) == 1.0)
  5642. {
  5643. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  5644. }
  5645. else
  5646. {
  5647. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  5648. }
  5649. if (strArray.Length > 35)
  5650. {
  5651. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  5652. }
  5653. }
  5654. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  5655. isFaceInit = true;
  5656. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5657. }
  5658. if (GUI.Button(new Rect(GetPix(135), GetPix(95), GetPix(23), GetPix(23)),
  5659. ">",
  5660. style3))
  5661. {
  5662. ++faceIndex[selectMaidIndex];
  5663. if (faceIndex[selectMaidIndex] == faceComboList.Length)
  5664. {
  5665. faceIndex[selectMaidIndex] = 0;
  5666. }
  5667. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5668. maidArray[selectMaidIndex].boMabataki = false;
  5669. morph.EyeMabataki = 0.0f;
  5670. if (faceIndex[selectMaidIndex] < faceArray.Length)
  5671. {
  5672. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  5673. }
  5674. else
  5675. {
  5676. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  5677. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  5678. if (!isVR)
  5679. {
  5680. maidArray[selectMaidIndex].boMabataki = false;
  5681. }
  5682. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  5683. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  5684. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  5685. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  5686. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  5687. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  5688. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  5689. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  5690. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  5691. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  5692. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  5693. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  5694. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  5695. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  5696. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  5697. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  5698. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  5699. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  5700. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  5701. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  5702. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  5703. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  5704. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  5705. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  5706. try
  5707. {
  5708. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  5709. }
  5710. catch { }
  5711. if (float.Parse(strArray[24]) == 1.0)
  5712. {
  5713. fieldValue1[(int)morph.hash["namida"]] = 1f;
  5714. }
  5715. else
  5716. {
  5717. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  5718. }
  5719. if (float.Parse(strArray[25]) == 1.0)
  5720. {
  5721. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  5722. }
  5723. else
  5724. {
  5725. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  5726. }
  5727. if (float.Parse(strArray[26]) == 1.0)
  5728. {
  5729. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  5730. }
  5731. else
  5732. {
  5733. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  5734. }
  5735. if (float.Parse(strArray[27]) == 1.0)
  5736. {
  5737. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  5738. }
  5739. else
  5740. {
  5741. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  5742. }
  5743. if (float.Parse(strArray[28]) == 1.0)
  5744. {
  5745. fieldValue1[(int)morph.hash["shock"]] = 1f;
  5746. }
  5747. else
  5748. {
  5749. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  5750. }
  5751. if (float.Parse(strArray[29]) == 1.0)
  5752. {
  5753. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  5754. }
  5755. else
  5756. {
  5757. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  5758. }
  5759. if (float.Parse(strArray[30]) == 1.0)
  5760. {
  5761. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  5762. }
  5763. else
  5764. {
  5765. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  5766. }
  5767. if (float.Parse(strArray[31]) == 1.0)
  5768. {
  5769. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  5770. }
  5771. else
  5772. {
  5773. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  5774. }
  5775. if (float.Parse(strArray[32]) == 1.0)
  5776. {
  5777. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  5778. }
  5779. else
  5780. {
  5781. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  5782. }
  5783. if (float.Parse(strArray[33]) == 1.0)
  5784. {
  5785. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  5786. }
  5787. else
  5788. {
  5789. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  5790. }
  5791. if (float.Parse(strArray[34]) == 1.0)
  5792. {
  5793. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  5794. }
  5795. else
  5796. {
  5797. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  5798. }
  5799. if (strArray.Length > 35)
  5800. {
  5801. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  5802. }
  5803. }
  5804. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  5805. isFaceInit = true;
  5806. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5807. }
  5808. int offsetTop = GetPix(120);
  5809. int UIHeight = GetPix(510);
  5810. Rect faceWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  5811. Rect faceWindowScrollView = new Rect(0, 0, rectWin.width - 20, UIHeight);
  5812. faceScrollPos = GUI.BeginScrollView(faceWindowScrollRect, faceScrollPos, faceWindowScrollView);
  5813. #region face sliders
  5814. int sliderWidth = GetPix(70);
  5815. int sliderHeight = GetPix(20);
  5816. int labelWidth = GetPix(100);
  5817. int labelHeight = GetPix(25);
  5818. int sliderLeft = 8;
  5819. int sliderRight = 88;
  5820. int labelPosition = 0;
  5821. int sliderPosition = 15;
  5822. int sliderOffset = 28;
  5823. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition),
  5824. labelWidth, labelHeight),
  5825. "目の開閉",
  5826. style2);
  5827. eyeclose = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5828. GetPix(sliderPosition),
  5829. sliderWidth, sliderHeight),
  5830. eyeclose,
  5831. 0.0f,
  5832. 1f);
  5833. GUI.Label(new Rect(GetPix(sliderRight), GetPix(labelPosition),
  5834. labelWidth, labelHeight),
  5835. "にっこり",
  5836. style2);
  5837. eyeclose2 = GUI.HorizontalSlider(new Rect(GetPix(sliderRight),
  5838. GetPix(sliderPosition),
  5839. sliderWidth, sliderHeight),
  5840. eyeclose2,
  5841. 0.0f,
  5842. 1f);
  5843. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset),
  5844. labelWidth, labelHeight),
  5845. "ジト目",
  5846. style2);
  5847. eyeclose3 = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5848. GetPix(sliderPosition + sliderOffset),
  5849. sliderWidth, sliderHeight),
  5850. eyeclose3,
  5851. 0.0f,
  5852. 1f);
  5853. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset),
  5854. labelWidth, labelHeight),
  5855. "見開く",
  5856. style2);
  5857. eyebig = GUI.HorizontalSlider(new Rect(GetPix(88),
  5858. GetPix(sliderPosition + sliderOffset),
  5859. sliderWidth, sliderHeight),
  5860. eyebig,
  5861. 0.0f,
  5862. 1f);
  5863. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 2),
  5864. labelWidth, labelHeight),
  5865. "ウインク1",
  5866. style2);
  5867. eyeclose6 = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5868. GetPix(sliderPosition + sliderOffset * 2),
  5869. sliderWidth, sliderHeight),
  5870. eyeclose6,
  5871. 0.0f,
  5872. 1f);
  5873. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 2),
  5874. labelWidth, labelHeight),
  5875. "ウインク2",
  5876. style2);
  5877. eyeclose5 = GUI.HorizontalSlider(new Rect(GetPix(88),
  5878. GetPix(sliderPosition + sliderOffset * 2),
  5879. sliderWidth, sliderHeight),
  5880. eyeclose5,
  5881. 0.0f,
  5882. 1f);
  5883. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 3),
  5884. labelWidth, labelHeight),
  5885. "ハイライト",
  5886. style2);
  5887. hitomih = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5888. GetPix(sliderPosition + sliderOffset * 3),
  5889. sliderWidth, sliderHeight),
  5890. hitomih,
  5891. 0.0f,
  5892. 2f);
  5893. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 3),
  5894. labelWidth, labelHeight),
  5895. "瞳サイズ",
  5896. style2);
  5897. hitomis = GUI.HorizontalSlider(new Rect(GetPix(88),
  5898. GetPix(sliderPosition + sliderOffset * 3),
  5899. sliderWidth, sliderHeight),
  5900. hitomis,
  5901. 0.0f,
  5902. 1f);
  5903. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 4),
  5904. labelWidth, labelHeight),
  5905. "眉角度1",
  5906. style2);
  5907. mayuha = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5908. GetPix(sliderPosition + sliderOffset * 4),
  5909. sliderWidth, sliderHeight),
  5910. mayuha,
  5911. 0.0f,
  5912. 1f);
  5913. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 4),
  5914. labelWidth, labelHeight),
  5915. "眉角度2",
  5916. style2);
  5917. mayuw = GUI.HorizontalSlider(new Rect(GetPix(88),
  5918. GetPix(sliderPosition + sliderOffset * 4),
  5919. sliderWidth, sliderHeight),
  5920. mayuw,
  5921. 0.0f,
  5922. 1f);
  5923. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 5),
  5924. labelWidth, labelHeight),
  5925. "眉上げ",
  5926. style2);
  5927. mayuup = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5928. GetPix(sliderPosition + sliderOffset * 5),
  5929. sliderWidth, sliderHeight),
  5930. mayuup,
  5931. 0.0f,
  5932. 0.8f);
  5933. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 5),
  5934. labelWidth, labelHeight),
  5935. "眉下げ1",
  5936. style2);
  5937. mayuv = GUI.HorizontalSlider(new Rect(GetPix(88),
  5938. GetPix(sliderPosition + sliderOffset * 5),
  5939. sliderWidth, sliderHeight),
  5940. mayuv,
  5941. 0.0f,
  5942. 0.8f);
  5943. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 6),
  5944. labelWidth, labelHeight),
  5945. "眉下げ2",
  5946. style2);
  5947. mayuvhalf = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5948. GetPix(sliderPosition + sliderOffset * 6),
  5949. sliderWidth, sliderHeight),
  5950. mayuvhalf,
  5951. 0.0f,
  5952. 0.9f);
  5953. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 7),
  5954. labelWidth, labelHeight),
  5955. "口開け1",
  5956. style2);
  5957. moutha = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5958. GetPix(sliderPosition + sliderOffset * 7),
  5959. sliderWidth, sliderHeight),
  5960. moutha,
  5961. 0.0f,
  5962. 1f);
  5963. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 7),
  5964. labelWidth, labelHeight),
  5965. "口開け2",
  5966. style2);
  5967. mouths = GUI.HorizontalSlider(new Rect(GetPix(88),
  5968. GetPix(sliderPosition + sliderOffset * 7),
  5969. sliderWidth, sliderHeight),
  5970. mouths,
  5971. 0.0f,
  5972. 0.9f);
  5973. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 8),
  5974. labelWidth, labelHeight),
  5975. "口幅狭く",
  5976. style2);
  5977. mouthc = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5978. GetPix(sliderPosition + sliderOffset * 8),
  5979. sliderWidth, sliderHeight),
  5980. mouthc,
  5981. 0.0f,
  5982. 1f);
  5983. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 8),
  5984. labelWidth, labelHeight),
  5985. "口幅広く",
  5986. style2);
  5987. mouthi = GUI.HorizontalSlider(new Rect(GetPix(88),
  5988. GetPix(sliderPosition + sliderOffset * 8),
  5989. sliderWidth, sliderHeight),
  5990. mouthi,
  5991. 0.0f,
  5992. 1f);
  5993. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 9),
  5994. labelWidth, labelHeight),
  5995. "口角上げ",
  5996. style2);
  5997. mouthup = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5998. GetPix(sliderPosition + sliderOffset * 9),
  5999. sliderWidth, sliderHeight),
  6000. mouthup,
  6001. 0.0f,
  6002. 1.4f);
  6003. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 9),
  6004. labelWidth, labelHeight),
  6005. "口角下げ",
  6006. style2);
  6007. mouthdw = GUI.HorizontalSlider(new Rect(GetPix(88),
  6008. GetPix(sliderPosition + sliderOffset * 9),
  6009. sliderWidth, sliderHeight),
  6010. mouthdw,
  6011. 0.0f,
  6012. 1f);
  6013. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 10),
  6014. labelWidth, labelHeight),
  6015. "口中央上げ",
  6016. style2);
  6017. mouthhe = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6018. GetPix(sliderPosition + sliderOffset * 10),
  6019. sliderWidth, sliderHeight),
  6020. mouthhe,
  6021. 0.0f,
  6022. 1f);
  6023. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 10),
  6024. labelWidth, labelHeight),
  6025. "左口角上げ",
  6026. style2);
  6027. mouthuphalf = GUI.HorizontalSlider(new Rect(GetPix(88),
  6028. GetPix(sliderPosition + sliderOffset * 10),
  6029. sliderWidth, sliderHeight),
  6030. mouthuphalf,
  6031. 0.0f,
  6032. 2f);
  6033. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 11),
  6034. labelWidth, labelHeight),
  6035. "舌出し",
  6036. style2);
  6037. tangout = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6038. GetPix(sliderPosition + sliderOffset * 11),
  6039. sliderWidth, sliderHeight),
  6040. tangout,
  6041. 0.0f,
  6042. 1f);
  6043. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 11),
  6044. labelWidth, labelHeight),
  6045. "舌上げ",
  6046. style2);
  6047. tangup = GUI.HorizontalSlider(new Rect(GetPix(88),
  6048. GetPix(sliderPosition + sliderOffset * 11),
  6049. sliderWidth, sliderHeight),
  6050. tangup,
  6051. 0.0f,
  6052. 0.7f);
  6053. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 12),
  6054. labelWidth, labelHeight),
  6055. "舌根上げ",
  6056. style2);
  6057. tangopen = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6058. GetPix(sliderPosition + sliderOffset * 12),
  6059. sliderWidth, sliderHeight),
  6060. tangopen,
  6061. 0.0f,
  6062. 1f);
  6063. #endregion
  6064. #region face toggles
  6065. int togglePositionX = 5;
  6066. int togglePositionY = 370;
  6067. int toggleOffsetX = 55;
  6068. int toggleOffsetY = 22;
  6069. int toggleWidth = GetPix(55);
  6070. int toggleHeight = GetPix(16);
  6071. isHoho2 = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6072. GetPix(togglePositionY),
  6073. toggleWidth, toggleHeight),
  6074. isHoho2,
  6075. "赤面",
  6076. style4);
  6077. isShock = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6078. GetPix(togglePositionY),
  6079. toggleWidth, toggleHeight),
  6080. isShock,
  6081. "ショック",
  6082. style4);
  6083. isNosefook = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6084. GetPix(togglePositionY),
  6085. toggleWidth, toggleHeight),
  6086. isNosefook,
  6087. "鼻フック",
  6088. style4);
  6089. isNamida = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6090. GetPix(togglePositionY + toggleOffsetY * 1),
  6091. toggleWidth, toggleHeight),
  6092. isNamida,
  6093. "涙",
  6094. style4);
  6095. isYodare = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6096. GetPix(togglePositionY + toggleOffsetY * 1),
  6097. toggleWidth, toggleHeight),
  6098. isYodare,
  6099. "涎",
  6100. style4);
  6101. isToothoff = !GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6102. GetPix(togglePositionY + toggleOffsetY * 1),
  6103. toggleWidth, toggleHeight),
  6104. !isToothoff,
  6105. "歯",
  6106. style4);
  6107. isTear1 = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6108. GetPix(togglePositionY + toggleOffsetY * 2),
  6109. toggleWidth, toggleHeight),
  6110. isTear1,
  6111. "涙1",
  6112. style4);
  6113. isTear2 = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6114. GetPix(togglePositionY + toggleOffsetY * 2),
  6115. toggleWidth, toggleHeight),
  6116. isTear2,
  6117. "涙2",
  6118. style4);
  6119. isTear3 = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6120. GetPix(togglePositionY + toggleOffsetY * 2),
  6121. toggleWidth, toggleHeight),
  6122. isTear3,
  6123. "涙3",
  6124. style4);
  6125. isHohos = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6126. GetPix(togglePositionY + toggleOffsetY * 3),
  6127. toggleWidth, toggleHeight),
  6128. isHohos,
  6129. "頬1",
  6130. style4);
  6131. isHoho = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6132. GetPix(togglePositionY + toggleOffsetY * 3),
  6133. toggleWidth, toggleHeight),
  6134. isHoho,
  6135. "頬2",
  6136. style4);
  6137. isHohol = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6138. GetPix(togglePositionY + toggleOffsetY * 3),
  6139. toggleWidth, toggleHeight),
  6140. isHohol,
  6141. "頬3",
  6142. style4);
  6143. #endregion
  6144. int faceSaveToggleY = togglePositionY + toggleOffsetY * 4;
  6145. int faceSaveInputY = faceSaveToggleY + 20;
  6146. isFaceEdit = GUI.Toggle(new Rect(GetPix(5),
  6147. GetPix(faceSaveToggleY),
  6148. toggleWidth, toggleHeight),
  6149. isFaceEdit,
  6150. "登録",
  6151. style4);
  6152. if (isFaceEdit)
  6153. {
  6154. inName4 = GUI.TextField(new Rect(GetPix(5),
  6155. GetPix(faceSaveInputY),
  6156. GetPix(100),
  6157. GetPix(20)),
  6158. inName4);
  6159. if (GUI.Button(new Rect(GetPix(107),
  6160. GetPix(faceSaveInputY),
  6161. GetPix(35),
  6162. GetPix(20)),
  6163. "追加",
  6164. style3))
  6165. {
  6166. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  6167. GUI.FocusControl("");
  6168. int num2 = 1;
  6169. for (int index = 1; index < 1000; ++index)
  6170. {
  6171. if (Preferences["face"]["f" + index].Value == null)
  6172. {
  6173. num2 = index;
  6174. break;
  6175. }
  6176. }
  6177. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6178. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6179. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6180. string str1 = inName4 + ":" + fieldValue2[(int)morph.hash["eyeclose"]] + ","
  6181. + fieldValue2[(int)morph.hash["eyeclose2"]] + ","
  6182. + fieldValue2[(int)morph.hash["eyeclose3"]] + ","
  6183. + fieldValue2[(int)morph.hash["eyeclose6"]] + ","
  6184. + fieldValue1[(int)morph.hash["hitomih"]] + ","
  6185. + fieldValue1[(int)morph.hash["hitomis"]] + ","
  6186. + fieldValue1[(int)morph.hash["mayuha"]] + ","
  6187. + fieldValue1[(int)morph.hash["mayuup"]] + ","
  6188. + fieldValue1[(int)morph.hash["mayuv"]] + ","
  6189. + fieldValue1[(int)morph.hash["mayuvhalf"]] + ","
  6190. + fieldValue1[(int)morph.hash["moutha"]] + ","
  6191. + fieldValue1[(int)morph.hash["mouths"]] + ","
  6192. + fieldValue1[(int)morph.hash["mouthdw"]] + ","
  6193. + fieldValue1[(int)morph.hash["mouthup"]] + ","
  6194. + fieldValue1[(int)morph.hash["tangout"]] + ","
  6195. + fieldValue1[(int)morph.hash["tangup"]] + ","
  6196. + fieldValue1[(int)morph.hash["eyebig"]] + ","
  6197. + fieldValue2[(int)morph.hash["eyeclose5"]] + ","
  6198. + fieldValue1[(int)morph.hash["mayuw"]] + ","
  6199. + fieldValue1[(int)morph.hash["mouthhe"]] + ","
  6200. + fieldValue1[(int)morph.hash["mouthc"]] + ","
  6201. + fieldValue1[(int)morph.hash["mouthi"]] + ","
  6202. + fieldValue1[(int)morph.hash["mouthuphalf"]] + ",";
  6203. string str2;
  6204. try
  6205. {
  6206. str2 = str1 + fieldValue1[(int)morph.hash["tangopen"]] + ",";
  6207. }
  6208. catch
  6209. {
  6210. str2 = str1 + "0,";
  6211. }
  6212. string str3 = fieldValue1[(int)morph.hash["namida"]] <= 0.0
  6213. ? str2 + 0 + ","
  6214. : str2 + 1 + ",";
  6215. string str4 = fieldValue1[(int)morph.hash["tear1"]] <= 0.0
  6216. ? str3 + 0 + ","
  6217. : str3 + 1 + ",";
  6218. string str5 = fieldValue1[(int)morph.hash["tear2"]] <= 0.0
  6219. ? str4 + 0 + ","
  6220. : str4 + 1 + ",";
  6221. string str6 = fieldValue1[(int)morph.hash["tear3"]] <= 0.0
  6222. ? str5 + 0 + ","
  6223. : str5 + 1 + ",";
  6224. string str7 = fieldValue1[(int)morph.hash["shock"]] <= 0.0
  6225. ? str6 + 0 + ","
  6226. : str6 + 1 + ",";
  6227. string str8 = fieldValue1[(int)morph.hash["yodare"]] <= 0.0
  6228. ? str7 + 0 + ","
  6229. : str7 + 1 + ",";
  6230. string str9 = fieldValue1[(int)morph.hash["hoho"]] <= 0.0
  6231. ? str8 + 0 + ","
  6232. : str8 + 1 + ",";
  6233. string str10 = fieldValue1[(int)morph.hash["hoho2"]] <= 0.0
  6234. ? str9 + 0 + ","
  6235. : str9 + 1 + ",";
  6236. string str11 = fieldValue1[(int)morph.hash["hohos"]] <= 0.0
  6237. ? str10 + 0 + ","
  6238. : str10 + 1 + ",";
  6239. string str12 = fieldValue1[(int)morph.hash["hohol"]] <= 0.0
  6240. ? str11 + 0 + ","
  6241. : str11 + 1 + ",";
  6242. string str13 = fieldValue1[(int)morph.hash["toothoff"]] <= 0.0
  6243. ? str12 + 0 + ","
  6244. : str12 + 1 + ",";
  6245. string str14 = fieldValue1[(int)morph.hash["nosefook"]] <= 0.0
  6246. ? str13 + 0 + ":"
  6247. : str13 + 1 + ":";
  6248. Preferences["face"]["f" + num2].Value = str14;
  6249. SaveConfig();
  6250. List<string> stringList = new List<string>(300);
  6251. stringList.AddRange(faceArray);
  6252. for (int index = 1; index < 300; ++index)
  6253. {
  6254. IniKey iniKey = Preferences["face"]["f" + index];
  6255. if (iniKey.Value != null)
  6256. {
  6257. string[] strArray = iniKey.Value.Split(':');
  6258. if (strArray.Length > 1)
  6259. {
  6260. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  6261. }
  6262. }
  6263. else
  6264. {
  6265. break;
  6266. }
  6267. }
  6268. faceCombo.selectedItemIndex = 0;
  6269. faceComboList = new GUIContent[stringList.ToArray().Length];
  6270. for (int index = 0; index < stringList.ToArray().Length; ++index)
  6271. {
  6272. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  6273. }
  6274. faceCombo.selectedItemIndex = stringList.ToArray().Length - 1;
  6275. inName4 = "";
  6276. }
  6277. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6278. {
  6279. GUI.enabled = false;
  6280. }
  6281. if (GUI.Button(new Rect(GetPix(144),
  6282. GetPix(faceSaveInputY),
  6283. GetPix(24),
  6284. GetPix(20)),
  6285. "削",
  6286. style3))
  6287. {
  6288. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  6289. Preferences["face"]["f" + faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[1]].Value = "del";
  6290. SaveConfig();
  6291. List<string> stringList = new List<string>(300);
  6292. stringList.AddRange(faceArray);
  6293. for (int index = 1; index < 300; ++index)
  6294. {
  6295. IniKey iniKey = Preferences["face"]["f" + index];
  6296. if (iniKey.Value != null)
  6297. {
  6298. string[] strArray = iniKey.Value.Split(':');
  6299. if (strArray.Length > 1)
  6300. {
  6301. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  6302. }
  6303. }
  6304. else
  6305. {
  6306. break;
  6307. }
  6308. }
  6309. faceCombo.selectedItemIndex = 0;
  6310. faceComboList = new GUIContent[stringList.ToArray().Length];
  6311. for (int index = 0; index < stringList.ToArray().Length; ++index)
  6312. {
  6313. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  6314. }
  6315. faceCombo.selectedItemIndex = 0;
  6316. for (int index = 0; index < maidCnt; ++index)
  6317. {
  6318. if (maidArray[index] && maidArray[index].Visible
  6319. && stringList.ToArray().Length <= faceIndex[index])
  6320. {
  6321. faceIndex[index] = 0;
  6322. }
  6323. }
  6324. }
  6325. GUI.enabled = true;
  6326. }
  6327. GUI.EndScrollView();
  6328. if (faceCombo.isClickedComboButton)
  6329. {
  6330. GUI.enabled = true;
  6331. }
  6332. if (isFace[selectMaidIndex])
  6333. {
  6334. faceIndex[selectMaidIndex] =
  6335. faceCombo.List(new Rect(GetPix(35),
  6336. GetPix(95),
  6337. GetPix(95),
  6338. GetPix(23)),
  6339. faceComboList[faceIndex[selectMaidIndex]].text,
  6340. faceComboList,
  6341. buttonStyle,
  6342. "box",
  6343. listStyle2);
  6344. }
  6345. else
  6346. {
  6347. faceCombo.List(new Rect(GetPix(35), GetPix(95), GetPix(95), GetPix(23)),
  6348. faceComboList[faceIndex[selectMaidIndex]].text,
  6349. faceComboList,
  6350. buttonStyle,
  6351. "box",
  6352. listStyle2);
  6353. }
  6354. if (faceCombo.isClickedComboButton)
  6355. {
  6356. isCombo = true;
  6357. }
  6358. else if (isCombo)
  6359. {
  6360. isCombo = false;
  6361. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6362. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6363. morph.EyeMabataki = 0.0f;
  6364. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6365. {
  6366. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  6367. }
  6368. else
  6369. {
  6370. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6371. if (!isVR)
  6372. {
  6373. maidArray[selectMaidIndex].boMabataki = false;
  6374. }
  6375. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  6376. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  6377. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  6378. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  6379. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  6380. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  6381. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  6382. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  6383. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  6384. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  6385. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  6386. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  6387. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  6388. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  6389. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  6390. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  6391. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  6392. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  6393. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  6394. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  6395. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  6396. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  6397. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  6398. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  6399. try
  6400. {
  6401. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  6402. }
  6403. catch { }
  6404. if (float.Parse(strArray[24]) == 1.0)
  6405. {
  6406. fieldValue1[(int)morph.hash["namida"]] = 1f;
  6407. }
  6408. else
  6409. {
  6410. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  6411. }
  6412. if (float.Parse(strArray[25]) == 1.0)
  6413. {
  6414. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  6415. }
  6416. else
  6417. {
  6418. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  6419. }
  6420. if (float.Parse(strArray[26]) == 1.0)
  6421. {
  6422. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  6423. }
  6424. else
  6425. {
  6426. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  6427. }
  6428. if (float.Parse(strArray[27]) == 1.0)
  6429. {
  6430. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  6431. }
  6432. else
  6433. {
  6434. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  6435. }
  6436. if (float.Parse(strArray[28]) == 1.0)
  6437. {
  6438. fieldValue1[(int)morph.hash["shock"]] = 1f;
  6439. }
  6440. else
  6441. {
  6442. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  6443. }
  6444. if (float.Parse(strArray[29]) == 1.0)
  6445. {
  6446. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  6447. }
  6448. else
  6449. {
  6450. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  6451. }
  6452. if (float.Parse(strArray[30]) == 1.0)
  6453. {
  6454. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  6455. }
  6456. else
  6457. {
  6458. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  6459. }
  6460. if (float.Parse(strArray[31]) == 1.0)
  6461. {
  6462. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  6463. }
  6464. else
  6465. {
  6466. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  6467. }
  6468. if (float.Parse(strArray[32]) == 1.0)
  6469. {
  6470. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  6471. }
  6472. else
  6473. {
  6474. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  6475. }
  6476. if (float.Parse(strArray[33]) == 1.0)
  6477. {
  6478. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  6479. }
  6480. else
  6481. {
  6482. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  6483. }
  6484. if (float.Parse(strArray[34]) == 1.0)
  6485. {
  6486. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  6487. }
  6488. else
  6489. {
  6490. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  6491. }
  6492. if (strArray.Length > 35)
  6493. {
  6494. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  6495. }
  6496. }
  6497. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  6498. isFaceInit = true;
  6499. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6500. }
  6501. GUI.enabled = !faceCombo.isClickedComboButton;
  6502. bool state = GUI.enabled;
  6503. GUI.enabled = true;
  6504. GUI.DragWindow();
  6505. GUI.enabled = state;
  6506. yotogiFlg = false;
  6507. if (sceneLevel != 14
  6508. || !GameObject
  6509. .Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
  6510. {
  6511. return;
  6512. }
  6513. yotogiFlg = true;
  6514. }
  6515. private void MaidCallWindow(int winID)
  6516. {
  6517. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  6518. GUIStyle style1 = "label";
  6519. style1.fontSize = GetPix(14);
  6520. style1.alignment = TextAnchor.UpperLeft;
  6521. GUIStyle style2 = "button";
  6522. style2.fontSize = GetPix(16);
  6523. style2.alignment = TextAnchor.MiddleCenter;
  6524. GUIStyle style3 = new GUIStyle("toggle")
  6525. {
  6526. fontSize = GetPix(13)
  6527. };
  6528. float pix = GetPix(70);
  6529. if (comboBoxList == null)
  6530. {
  6531. comboBoxControl.selectedItemIndex = 0;
  6532. comboBoxList = new GUIContent[11];
  6533. comboBoxList[0] = new GUIContent("通常");
  6534. comboBoxList[1] = new GUIContent("横一列");
  6535. comboBoxList[2] = new GUIContent("縦一列");
  6536. comboBoxList[3] = new GUIContent("斜め");
  6537. comboBoxList[4] = new GUIContent("円(外向き)");
  6538. comboBoxList[5] = new GUIContent("円(内向き)");
  6539. comboBoxList[6] = new GUIContent("扇");
  6540. comboBoxList[7] = new GUIContent("V");
  6541. comboBoxList[8] = new GUIContent("^");
  6542. comboBoxList[9] = new GUIContent("M");
  6543. comboBoxList[10] = new GUIContent("W");
  6544. }
  6545. bool flag1 = true;
  6546. if (faceFlg || poseFlg || /*sceneFlg ||*/ kankyoFlg || kankyo2Flg)
  6547. {
  6548. flag1 = false;
  6549. }
  6550. if (!isF6 && GUI.Toggle(new Rect(GetPix(2),
  6551. GetPix(2),
  6552. GetPix(39),
  6553. GetPix(20)),
  6554. flag1,
  6555. "配置",
  6556. style3))
  6557. {
  6558. faceFlg = false;
  6559. poseFlg = false;
  6560. // sceneFlg = false;
  6561. kankyoFlg = false;
  6562. kankyo2Flg = false;
  6563. bGui = true;
  6564. }
  6565. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  6566. GetPix(2),
  6567. GetPix(39),
  6568. GetPix(20)),
  6569. poseFlg,
  6570. "操作",
  6571. style3))
  6572. {
  6573. poseFlg = true;
  6574. faceFlg = false;
  6575. // sceneFlg = false;
  6576. kankyoFlg = false;
  6577. kankyo2Flg = false;
  6578. }
  6579. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  6580. faceFlg,
  6581. "表情",
  6582. style3))
  6583. {
  6584. faceFlg = true;
  6585. poseFlg = false;
  6586. // sceneFlg = false;
  6587. kankyoFlg = false;
  6588. kankyo2Flg = false;
  6589. if (!faceFlg2)
  6590. {
  6591. isFaceInit = true;
  6592. faceFlg2 = true;
  6593. maidArray[selectMaidIndex].boMabataki = false;
  6594. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6595. }
  6596. }
  6597. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  6598. kankyoFlg,
  6599. "環境",
  6600. style3))
  6601. {
  6602. poseFlg = false;
  6603. faceFlg = false;
  6604. // sceneFlg = false;
  6605. kankyoFlg = true;
  6606. kankyo2Flg = false;
  6607. }
  6608. if (!line1)
  6609. {
  6610. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  6611. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  6612. }
  6613. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  6614. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  6615. int stockMaidCount1 = characterMgr.GetStockMaidCount();
  6616. Rect position;
  6617. Rect viewRect;
  6618. if (sceneLevel != 5)
  6619. {
  6620. position = new Rect(GetPix(7),
  6621. GetPix(110),
  6622. rectWin.width - GetPix(14),
  6623. rectWin.height * 0.83f);
  6624. viewRect = new Rect(0.0f,
  6625. 0.0f,
  6626. position.width * 0.85f,
  6627. (pix + GetPix(5)) * stockMaidCount1 + GetPix(15));
  6628. }
  6629. else
  6630. {
  6631. position = new Rect(GetPix(7),
  6632. GetPix(110),
  6633. rectWin.width - GetPix(14),
  6634. (float)(rectWin.height * 0.829999983310699 * 0.980000019073486));
  6635. viewRect = new Rect(0.0f,
  6636. 0.0f,
  6637. position.width * 0.85f,
  6638. (float)((pix + (double)GetPix(5)) * stockMaidCount1
  6639. + GetPix(15) * 0.920000016689301));
  6640. }
  6641. float y = 0.0f;
  6642. if (comboBoxControl.isClickedComboButton)
  6643. {
  6644. GUI.enabled = false;
  6645. }
  6646. if (GUI.Button(new Rect(GetPix(10), GetPix(78), rectWin.width * 0.85f, GetPix(28)),
  6647. "呼び出す",
  6648. style2))
  6649. {
  6650. isYobidashi = true;
  6651. selectMaidIndex = 0;
  6652. copyIndex = 0;
  6653. for (int index = 0; index < maxMaidCnt; ++index)
  6654. {
  6655. if (!isLock[index] && maidArray[index] && maidArray[index].Visible)
  6656. {
  6657. maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  6658. maidArray[index].SetAutoTwistAll(true);
  6659. }
  6660. maidArray[index] = null;
  6661. }
  6662. for (int index = 0; index < maxMaidCnt; ++index)
  6663. {
  6664. isStop[index] = false;
  6665. }
  6666. bGui = false;
  6667. isFadeOut = true;
  6668. GameMain.Instance.MainCamera.FadeOut(0.0f, false, null, true, new Color());
  6669. for (int index = 0; index < characterMgr.GetStockMaidCount(); ++index)
  6670. {
  6671. characterMgr.GetStockMaidList()[index].Visible = false;
  6672. }
  6673. }
  6674. GUIStyle style4 = "button";
  6675. style4.fontSize = GetPix(13);
  6676. GUIStyleState guiStyleState = new GUIStyleState();
  6677. if (GUI.Button(new Rect(GetPix(10), GetPix(52), rectWin.width * 0.4f, GetPix(23)),
  6678. "7人選択",
  6679. style4))
  6680. {
  6681. if (sceneLevel != 5)
  6682. {
  6683. selectList = new ArrayList
  6684. {
  6685. 0,
  6686. 1,
  6687. 2,
  6688. 3,
  6689. 4,
  6690. 5,
  6691. 6
  6692. };
  6693. }
  6694. else
  6695. {
  6696. int stockMaidCount2 = characterMgr.GetStockMaidCount();
  6697. selectList = new ArrayList
  6698. {
  6699. editMaid
  6700. };
  6701. if (stockMaidCount2 > 1)
  6702. {
  6703. if (editMaid >= 1)
  6704. {
  6705. selectList.Add(0);
  6706. }
  6707. else if (stockMaidCount2 > 2)
  6708. {
  6709. selectList.Add(1);
  6710. }
  6711. }
  6712. if (stockMaidCount2 > 2)
  6713. {
  6714. if (editMaid >= 2)
  6715. {
  6716. selectList.Add(1);
  6717. }
  6718. else if (stockMaidCount2 > 3)
  6719. {
  6720. selectList.Add(2);
  6721. }
  6722. }
  6723. if (stockMaidCount2 > 3)
  6724. {
  6725. if (editMaid >= 3)
  6726. {
  6727. selectList.Add(2);
  6728. }
  6729. else if (stockMaidCount2 > 4)
  6730. {
  6731. selectList.Add(3);
  6732. }
  6733. }
  6734. if (stockMaidCount2 > 4)
  6735. {
  6736. if (editMaid >= 4)
  6737. {
  6738. selectList.Add(3);
  6739. }
  6740. else if (stockMaidCount2 > 5)
  6741. {
  6742. selectList.Add(4);
  6743. }
  6744. }
  6745. if (stockMaidCount2 > 5)
  6746. {
  6747. if (editMaid >= 5)
  6748. {
  6749. selectList.Add(4);
  6750. }
  6751. else if (stockMaidCount2 > 6)
  6752. {
  6753. selectList.Add(5);
  6754. }
  6755. }
  6756. if (stockMaidCount2 > 6)
  6757. {
  6758. if (editMaid >= 6)
  6759. {
  6760. selectList.Add(5);
  6761. }
  6762. else if (stockMaidCount2 > 7)
  6763. {
  6764. selectList.Add(6);
  6765. }
  6766. }
  6767. }
  6768. }
  6769. if (GUI.Button(new Rect(rectWin.width * 0.5f, GetPix(52), rectWin.width * 0.4f, GetPix(23)),
  6770. "選択解除",
  6771. style4))
  6772. {
  6773. selectList = new ArrayList();
  6774. if (sceneLevel == 5)
  6775. {
  6776. selectList.Add(editMaid);
  6777. }
  6778. }
  6779. GUI.enabled = true;
  6780. maidCallScrollPos = GUI.BeginScrollView(position, maidCallScrollPos, viewRect);
  6781. for (int nStockNo = 0; nStockNo < characterMgr.GetStockMaidCount(); ++nStockNo)
  6782. {
  6783. GUI.enabled = true;
  6784. GUI.DrawTexture(new Rect(2f, y + 2f, (float)(rectWin.width * 0.829999983310699 - 4.0), pix - 4f),
  6785. Texture2D.whiteTexture);
  6786. bool flag2 = false;
  6787. for (int index = 0; index < selectList.Count; ++index)
  6788. {
  6789. if ((int)selectList[index] == nStockNo)
  6790. {
  6791. flag2 = true;
  6792. break;
  6793. }
  6794. }
  6795. if (comboBoxControl.isClickedComboButton)
  6796. {
  6797. GUI.enabled = false;
  6798. GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
  6799. GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
  6800. }
  6801. if (GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2))
  6802. {
  6803. if (flag2)
  6804. {
  6805. for (int index = 0; index < selectList.Count; ++index)
  6806. {
  6807. if ((int)selectList[index] == nStockNo && (sceneLevel != 5 || (int)selectList[index] != editMaid))
  6808. {
  6809. selectList.Remove(nStockNo);
  6810. break;
  6811. }
  6812. }
  6813. }
  6814. else
  6815. {
  6816. if (selectList.Count > maxMaidCnt - 1)
  6817. {
  6818. selectList.Remove(selectList[maxMaidCnt - 1]);
  6819. }
  6820. selectList.Add(nStockNo);
  6821. }
  6822. }
  6823. GUI.enabled = true;
  6824. if (flag2)
  6825. {
  6826. GUI.DrawTexture(new Rect(5f, y + 5f, (float)(rectWin.width * 0.829999983310699 - 10.0), pix - 10f),
  6827. Texture2D.whiteTexture);
  6828. }
  6829. if (characterMgr.GetStockMaid(nStockNo).GetThumIcon())
  6830. {
  6831. GUI.DrawTexture(new Rect(0.0f, y - 5f, pix, pix), characterMgr.GetStockMaid(nStockNo).GetThumIcon());
  6832. }
  6833. string text = characterMgr.GetStockMaid(nStockNo).status.lastName + "\n"
  6834. + characterMgr.GetStockMaid(nStockNo).status.firstName;
  6835. guiStyleState.textColor = Color.black;
  6836. style1.normal = guiStyleState;
  6837. GUI.Label(new Rect(GetPix(65), y + pix / 4f, pix * 2f, pix * 3f), text, style1);
  6838. if (flag2)
  6839. {
  6840. for (int index = 0; index < selectList.Count; ++index)
  6841. {
  6842. if ((int)selectList[index] == nStockNo)
  6843. {
  6844. GUI.Label(new Rect(rectWin.width * 0.7f, y + 6f, pix, pix), (index + 1).ToString(), style1);
  6845. break;
  6846. }
  6847. }
  6848. }
  6849. y += pix + GetPix(5);
  6850. }
  6851. GUI.EndScrollView();
  6852. guiStyleState.textColor = Color.white;
  6853. style1.normal = guiStyleState;
  6854. comboBoxControl.List(new Rect(GetPix(10), GetPix(25), rectWin.width * 0.56f, GetPix(24)),
  6855. comboBoxList[comboBoxControl.GetSelectedItemIndex()].text,
  6856. comboBoxList,
  6857. listStyle);
  6858. bool OKButton = GUI.Button(new Rect(rectWin.width * 0.66f, GetPix(25), rectWin.width * 0.24f, GetPix(24)),
  6859. "決定",
  6860. style4);
  6861. GUI.DragWindow();
  6862. if (!OKButton)
  6863. {
  6864. return;
  6865. }
  6866. for (int index = 0; index < maxMaidCnt; ++index)
  6867. {
  6868. isStop[index] = false;
  6869. }
  6870. switch (comboBoxControl.GetSelectedItemIndex())
  6871. {
  6872. case 0:
  6873. for (int index = 0; index < maidCnt; ++index)
  6874. {
  6875. Vector3 zero1 = Vector3.zero;
  6876. Vector3 zero2 = Vector3.zero;
  6877. if (selectList.Count <= 7)
  6878. {
  6879. if (selectList.Count % 2 == 1)
  6880. {
  6881. switch (index)
  6882. {
  6883. case 0:
  6884. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f));
  6885. break;
  6886. case 1:
  6887. maidArray[index].SetPos(new Vector3(-0.6f, 0.0f, 0.26f));
  6888. break;
  6889. case 2:
  6890. maidArray[index].SetPos(new Vector3(0.6f, 0.0f, 0.26f));
  6891. break;
  6892. case 3:
  6893. maidArray[index].SetPos(new Vector3(-1.1f, 0.0f, 0.69f));
  6894. break;
  6895. case 4:
  6896. maidArray[index].SetPos(new Vector3(1.1f, 0.0f, 0.69f));
  6897. break;
  6898. case 5:
  6899. maidArray[index].SetPos(new Vector3(-1.47f, 0.0f, 1.1f));
  6900. break;
  6901. case 6:
  6902. maidArray[index].SetPos(new Vector3(1.47f, 0.0f, 1.1f));
  6903. break;
  6904. }
  6905. }
  6906. else
  6907. {
  6908. switch (index)
  6909. {
  6910. case 0:
  6911. maidArray[index].SetPos(new Vector3(0.3f, 0.0f, 0.0f));
  6912. break;
  6913. case 1:
  6914. maidArray[index].SetPos(new Vector3(-0.3f, 0.0f, 0.0f));
  6915. break;
  6916. case 2:
  6917. maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.4f));
  6918. break;
  6919. case 3:
  6920. maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.4f));
  6921. break;
  6922. case 4:
  6923. maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.9f));
  6924. break;
  6925. case 5:
  6926. maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.9f));
  6927. break;
  6928. }
  6929. }
  6930. }
  6931. else
  6932. {
  6933. float num1 = 0.0f;
  6934. if (selectList.Count >= 11)
  6935. {
  6936. float num2 = -0.4f;
  6937. if (selectList.Count % 2 == 1)
  6938. {
  6939. switch (index)
  6940. {
  6941. case 0:
  6942. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num2));
  6943. break;
  6944. case 1:
  6945. maidArray[index].SetPos(new Vector3(-0.5f, 0.0f, 0.2f + num2));
  6946. break;
  6947. case 2:
  6948. maidArray[index].SetPos(new Vector3(0.5f, 0.0f, 0.2f + num2));
  6949. break;
  6950. case 3:
  6951. maidArray[index].SetPos(new Vector3(-0.9f, 0.0f, 0.55f + num2));
  6952. break;
  6953. case 4:
  6954. maidArray[index].SetPos(new Vector3(0.9f, 0.0f, 0.55f + num2));
  6955. break;
  6956. case 5:
  6957. maidArray[index].SetPos(new Vector3(-1.25f, 0.0f, 0.9f + num2));
  6958. break;
  6959. case 6:
  6960. maidArray[index].SetPos(new Vector3(1.25f, 0.0f, 0.9f + num2));
  6961. break;
  6962. case 7:
  6963. maidArray[index].SetPos(new Vector3(-1.57f, 0.0f, 1.3f + num2));
  6964. break;
  6965. case 8:
  6966. maidArray[index].SetPos(new Vector3(1.57f, 0.0f, 1.3f + num2));
  6967. break;
  6968. case 9:
  6969. maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.72f + num2));
  6970. break;
  6971. case 10:
  6972. maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.72f + num2));
  6973. break;
  6974. case 11:
  6975. maidArray[index].SetPos(new Vector3(-1.85f, 0.0f, 2.17f + num2));
  6976. break;
  6977. case 12:
  6978. maidArray[index].SetPos(new Vector3(1.85f, 0.0f, 2.17f + num2));
  6979. break;
  6980. default:
  6981. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
  6982. break;
  6983. }
  6984. }
  6985. else
  6986. {
  6987. switch (index)
  6988. {
  6989. case 0:
  6990. maidArray[index].SetPos(new Vector3(0.25f, 0.0f, 0.0f + num2));
  6991. break;
  6992. case 1:
  6993. maidArray[index].SetPos(new Vector3(-0.25f, 0.0f, 0.0f + num2));
  6994. break;
  6995. case 2:
  6996. maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.25f + num2));
  6997. break;
  6998. case 3:
  6999. maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.25f + num2));
  7000. break;
  7001. case 4:
  7002. maidArray[index].SetPos(new Vector3(1.05f, 0.0f, 0.6f + num2));
  7003. break;
  7004. case 5:
  7005. maidArray[index].SetPos(new Vector3(-1.05f, 0.0f, 0.6f + num2));
  7006. break;
  7007. case 6:
  7008. maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 0.9f + num2));
  7009. break;
  7010. case 7:
  7011. maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 0.9f + num2));
  7012. break;
  7013. case 8:
  7014. maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.3f + num2));
  7015. break;
  7016. case 9:
  7017. maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.3f + num2));
  7018. break;
  7019. case 10:
  7020. maidArray[index].SetPos(new Vector3(1.8f, 0.0f, 1.72f + num2));
  7021. break;
  7022. case 11:
  7023. maidArray[index].SetPos(new Vector3(-1.8f, 0.0f, 1.72f + num2));
  7024. break;
  7025. case 12:
  7026. maidArray[index].SetPos(new Vector3(1.9f, 0.0f, 2.17f + num2));
  7027. break;
  7028. case 13:
  7029. maidArray[index].SetPos(new Vector3(-1.9f, 0.0f, 2.17f + num2));
  7030. break;
  7031. default:
  7032. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
  7033. break;
  7034. }
  7035. }
  7036. }
  7037. else if (selectList.Count >= 8)
  7038. {
  7039. if (selectList.Count >= 9)
  7040. {
  7041. num1 = -0.2f;
  7042. }
  7043. if (selectList.Count % 2 == 1)
  7044. {
  7045. switch (index)
  7046. {
  7047. case 0:
  7048. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num1));
  7049. break;
  7050. case 1:
  7051. maidArray[index].SetPos(new Vector3(-0.55f, 0.0f, 0.2f + num1));
  7052. break;
  7053. case 2:
  7054. maidArray[index].SetPos(new Vector3(0.55f, 0.0f, 0.2f + num1));
  7055. break;
  7056. case 3:
  7057. maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.6f + num1));
  7058. break;
  7059. case 4:
  7060. maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.6f + num1));
  7061. break;
  7062. case 5:
  7063. maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 1f + num1));
  7064. break;
  7065. case 6:
  7066. maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 1f + num1));
  7067. break;
  7068. case 7:
  7069. maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.4f + num1));
  7070. break;
  7071. case 8:
  7072. maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.4f + num1));
  7073. break;
  7074. }
  7075. }
  7076. else
  7077. {
  7078. switch (index)
  7079. {
  7080. case 0:
  7081. maidArray[index].SetPos(new Vector3(0.28f, 0.0f, 0.0f + num1));
  7082. break;
  7083. case 1:
  7084. maidArray[index].SetPos(new Vector3(-0.28f, 0.0f, 0.0f + num1));
  7085. break;
  7086. case 2:
  7087. maidArray[index].SetPos(new Vector3(0.78f, 0.0f, 0.3f + num1));
  7088. break;
  7089. case 3:
  7090. maidArray[index].SetPos(new Vector3(-0.78f, 0.0f, 0.3f + num1));
  7091. break;
  7092. case 4:
  7093. maidArray[index].SetPos(new Vector3(1.22f, 0.0f, 0.7f + num1));
  7094. break;
  7095. case 5:
  7096. maidArray[index].SetPos(new Vector3(-1.22f, 0.0f, 0.7f + num1));
  7097. break;
  7098. case 6:
  7099. maidArray[index].SetPos(new Vector3(1.55f, 0.0f, 1.1f + num1));
  7100. break;
  7101. case 7:
  7102. maidArray[index].SetPos(new Vector3(-1.55f, 0.0f, 1.1f + num1));
  7103. break;
  7104. case 8:
  7105. maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.58f + num1));
  7106. break;
  7107. case 9:
  7108. maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.58f + num1));
  7109. break;
  7110. }
  7111. }
  7112. }
  7113. }
  7114. zero2.y = (float)(Math.Atan2(maidArray[index].transform.position.x,
  7115. maidArray[index].transform.position.z - 1.5) * 180.0 / Math.PI) + 180f;
  7116. maidArray[index].SetRot(zero2);
  7117. }
  7118. break;
  7119. case 1:
  7120. for (int index = 0; index < maidCnt; ++index)
  7121. {
  7122. Vector3 zero1 = Vector3.zero;
  7123. Vector3 zero2 = Vector3.zero;
  7124. if (maidCnt < 9)
  7125. {
  7126. switch (index)
  7127. {
  7128. case 1:
  7129. zero1.x = -0.6f;
  7130. break;
  7131. case 2:
  7132. zero1.x = 0.6f;
  7133. break;
  7134. case 3:
  7135. zero1.x = -1.2f;
  7136. break;
  7137. case 4:
  7138. zero1.x = 1.2f;
  7139. break;
  7140. case 5:
  7141. zero1.x = -1.8f;
  7142. break;
  7143. case 6:
  7144. zero1.x = 1.8f;
  7145. break;
  7146. case 7:
  7147. zero1.x = -2.4f;
  7148. break;
  7149. case 8:
  7150. zero1.x = 2.4f;
  7151. break;
  7152. case 9:
  7153. zero1.x = -3f;
  7154. break;
  7155. case 10:
  7156. zero1.x = 3f;
  7157. break;
  7158. }
  7159. }
  7160. else
  7161. {
  7162. switch (index)
  7163. {
  7164. case 1:
  7165. zero1.x = -0.5f;
  7166. break;
  7167. case 2:
  7168. zero1.x = 0.5f;
  7169. break;
  7170. case 3:
  7171. zero1.x = -1f;
  7172. break;
  7173. case 4:
  7174. zero1.x = 1f;
  7175. break;
  7176. case 5:
  7177. zero1.x = -1.5f;
  7178. break;
  7179. case 6:
  7180. zero1.x = 1.5f;
  7181. break;
  7182. case 7:
  7183. zero1.x = -2f;
  7184. break;
  7185. case 8:
  7186. zero1.x = 2f;
  7187. break;
  7188. case 9:
  7189. zero1.x = -2.5f;
  7190. break;
  7191. case 10:
  7192. zero1.x = 2.5f;
  7193. break;
  7194. case 11:
  7195. zero1.x = -3f;
  7196. break;
  7197. case 12:
  7198. zero1.x = 3f;
  7199. break;
  7200. case 13:
  7201. zero1.x = -3.5f;
  7202. break;
  7203. }
  7204. }
  7205. maidArray[index].SetPos(zero1);
  7206. maidArray[index].SetRot(zero2);
  7207. if (index >= 14)
  7208. {
  7209. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7210. }
  7211. }
  7212. break;
  7213. case 2:
  7214. for (int index = 0; index < maidCnt; ++index)
  7215. {
  7216. Vector3 zero1 = Vector3.zero;
  7217. Vector3 zero2 = Vector3.zero;
  7218. if (maidCnt < 9)
  7219. {
  7220. switch (index)
  7221. {
  7222. case 1:
  7223. zero1.z = 0.6f;
  7224. break;
  7225. case 2:
  7226. zero1.z = -0.6f;
  7227. break;
  7228. case 3:
  7229. zero1.z = 1.2f;
  7230. break;
  7231. case 4:
  7232. zero1.z = -1.2f;
  7233. break;
  7234. case 5:
  7235. zero1.z = 1.8f;
  7236. break;
  7237. case 6:
  7238. zero1.z = -1.8f;
  7239. break;
  7240. case 7:
  7241. zero1.z = 2.4f;
  7242. break;
  7243. case 8:
  7244. zero1.z = -2.4f;
  7245. break;
  7246. case 9:
  7247. zero1.z = 3f;
  7248. break;
  7249. case 10:
  7250. zero1.z = -3f;
  7251. break;
  7252. }
  7253. }
  7254. else
  7255. {
  7256. switch (index)
  7257. {
  7258. case 1:
  7259. zero1.z = 0.5f;
  7260. break;
  7261. case 2:
  7262. zero1.z = -0.5f;
  7263. break;
  7264. case 3:
  7265. zero1.z = 1f;
  7266. break;
  7267. case 4:
  7268. zero1.z = -1f;
  7269. break;
  7270. case 5:
  7271. zero1.z = 1.5f;
  7272. break;
  7273. case 6:
  7274. zero1.z = -1.5f;
  7275. break;
  7276. case 7:
  7277. zero1.z = 2f;
  7278. break;
  7279. case 8:
  7280. zero1.z = -2f;
  7281. break;
  7282. case 9:
  7283. zero1.z = 2.5f;
  7284. break;
  7285. case 10:
  7286. zero1.z = -2.5f;
  7287. break;
  7288. case 11:
  7289. zero1.z = 3f;
  7290. break;
  7291. case 12:
  7292. zero1.z = -3f;
  7293. break;
  7294. case 13:
  7295. zero1.z = 3.5f;
  7296. break;
  7297. }
  7298. }
  7299. maidArray[index].SetPos(zero1);
  7300. maidArray[index].SetRot(zero2);
  7301. if (index >= 14)
  7302. {
  7303. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7304. }
  7305. }
  7306. break;
  7307. case 3:
  7308. for (int index = 0; index < maidCnt; ++index)
  7309. {
  7310. Vector3 zero1 = Vector3.zero;
  7311. Vector3 zero2 = Vector3.zero;
  7312. float num = 0.5f;
  7313. if (maidCnt > 11)
  7314. {
  7315. num = 0.25f;
  7316. }
  7317. else if (maidCnt > 9)
  7318. {
  7319. num = 0.32f;
  7320. }
  7321. else if (maidCnt > 7)
  7322. {
  7323. num = 0.4f;
  7324. }
  7325. switch (index)
  7326. {
  7327. case 1:
  7328. zero1.x = -num;
  7329. zero1.z = num;
  7330. break;
  7331. case 2:
  7332. zero1.x = num;
  7333. zero1.z = -num;
  7334. break;
  7335. case 3:
  7336. zero1.x = (float)(-num * 2.0);
  7337. zero1.z = num * 2f;
  7338. break;
  7339. case 4:
  7340. zero1.x = num * 2f;
  7341. zero1.z = (float)(-num * 2.0);
  7342. break;
  7343. case 5:
  7344. zero1.x = (float)(-num * 3.0);
  7345. zero1.z = num * 3f;
  7346. break;
  7347. case 6:
  7348. zero1.x = num * 3f;
  7349. zero1.z = (float)(-num * 3.0);
  7350. break;
  7351. case 7:
  7352. zero1.x = (float)(-num * 4.0);
  7353. zero1.z = num * 4f;
  7354. break;
  7355. case 8:
  7356. zero1.x = num * 4f;
  7357. zero1.z = (float)(-num * 4.0);
  7358. break;
  7359. case 9:
  7360. zero1.x = (float)(-num * 5.0);
  7361. zero1.z = num * 5f;
  7362. break;
  7363. case 10:
  7364. zero1.x = num * 5f;
  7365. zero1.z = (float)(-num * 5.0);
  7366. break;
  7367. case 11:
  7368. zero1.x = (float)(-num * 6.0);
  7369. zero1.z = num * 6f;
  7370. break;
  7371. case 12:
  7372. zero1.x = num * 6f;
  7373. zero1.z = (float)(-num * 6.0);
  7374. break;
  7375. case 13:
  7376. zero1.x = (float)(-num * 7.0);
  7377. zero1.z = num * 7f;
  7378. break;
  7379. }
  7380. maidArray[index].SetPos(zero1);
  7381. maidArray[index].SetRot(zero2);
  7382. if (index >= 14)
  7383. {
  7384. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7385. }
  7386. }
  7387. break;
  7388. case 4:
  7389. for (int index = 0; index < maidCnt; ++index)
  7390. {
  7391. Vector3 zero1 = Vector3.zero;
  7392. Vector3 zero2 = Vector3.zero;
  7393. float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
  7394. zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7395. zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7396. maidArray[index].SetPos(zero1);
  7397. zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI);
  7398. maidArray[index].SetRot(zero2);
  7399. }
  7400. break;
  7401. case 5:
  7402. for (int index = 0; index < maidCnt; ++index)
  7403. {
  7404. Vector3 zero1 = Vector3.zero;
  7405. Vector3 zero2 = Vector3.zero;
  7406. float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
  7407. zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7408. zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7409. maidArray[index].SetPos(zero1);
  7410. zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI) + 180f;
  7411. maidArray[index].SetRot(zero2);
  7412. }
  7413. break;
  7414. case 6:
  7415. for (int index = 0; index < maidCnt; ++index)
  7416. {
  7417. Vector3 zero1 = Vector3.zero;
  7418. Vector3 zero2 = Vector3.zero;
  7419. float num = 0.0f;
  7420. if (maidCnt > 9)
  7421. {
  7422. num = -0.4f;
  7423. }
  7424. else if (maidCnt > 7)
  7425. {
  7426. num = -0.2f;
  7427. }
  7428. switch (index)
  7429. {
  7430. case 0:
  7431. zero1.z = 0.3f;
  7432. break;
  7433. case 1:
  7434. zero1.x = -0.9f;
  7435. zero1.z = -0.4f;
  7436. zero2.y = 40f;
  7437. break;
  7438. case 2:
  7439. zero1.x = 0.9f;
  7440. zero1.z = -0.4f;
  7441. zero2.y = -40f;
  7442. break;
  7443. case 3:
  7444. zero1.x = -0.4f;
  7445. zero1.z = -0.8f;
  7446. zero2.y = 20f;
  7447. break;
  7448. case 4:
  7449. zero1.x = 0.4f;
  7450. zero1.z = -0.8f;
  7451. zero2.y = -20f;
  7452. break;
  7453. case 5:
  7454. zero1.x = -1.2f;
  7455. zero1.z = 0.1f;
  7456. zero2.y = 60f;
  7457. break;
  7458. case 6:
  7459. zero1.x = 1.2f;
  7460. zero1.z = 0.1f;
  7461. zero2.y = -60f;
  7462. break;
  7463. case 7:
  7464. zero1.x = -1.5f;
  7465. zero1.z = 0.6f;
  7466. zero2.y = 80f;
  7467. break;
  7468. case 8:
  7469. zero1.x = 1.5f;
  7470. zero1.z = 0.6f;
  7471. zero2.y = -80f;
  7472. break;
  7473. case 9:
  7474. zero1.x = -1.6f;
  7475. zero1.z = 1.15f;
  7476. zero2.y = 100f;
  7477. break;
  7478. case 10:
  7479. zero1.x = 1.6f;
  7480. zero1.z = 1.15f;
  7481. zero2.y = -100f;
  7482. break;
  7483. case 11:
  7484. zero1.x = -1.6f;
  7485. zero1.z = 1.65f;
  7486. zero2.y = 110f;
  7487. break;
  7488. case 12:
  7489. zero1.x = 1.65f;
  7490. zero1.z = 1.65f;
  7491. zero2.y = -110f;
  7492. break;
  7493. case 13:
  7494. zero1.x = -1.65f;
  7495. zero1.z = 2.15f;
  7496. zero2.y = 120f;
  7497. break;
  7498. }
  7499. if (index > 0)
  7500. {
  7501. zero1.z += num;
  7502. }
  7503. else
  7504. {
  7505. zero1.z -= num;
  7506. }
  7507. maidArray[index].SetPos(zero1);
  7508. maidArray[index].SetRot(zero2);
  7509. if (index >= 14)
  7510. {
  7511. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7512. }
  7513. }
  7514. break;
  7515. case 7:
  7516. for (int index = 0; index < maidCnt; ++index)
  7517. {
  7518. Vector3 zero1 = Vector3.zero;
  7519. Vector3 zero2 = Vector3.zero;
  7520. float num = 0.0f;
  7521. if (maidCnt > 11)
  7522. {
  7523. num = 0.6f;
  7524. }
  7525. else if (maidCnt > 9)
  7526. {
  7527. num = 0.4f;
  7528. }
  7529. else if (maidCnt > 7)
  7530. {
  7531. num = 0.2f;
  7532. }
  7533. switch (index)
  7534. {
  7535. case 0:
  7536. zero1.z = 0.8f;
  7537. break;
  7538. case 1:
  7539. zero1.x = -0.45f;
  7540. zero1.z = 0.3f;
  7541. zero2.y = -10f;
  7542. break;
  7543. case 2:
  7544. zero1.x = 0.45f;
  7545. zero1.z = 0.3f;
  7546. zero2.y = 10f;
  7547. break;
  7548. case 3:
  7549. zero1.x = -0.8f;
  7550. zero1.z = -0.2f;
  7551. zero2.y = -20f;
  7552. break;
  7553. case 4:
  7554. zero1.x = 0.8f;
  7555. zero1.z = -0.2f;
  7556. zero2.y = 20f;
  7557. break;
  7558. case 5:
  7559. zero1.x = -1.2f;
  7560. zero1.z = -0.75f;
  7561. zero2.y = -30f;
  7562. break;
  7563. case 6:
  7564. zero1.x = 1.2f;
  7565. zero1.z = -0.75f;
  7566. zero2.y = 30f;
  7567. break;
  7568. case 7:
  7569. zero1.x = -1.6f;
  7570. zero1.z = -1.25f;
  7571. zero2.y = -40f;
  7572. break;
  7573. case 8:
  7574. zero1.x = 1.6f;
  7575. zero1.z = -1.25f;
  7576. zero2.y = 40f;
  7577. break;
  7578. case 9:
  7579. zero1.x = -2f;
  7580. zero1.z = -1.75f;
  7581. zero2.y = -50f;
  7582. break;
  7583. case 10:
  7584. zero1.x = 2f;
  7585. zero1.z = -1.75f;
  7586. zero2.y = 50f;
  7587. break;
  7588. case 11:
  7589. zero1.x = -2.4f;
  7590. zero1.z = -2.25f;
  7591. zero2.y = -60f;
  7592. break;
  7593. case 12:
  7594. zero1.x = 2.4f;
  7595. zero1.z = -2.25f;
  7596. zero2.y = 60f;
  7597. break;
  7598. case 13:
  7599. zero1.x = -2.8f;
  7600. zero1.z = -2.75f;
  7601. zero2.y = -70f;
  7602. break;
  7603. }
  7604. zero1.z += num;
  7605. maidArray[index].SetPos(zero1);
  7606. maidArray[index].SetRot(zero2);
  7607. if (index >= 14)
  7608. {
  7609. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7610. }
  7611. }
  7612. break;
  7613. case 8:
  7614. for (int index = 0; index < maidCnt; ++index)
  7615. {
  7616. Vector3 zero1 = Vector3.zero;
  7617. Vector3 zero2 = Vector3.zero;
  7618. float num = 0.0f;
  7619. if (maidCnt > 11)
  7620. {
  7621. num = -0.6f;
  7622. }
  7623. else if (maidCnt > 9)
  7624. {
  7625. num = -0.4f;
  7626. }
  7627. else if (maidCnt > 7)
  7628. {
  7629. num = -0.2f;
  7630. }
  7631. switch (index)
  7632. {
  7633. case 0:
  7634. zero1.z = -0.75f;
  7635. break;
  7636. case 1:
  7637. zero1.x = -0.45f;
  7638. zero1.z = -0.2f;
  7639. zero2.y = 20f;
  7640. break;
  7641. case 2:
  7642. zero1.x = 0.45f;
  7643. zero1.z = -0.2f;
  7644. zero2.y = -20f;
  7645. break;
  7646. case 3:
  7647. zero1.x = -0.8f;
  7648. zero1.z = 0.3f;
  7649. zero2.y = 35f;
  7650. break;
  7651. case 4:
  7652. zero1.x = 0.8f;
  7653. zero1.z = 0.3f;
  7654. zero2.y = -35f;
  7655. break;
  7656. case 5:
  7657. zero1.x = -1.2f;
  7658. zero1.z = 0.8f;
  7659. zero2.y = 50f;
  7660. break;
  7661. case 6:
  7662. zero1.x = 1.2f;
  7663. zero1.z = 0.8f;
  7664. zero2.y = -50f;
  7665. break;
  7666. case 7:
  7667. zero1.x = -1.6f;
  7668. zero1.z = 1.3f;
  7669. zero2.y = 65f;
  7670. break;
  7671. case 8:
  7672. zero1.x = 1.6f;
  7673. zero1.z = 1.3f;
  7674. zero2.y = -65f;
  7675. break;
  7676. case 9:
  7677. zero1.x = -2f;
  7678. zero1.z = 1.8f;
  7679. zero2.y = 80f;
  7680. break;
  7681. case 10:
  7682. zero1.x = 2f;
  7683. zero1.z = 1.8f;
  7684. zero2.y = -80f;
  7685. break;
  7686. case 11:
  7687. zero1.x = -2.4f;
  7688. zero1.z = 2.3f;
  7689. zero2.y = 90f;
  7690. break;
  7691. case 12:
  7692. zero1.x = 2.4f;
  7693. zero1.z = 2.3f;
  7694. zero2.y = -90f;
  7695. break;
  7696. case 13:
  7697. zero1.x = -2.8f;
  7698. zero1.z = 2.8f;
  7699. zero2.y = 100f;
  7700. break;
  7701. }
  7702. zero1.z += num;
  7703. maidArray[index].SetPos(zero1);
  7704. maidArray[index].SetRot(zero2);
  7705. if (index >= 14)
  7706. {
  7707. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7708. }
  7709. }
  7710. break;
  7711. case 9:
  7712. for (int index = 0; index < maidCnt; ++index)
  7713. {
  7714. Vector3 zero1 = Vector3.zero;
  7715. Vector3 zero2 = Vector3.zero;
  7716. float num = 1f;
  7717. if (maidCnt > 9)
  7718. {
  7719. num = 0.84f;
  7720. }
  7721. else if (maidCnt > 7)
  7722. {
  7723. num = 0.92f;
  7724. }
  7725. switch (index)
  7726. {
  7727. case 0:
  7728. zero1.z = 0.0f;
  7729. break;
  7730. case 1:
  7731. zero1.x = -0.5f;
  7732. zero1.z = -0.5f;
  7733. break;
  7734. case 2:
  7735. zero1.x = 0.5f;
  7736. zero1.z = -0.5f;
  7737. break;
  7738. case 3:
  7739. zero1.x = -1f;
  7740. zero1.z = 0.2f;
  7741. break;
  7742. case 4:
  7743. zero1.x = 1f;
  7744. zero1.z = 0.2f;
  7745. break;
  7746. case 5:
  7747. zero1.x = -1.5f;
  7748. zero1.z = -0.5f;
  7749. break;
  7750. case 6:
  7751. zero1.x = 1.5f;
  7752. zero1.z = -0.5f;
  7753. break;
  7754. case 7:
  7755. zero1.x = -2f;
  7756. zero1.z = 0.2f;
  7757. break;
  7758. case 8:
  7759. zero1.x = 2f;
  7760. zero1.z = 0.2f;
  7761. break;
  7762. case 9:
  7763. zero1.x = -2.5f;
  7764. zero1.z = -0.5f;
  7765. break;
  7766. case 10:
  7767. zero1.x = 2.5f;
  7768. zero1.z = -0.5f;
  7769. break;
  7770. case 11:
  7771. zero1.x = -3f;
  7772. zero1.z = 0.2f;
  7773. break;
  7774. case 12:
  7775. zero1.x = 3f;
  7776. zero1.z = 0.2f;
  7777. break;
  7778. case 13:
  7779. zero1.x = -3.5f;
  7780. zero1.z = -0.5f;
  7781. break;
  7782. }
  7783. zero1.x *= num;
  7784. maidArray[index].SetPos(zero1);
  7785. maidArray[index].SetRot(zero2);
  7786. if (index >= 14)
  7787. {
  7788. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7789. }
  7790. }
  7791. break;
  7792. case 10:
  7793. for (int index = 0; index < maidCnt; ++index)
  7794. {
  7795. Vector3 zero1 = Vector3.zero;
  7796. Vector3 zero2 = Vector3.zero;
  7797. float num = 1f;
  7798. if (maidCnt > 9)
  7799. {
  7800. num = 0.84f;
  7801. }
  7802. else if (maidCnt > 7)
  7803. {
  7804. num = 0.92f;
  7805. }
  7806. switch (index)
  7807. {
  7808. case 0:
  7809. zero1.z = -0.4f;
  7810. break;
  7811. case 1:
  7812. zero1.x = -0.5f;
  7813. zero1.z = 0.2f;
  7814. break;
  7815. case 2:
  7816. zero1.x = 0.5f;
  7817. zero1.z = 0.2f;
  7818. break;
  7819. case 3:
  7820. zero1.x = -1f;
  7821. zero1.z = -0.5f;
  7822. break;
  7823. case 4:
  7824. zero1.x = 1f;
  7825. zero1.z = -0.5f;
  7826. break;
  7827. case 5:
  7828. zero1.x = -1.5f;
  7829. zero1.z = 0.2f;
  7830. break;
  7831. case 6:
  7832. zero1.x = 1.5f;
  7833. zero1.z = 0.2f;
  7834. break;
  7835. case 7:
  7836. zero1.x = -2f;
  7837. zero1.z = -0.5f;
  7838. break;
  7839. case 8:
  7840. zero1.x = 2f;
  7841. zero1.z = -0.5f;
  7842. break;
  7843. case 9:
  7844. zero1.x = -2.5f;
  7845. zero1.z = 0.2f;
  7846. break;
  7847. case 10:
  7848. zero1.x = 2.5f;
  7849. zero1.z = 0.2f;
  7850. break;
  7851. case 11:
  7852. zero1.x = -3f;
  7853. zero1.z = -0.5f;
  7854. break;
  7855. case 12:
  7856. zero1.x = 3f;
  7857. zero1.z = -0.5f;
  7858. break;
  7859. case 13:
  7860. zero1.x = -3.5f;
  7861. zero1.z = 0.2f;
  7862. break;
  7863. }
  7864. zero1.x *= num;
  7865. maidArray[index].SetPos(zero1);
  7866. maidArray[index].SetRot(zero2);
  7867. if (index >= 14)
  7868. {
  7869. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7870. }
  7871. }
  7872. break;
  7873. }
  7874. for (int index = 0; index < maxMaidCnt; ++index)
  7875. {
  7876. if (!isLock[index] && maidArray[index] != null && maidArray[index].Visible)
  7877. {
  7878. maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  7879. maidArray[index].SetAutoTwistAll(true);
  7880. }
  7881. }
  7882. }
  7883. private void MessageWindow(int winID)
  7884. {
  7885. GUIStyle style1 = "label";
  7886. style1.fontSize = GetPix(12);
  7887. style1.alignment = TextAnchor.UpperLeft;
  7888. GUIStyle style2 = "button";
  7889. style2.fontSize = GetPix(16);
  7890. GUI.Label(new Rect(GetPix(8), GetPix(4), GetPix(80), GetPix(25)),
  7891. "名前",
  7892. style1);
  7893. inName = GUI.TextField(new Rect(GetPix(35),
  7894. GetPix(4),
  7895. GetPix(120),
  7896. GetPix(20)),
  7897. inName);
  7898. GUI.Label(new Rect(GetPix(180), GetPix(4), GetPix(100), GetPix(25)),
  7899. "サイズ",
  7900. style1);
  7901. fontSize = (int)GUI.HorizontalSlider(new Rect(GetPix(220),
  7902. GetPix(9),
  7903. GetPix(100),
  7904. GetPix(20)),
  7905. fontSize,
  7906. 25f,
  7907. 60f);
  7908. if (fontSize != mFontSize)
  7909. {
  7910. mFontSize = fontSize;
  7911. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  7912. MessageClass messageClass = new MessageClass(gameObject, GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr);
  7913. SetFieldValue2<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false)
  7914. .GetComponent<UILabel>(),
  7915. "mFontSize",
  7916. fontSize);
  7917. }
  7918. GUI.Label(new Rect(GetPix(325), GetPix(4), GetPix(100), GetPix(25)),
  7919. fontSize.ToString() + "pt",
  7920. style1);
  7921. inText = GUI.TextArea(new Rect(GetPix(8),
  7922. GetPix(26),
  7923. rectWin2.width - GetPix(15),
  7924. GetPix(52)),
  7925. inText,
  7926. 300);
  7927. if (GUI.Button(new Rect(GetPix(8), GetPix(82), GetPix(60), GetPix(20)),
  7928. "決定",
  7929. style2))
  7930. {
  7931. isMessage = true;
  7932. bGuiMessage = false;
  7933. GameObject gameObject1 = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  7934. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  7935. messageWindowMgr.OpenMessageWindowPanel();
  7936. MessageClass inst = new MessageClass(gameObject1, messageWindowMgr);
  7937. UILabel component = UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>();
  7938. component.ProcessText();
  7939. SetFieldValue2<UILabel, int>(component, "mFontSize", fontSize);
  7940. SetFieldValue5<MessageClass, UILabel>(inst, "message_label_", component);
  7941. inst.SetText(inName, inText, "", 0, AudioSourceMgr.Type.System);
  7942. inst.FinishChAnime();
  7943. }
  7944. GUI.DragWindow();
  7945. }
  7946. private void SceneManagerWindow(int winID)
  7947. {
  7948. GUIStyle labelStyle = new GUIStyle("label");
  7949. labelStyle.fontSize = GetPix(15);
  7950. labelStyle.alignment = TextAnchor.MiddleCenter;
  7951. GUIStyle newSaveStyle = new GUIStyle("button");
  7952. newSaveStyle.alignment = TextAnchor.MiddleCenter;
  7953. newSaveStyle.fontSize = GetPix(90);
  7954. GUIStyle saveImageStyle = new GUIStyle("label");
  7955. saveImageStyle.fontSize = GetPix(12);
  7956. saveImageStyle.alignment = TextAnchor.MiddleCenter;
  7957. saveImageStyle.padding = new RectOffset(0, 0, 0, 0);
  7958. GUIStyle saveControlStyle = new GUIStyle("button");
  7959. saveControlStyle.fontSize = GetPix(12);
  7960. saveControlStyle.alignment = TextAnchor.MiddleCenter;
  7961. GUIStyle listStyle = new GUIStyle("button");
  7962. listStyle.fontSize = selectedButtonStyle.fontSize = GetPix(12);
  7963. listStyle.alignment = TextAnchor.MiddleLeft;
  7964. selectedButtonStyle.alignment = TextAnchor.MiddleLeft;
  7965. GUIStyle textFieldStyle = new GUIStyle("textfield");
  7966. textFieldStyle.alignment = TextAnchor.MiddleLeft;
  7967. GUIStyle resizeHandleStyle = new GUIStyle("label");
  7968. resizeHandleStyle.fontSize = GetPix(25);
  7969. resizeHandleStyle.alignment = TextAnchor.MiddleCenter;
  7970. // Window variables
  7971. int windowPadding = GetPix(10);
  7972. int windowPaddingY = GetPix(20);
  7973. int buttonSize = GetPix(25);
  7974. int saveGridOffset = GetPix(200);
  7975. if (createSceneFlag || loadSceneFlag || manageSceneFlag || deleteDirectoryFlag || deleteSceneFlag)
  7976. {
  7977. GUI.enabled = false;
  7978. }
  7979. #region Titlebar
  7980. if (GUI.Button(new Rect(
  7981. sceneManagerRect.width - windowPadding - buttonSize,
  7982. windowPadding,
  7983. buttonSize,
  7984. buttonSize
  7985. ), "X", saveControlStyle))
  7986. {
  7987. sceneFlg = false;
  7988. bGui = true;
  7989. copyIndex = 0;
  7990. }
  7991. if (GUI.Button(new Rect(
  7992. saveGridOffset - GetPix(70) + windowPadding,
  7993. windowPadding,
  7994. GetPix(70),
  7995. buttonSize
  7996. ), "Refresh", saveControlStyle))
  7997. {
  7998. RefreshSceneManager();
  7999. }
  8000. Color originalColor = GUI.backgroundColor;
  8001. if (kankyoToggle) GUI.backgroundColor = Color.green;
  8002. kankyoToggle = GUI.Toggle(new Rect(
  8003. windowPadding,
  8004. windowPadding,
  8005. GetPix(75),
  8006. buttonSize
  8007. ), kankyoToggle, "Backgrounds", saveControlStyle);
  8008. GUI.backgroundColor = originalColor;
  8009. GUI.Label(new Rect(
  8010. windowPadding,
  8011. windowPadding,
  8012. sceneManagerRect.width - windowPadding,
  8013. buttonSize
  8014. ), directoryList[selectedDirectory], labelStyle);
  8015. #endregion
  8016. int saveGridX = windowPaddingY + saveGridOffset;
  8017. int saveGridY = windowPaddingY + buttonSize;
  8018. float saveGridWidth = sceneManagerRect.width - saveGridX - windowPadding;
  8019. float saveGridHeight = sceneManagerRect.height - saveGridY;
  8020. int numImages = scenes.Count;
  8021. #region Directory List
  8022. Rect dirListScrollRect = new Rect(
  8023. windowPadding,
  8024. windowPaddingY + buttonSize,
  8025. saveGridOffset,
  8026. saveGridHeight - windowPaddingY - buttonSize
  8027. );
  8028. Rect dirListScrollView = new Rect(0, 0,
  8029. saveGridOffset - 50,
  8030. GetPix(22) * (directoryList.Length + 1) + buttonSize + windowPadding
  8031. );
  8032. GUI.Box(dirListScrollRect, "");
  8033. dirListScrollPos = GUI.BeginScrollView(dirListScrollRect, dirListScrollPos, dirListScrollView);
  8034. for (int i = 0; i < directoryList.Length; i++)
  8035. {
  8036. int listEntrySize = GetPix(30);
  8037. if (GUI.Button(new Rect(0,
  8038. i * listEntrySize,
  8039. saveGridOffset,
  8040. listEntrySize), directoryList[i],
  8041. i == selectedDirectory ? selectedButtonStyle : listStyle))
  8042. {
  8043. SwitchDirectory(directoryList[i]);
  8044. }
  8045. }
  8046. GUI.EndScrollView();
  8047. if (!createDirectoryFlag)
  8048. {
  8049. if (GUI.Button(new Rect(
  8050. windowPadding,
  8051. saveGridHeight + windowPadding,
  8052. GetPix(110),
  8053. buttonSize
  8054. ), "New Folder", saveControlStyle))
  8055. {
  8056. createDirectoryFlag = true;
  8057. }
  8058. bool enabled = GUI.enabled;
  8059. GUI.enabled = selectedDirectory != 0;
  8060. if (GUI.Button(new Rect(
  8061. saveGridOffset - GetPix(80) + windowPadding,
  8062. saveGridHeight + windowPadding,
  8063. GetPix(80),
  8064. buttonSize
  8065. ), "Delete", saveControlStyle))
  8066. {
  8067. deleteDirectoryFlag = true;
  8068. }
  8069. GUI.enabled = enabled;
  8070. }
  8071. else
  8072. {
  8073. float textFieldWidth = saveGridOffset - buttonSize;
  8074. Rect cancelRect = new Rect(
  8075. textFieldWidth + windowPadding,
  8076. saveGridHeight + windowPadding,
  8077. buttonSize,
  8078. buttonSize
  8079. );
  8080. bool cancel = GUI.Button(cancelRect, "X", saveControlStyle);
  8081. GUI.SetNextControlName("textEntry");
  8082. GUI.FocusControl("textEntry");
  8083. if (cancel)
  8084. {
  8085. textFieldValue = "";
  8086. createDirectoryFlag = false;
  8087. }
  8088. else if (Event.current.Equals(Event.KeyboardEvent("return")) && GUI.GetNameOfFocusedControl() == "textEntry")
  8089. {
  8090. CreateDirectory(textFieldValue);
  8091. textFieldValue = "";
  8092. createDirectoryFlag = false;
  8093. }
  8094. else
  8095. {
  8096. textFieldValue = GUI.TextField(new Rect(
  8097. windowPadding,
  8098. saveGridHeight + windowPadding,
  8099. textFieldWidth,
  8100. buttonSize
  8101. ), textFieldValue, 30, textFieldStyle);
  8102. }
  8103. }
  8104. #endregion
  8105. #region SAVE_GRID
  8106. float scale = 0.55f;
  8107. float imageWidth = 480f * scale;
  8108. float imageHeight = 270f * scale;
  8109. float imagePadding = GetPix(9);
  8110. int maxColumns = Mathf.Max(1, (int)(saveGridWidth / (imageWidth + imagePadding)));
  8111. float imageGridWidth = maxColumns * (imageWidth + imagePadding);
  8112. float imageGridX = saveGridX + (saveGridWidth / 2f - imageGridWidth / 2f) - windowPadding;
  8113. float imageGridOffset = (saveGridWidth - imageGridWidth) / 2f - windowPadding;
  8114. Rect saveGridScrollRect = new Rect(
  8115. saveGridX + windowPadding
  8116. , saveGridY
  8117. , saveGridWidth - windowPadding
  8118. , saveGridHeight - windowPadding
  8119. );
  8120. Rect saveGridScrollView = new Rect(0, 0
  8121. , saveGridWidth - 50
  8122. , (scenes.Count / maxColumns + 1) * (imageHeight + imagePadding) + imagePadding
  8123. );
  8124. GUI.Box(new Rect(
  8125. saveGridX
  8126. , saveGridY
  8127. , saveGridWidth
  8128. , saveGridHeight - windowPadding
  8129. ), "");
  8130. sceneManagerScrollPos = GUI.BeginScrollView(saveGridScrollRect, sceneManagerScrollPos, saveGridScrollView);
  8131. if (GUI.Button(new Rect(
  8132. imageGridOffset
  8133. , imagePadding
  8134. , imageWidth
  8135. , imageHeight)
  8136. , "+", newSaveStyle))
  8137. {
  8138. createSceneFlag = true;
  8139. TakeScreenshot();
  8140. }
  8141. if (scenes.Count > 0)
  8142. {
  8143. int j = 1;
  8144. int i = scenes.Count - 1;
  8145. while (i >= 0)
  8146. {
  8147. float imageX = (j % maxColumns) * imageWidth + (j % maxColumns) * imagePadding + imageGridOffset;
  8148. float imageY = (j / maxColumns) * imageHeight + (j / maxColumns + 1) * imagePadding;
  8149. if (GUI.Button(new Rect(
  8150. imageX
  8151. , imageY
  8152. , imageWidth
  8153. , imageHeight), scenes[i].screenshot, saveImageStyle))
  8154. {
  8155. selectedScene = i;
  8156. ReadScene();
  8157. if (sceneData != null)
  8158. {
  8159. if (kankyoScene)
  8160. {
  8161. infoString = new GUIContent("Background");
  8162. }
  8163. else
  8164. {
  8165. int numMaids = int.Parse(sceneData.Split(',')[1]);
  8166. string maids = numMaids == 1 ? "Maid" : "Maids";
  8167. infoString = new GUIContent($"{numMaids} {maids}");
  8168. }
  8169. manageSceneFlag = true;
  8170. }
  8171. }
  8172. i--;
  8173. j++;
  8174. }
  8175. }
  8176. GUI.EndScrollView();
  8177. #endregion
  8178. GUI.Label(new Rect(
  8179. sceneManagerRect.width - GetPix(15),
  8180. sceneManagerRect.height - GetPix(17),
  8181. GetPix(20),
  8182. GetPix(20)
  8183. ), "□", resizeHandleStyle);
  8184. if (createSceneFlag)
  8185. {
  8186. if (File.Exists(thum_file_path_))
  8187. {
  8188. try
  8189. {
  8190. if (overwriteFlag)
  8191. {
  8192. OverwriteScene();
  8193. }
  8194. SaveScene();
  8195. }
  8196. catch { }
  8197. finally
  8198. {
  8199. overwriteFlag = false;
  8200. createSceneFlag = false;
  8201. }
  8202. }
  8203. }
  8204. if (kankyoModeFlag != kankyoToggle)
  8205. {
  8206. kankyoModeFlag = kankyoToggle;
  8207. currentDirectory = kankyoModeFlag ? kankyoDirectoryName : sceneDirectoryName;
  8208. RefreshSceneManager();
  8209. }
  8210. if (!resizeManager)
  8211. {
  8212. GUI.DragWindow(new Rect(0, 0,
  8213. sceneManagerRect.width - windowPaddingY,
  8214. sceneManagerRect.height - windowPaddingY));
  8215. }
  8216. }
  8217. private void SceneManagerModal(int winID)
  8218. {
  8219. GUIStyle titleStyle = new GUIStyle("label");
  8220. titleStyle.fontSize = GetPix(12);
  8221. titleStyle.alignment = TextAnchor.UpperCenter;
  8222. GUIStyle infoLabelStyle = new GUIStyle("label");
  8223. infoLabelStyle.fontSize = GetPix(13);
  8224. infoLabelStyle.alignment = TextAnchor.MiddleCenter;
  8225. // infoLabelStyle.normal.textColor = new Color(1f, 0.44f, 0f);
  8226. GUIStyle infoLabelShadow = new GUIStyle(infoLabelStyle);
  8227. infoLabelShadow.normal.textColor = new Color(0f, 0f, 0f, 0.55f);
  8228. GUIStyle saveControlStyle = new GUIStyle("button");
  8229. saveControlStyle.fontSize = GetPix(12);
  8230. saveControlStyle.alignment = TextAnchor.MiddleCenter;
  8231. GUIStyle infoHighlightStyle = new GUIStyle("box");
  8232. infoHighlightStyle.normal.background = infoHighlight;
  8233. int index = deleteDirectoryFlag ? scenes.Count - 1 : selectedScene;
  8234. Texture2D previewImage = scenes.ElementAtOrDefault(index)?.screenshot;
  8235. int windowPadding = GetPix(10);
  8236. int windowPaddingY = GetPix(20);
  8237. float previewWindowWidth = sceneModalRect.width - windowPaddingY;
  8238. float previewWindowHeight = Mathf.Min(270 - windowPadding, sceneModalRect.height - GetPix(70));
  8239. int texWidth = previewImage?.width ?? 480;
  8240. int texHeight = previewImage?.height ?? 270;
  8241. float scale = Mathf.Min(previewWindowWidth / texWidth, previewWindowHeight / texHeight);
  8242. float previewWidth = (texWidth * scale) - windowPaddingY;
  8243. float previewHeight = (texHeight * scale) - windowPaddingY;
  8244. float previewX = (sceneModalRect.width / 2 - previewWidth / 2);
  8245. float previewY = windowPaddingY;
  8246. GUI.DrawTexture(new Rect(
  8247. previewX - GetPix(6)
  8248. , previewY - GetPix(6)
  8249. , previewWidth + GetPix(12)
  8250. , previewHeight + GetPix(12))
  8251. , frame
  8252. );
  8253. if (previewImage != null)
  8254. {
  8255. GUI.DrawTexture(new Rect(
  8256. previewX,
  8257. previewY,
  8258. previewWidth,
  8259. previewHeight
  8260. ), previewImage);
  8261. }
  8262. if (!deleteDirectoryFlag)
  8263. {
  8264. Vector2 infoLabelSize = infoLabelStyle.CalcSize(infoString);
  8265. GUI.Box(new Rect(
  8266. previewX + GetPix(7),
  8267. previewY + previewHeight - infoLabelSize.y - GetPix(7),
  8268. infoLabelSize.x + GetPix(8),
  8269. infoLabelSize.y
  8270. ), "", infoHighlightStyle);
  8271. GUI.Label(new Rect(
  8272. previewX + GetPix(10),
  8273. previewY + previewHeight - infoLabelSize.y - GetPix(8),
  8274. infoLabelSize.x,
  8275. infoLabelSize.y
  8276. ), infoString, infoLabelStyle);
  8277. }
  8278. string title = deleteDirectoryFlag
  8279. ? $"Are you sure you want to delete \"{directoryList[selectedDirectory]}\" and all of its files?"
  8280. : deleteSceneFlag
  8281. ? $"Are you sure you want to delete \"{scenes[index].info.Name}\"?"
  8282. : scenes[selectedScene].info.Name;
  8283. float labelY = previewY + previewHeight + windowPadding;
  8284. GUI.Label(new Rect(
  8285. windowPadding,
  8286. labelY,
  8287. sceneModalRect.width - windowPaddingY,
  8288. sceneModalRect.height - labelY - windowPadding
  8289. ), title, titleStyle);
  8290. int buttonHeight = GetPix(25);
  8291. int buttonWidth = GetPix(80);
  8292. float buttonY = sceneModalRect.height - windowPadding - buttonHeight;
  8293. if (GUI.Button(new Rect(
  8294. windowPadding,
  8295. buttonY,
  8296. buttonWidth,
  8297. buttonHeight
  8298. ), deleteDirectoryFlag || deleteSceneFlag ? "Delete" : "Overwrite", saveControlStyle))
  8299. {
  8300. if (deleteDirectoryFlag)
  8301. {
  8302. DeleteDirectory();
  8303. }
  8304. else if (deleteSceneFlag)
  8305. {
  8306. DeleteScene();
  8307. }
  8308. else
  8309. {
  8310. overwriteFlag = true;
  8311. createSceneFlag = true;
  8312. TakeScreenshot();
  8313. }
  8314. deleteSceneFlag = false;
  8315. deleteDirectoryFlag = false;
  8316. manageSceneFlag = false;
  8317. }
  8318. if (!(deleteDirectoryFlag || deleteSceneFlag))
  8319. {
  8320. if (GUI.Button(new Rect(
  8321. windowPaddingY + buttonWidth,
  8322. buttonY,
  8323. buttonWidth,
  8324. buttonHeight
  8325. ), "Load", saveControlStyle))
  8326. {
  8327. manageSceneFlag = false;
  8328. loadSceneFlag = true;
  8329. kankyoLoadFlg = kankyoScene;
  8330. loadScene = 1;
  8331. FileSystemInfo info = scenes[selectedScene].info;
  8332. info.LastAccessTime = DateTime.Now;
  8333. }
  8334. if (GUI.Button(new Rect(
  8335. windowPaddingY + 2 * buttonWidth + windowPadding,
  8336. buttonY,
  8337. buttonWidth,
  8338. buttonHeight
  8339. ), "Delete", saveControlStyle))
  8340. {
  8341. deleteSceneFlag = true;
  8342. }
  8343. }
  8344. if (GUI.Button(new Rect(
  8345. sceneModalRect.width - buttonWidth - windowPadding,
  8346. buttonY,
  8347. buttonWidth,
  8348. buttonHeight
  8349. ), "Cancel", saveControlStyle))
  8350. {
  8351. manageSceneFlag = false;
  8352. deleteSceneFlag = false;
  8353. deleteDirectoryFlag = false;
  8354. }
  8355. GUI.DragWindow();
  8356. }
  8357. public void TakeScreenshot()
  8358. {
  8359. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  8360. isScreen2 = true;
  8361. if (!isMessage)
  8362. {
  8363. ui_cam_hide_list_.Clear();
  8364. foreach (UICamera uiCamera in NGUITools.FindActive<UICamera>())
  8365. {
  8366. if (uiCamera.GetComponent<Camera>().enabled)
  8367. {
  8368. uiCamera.GetComponent<Camera>().enabled = false;
  8369. ui_cam_hide_list_.Add(uiCamera);
  8370. }
  8371. }
  8372. }
  8373. else
  8374. {
  8375. editUI = GameObject.Find("/UI Root/Camera");
  8376. if (editUI != null)
  8377. {
  8378. editUI.SetActive(false);
  8379. }
  8380. if (GameMain.Instance.CMSystem.ViewFps)
  8381. {
  8382. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false).SetActive(false);
  8383. }
  8384. GameObject childObject1 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  8385. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  8386. childObject1.SetActive(false);
  8387. childObject2.SetActive(false);
  8388. }
  8389. isGui = bGui;
  8390. bGui = false;
  8391. try
  8392. {
  8393. thum_byte_to_base64_ = string.Empty;
  8394. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  8395. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, true);
  8396. }
  8397. catch { }
  8398. }
  8399. }
  8400. }