This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add player level and vip points modification
- Loading branch information
Arzaroth Lekva
committed
Feb 29, 2016
1 parent
a1c6dca
commit 761c0fa
Showing
12 changed files
with
129 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# File: playerframe.py | ||
# by Arzaroth Lekva | ||
# [email protected] | ||
# | ||
|
||
from __future__ import print_function, absolute_import, unicode_literals | ||
|
||
import six | ||
try: | ||
# py3 | ||
import tkinter as tk | ||
import tkinter.ttk as ttk | ||
from tkinter.constants import N, S, E, W, NSEW | ||
except ImportError: | ||
# py2 | ||
import Tkinter as tk | ||
import ttk | ||
from Tkconstants import N, S, E, W, NSEW | ||
from celestia.gui.currenciesframe import CurrencyFrame | ||
|
||
class PlayerFrame(ttk.Frame): | ||
def __init__(self, parent, xml_handle): | ||
ttk.Frame.__init__(self, parent, height=400) | ||
self.grid_propagate(0) | ||
|
||
self._xml_handle = xml_handle | ||
self._player_infos = {} | ||
for n, (name, typ) in enumerate(xml_handle.player_infos.items()): | ||
self._player_infos[name] = CurrencyFrame(self, name, typ.value, | ||
typ.limit, n) | ||
|
||
def commit(self): | ||
for name, typ in self._xml_handle.player_infos.items(): | ||
typ.value = self._player_infos[name].value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.